Double sided texturing doesn't work and I didn't find a solution, help?

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

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

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?

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

I had the same issue 11 months ago http://hub.jmonkeyengine.org/groups/general-2/forum/topic/cull-front-and-back-faces-problem/.

1 Like

Indeed pspeed, u were right, I was changing in the wrong method, How foolish of me :stuck_out_tongue:



Thanks alot for all help tho :smiley:

You guys are the best!