Addez
October 9, 2011, 4:09pm
1
Hi!
To render the underside of the palm trees in my game (which you can see a cool screenshot of here: http://addez.tumblr.com/ ) I tried:
[java]mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.FrontAndBack);[/java]
I tried all modes possible to be set but there was no diffrence with them.
I read in another thread that Im suppose to:
clone invert clone normals and save both to same mesh
Not really sure how to do that.. is it a script I gota make myself to do that?
Did u create the model in blender or programmatically?
1 Like
If you’re using blender, try recalculating the normals outside by seleting all vertices in edit mode and pressing “ctrl+N”. Try “ctrl+shif+N” if “ctrl+n” doesn’t work.
1 Like
Addez
October 9, 2011, 6:19pm
4
I did in blender, but the problem is I need both sides renderd.
I cannot choose between rendering the top of the palm leafs or the bottom, but options will look weard…
This issue is very common. Did u already try recalculating the normals outside?
1 Like
Addez
October 9, 2011, 7:04pm
6
Done that now, didn’t change it.
Humm… The doublesided texturing only works in blender when taking a screenshot, not when editing the model but that’s normal right?
pspeed
October 9, 2011, 7:09pm
7
mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.FrontAndBack);
Will cull all faces, front and back.
mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off);
will show both front and back faces. And it it doesn’t, then you probably aren’t changing the right material.
2 Likes
Addez
October 9, 2011, 8:34pm
9
Indeed pspeed, u were right, I was changing in the wrong method, How foolish of me
Thanks alot for all help tho
You guys are the best!