Problem with converted md2's

It seems every md2 I have converted to jme has its normals on the wrong side?



These md2’s are ones I have downloaded that were used in quake2.  So when you look at the model you see through the surface you are looking at and see the texture on the inside of the back surface.  I can import the md2s into milkshape then export them as milkshapes format and then convert that and they will look right, but doing that makes you lose the animations.





Any ideas?



thanks.



This is what it looks like:  http://img.photobucket.com/albums/v158/tandaur/bad2.jpg





This is what it should look like: http://img.photobucket.com/albums/v158/tandaur/good.jpg

I got the same problem, but i know the reason for it.



CullState cs = display.getRenderer().createCullState();
cs.setCullMode(CullState.CS_BACK);
scene.setRenderState(cs);



When you load a MD2-Model and the CullState.CS_BACK for the scene, then you can see through the model and inside is outside... => bad ;)
I don

I started the TestMd2JmeWrite and take a closer look on the normals:



The blue lines one are samples for normals, which are not right, i think.

The green lines should be the correct ones.

Am i right with this assumption?



JackNeil

Adding the cull state to the model fixed it.  Thank you very much.



What is odd is the test converter worked for me, but any model I tried to load would not work.  So I was baffled.



-mike

In the TestConverter there is no CullState so nothing is culled. :wink:



The broken normales seem to make problems on shadowrendering.