weckar Posted September 24, 2015 Posted September 24, 2015 I've been searching for a while on it, but I'd like to turn off backface culling for certain blocks. In other words: draw all faces, including the back ones (it concerns a transparent block). Is there an easy way to override this behavior? Quote If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.
Elix_x Posted September 24, 2015 Posted September 24, 2015 isOpaqueCube() Quote Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones
weckar Posted September 24, 2015 Author Posted September 24, 2015 I meant drawing the back faces of the transparent block. I have no issue (right now) with blocks below/behind it being rendered. Thanks though. Quote If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.
Elix_x Posted September 24, 2015 Posted September 24, 2015 Are you using default block model? Not default? Custom? Quote Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones
weckar Posted September 24, 2015 Author Posted September 24, 2015 Just a default block with custom textures, in render pass 1 if it matters at all. Quote If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.
Draco18s Posted September 24, 2015 Posted September 24, 2015 Minecraft "cube" rendering system has no notion of back faces. It is simply six single-sided quads. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
weckar Posted September 24, 2015 Author Posted September 24, 2015 Hmmmm okay. Then probably the better question would be how I could also render the INSIDE of these quads? Quote If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.
Draco18s Posted September 24, 2015 Posted September 24, 2015 Use the tessellator and do it manually, it's not that hard. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
weckar Posted September 25, 2015 Author Posted September 25, 2015 If I agreed with you, I wouldn't have been asking the question for two days now. But I'll take another crack at it after work. Quote If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.
weckar Posted September 25, 2015 Author Posted September 25, 2015 SOLVED! RenderBlocks has a method called setRenderFromInside(). Set it to true to draw the inside of a block! (Overriding shouldSideBeRendered from Block to always return true may also be a good idea). Quote If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.
Elix_x Posted September 25, 2015 Posted September 25, 2015 On 9/25/2015 at 2:54 PM, weckar said: SOLVED! RenderBlocks has a method called setRenderFromInside(). Set it to true to draw the inside of a block! (Overriding shouldSideBeRendered from Block to always return true may also be a good idea). Note on RenderBlocks.setRenderFromInside(): you should only set it to true only when your block is rendered. And after - back to false... Because otherwise ALL blocks will be rendered from inside... Which will decrease fps a lot... Quote Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones
Draco18s Posted September 25, 2015 Posted September 25, 2015 On 9/25/2015 at 6:41 AM, weckar said: If I agreed with you, I wouldn't have been asking the question for two days now. The Tessellator is just a wrapper around OGL calls, with the assumption that you want to draw quads. Quads are just four vertices specified in a specific order (counterclockwise, iirc). Cubes consist of 6 sides (12 if you count the inside faces) and 8 verticies. Drawing each set of 4 to make a side doesn't matter what direction you draw in, because you're going to draw in both in order to get the front face and the back face anyway. Anyway, glad you found setRenderFromInside(). I didn't know it existed, and thanks to elix for mentioning the caveat. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
weckar Posted September 25, 2015 Author Posted September 25, 2015 On 9/25/2015 at 4:48 PM, elix said: Note on RenderBlocks.setRenderFromInside(): you should only set it to true only when your block is rendered. And after - back to false... Because otherwise ALL blocks will be rendered from inside... Which will decrease fps a lot... Thanks for the pointer - and I tried it to see what it would do. Turns out - it will ONLY render the insides of all blocks. In other words, you'll notice quite quickly.... Quote If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.