Model Thickness

When I use a flat model as a terrain (via a StaticPhysicsNode) objects fall right through it.  What I have been having success with is thickening the model a small amount with a second layer, but this creates twice as many vertexes and is killing my load time when I start adding texture.



Is there a reason jME Physics won't work with 'flat' terrains?



Here's my code to add the terrain (track):


       StaticPhysicsNode stn = getPhysicsSpace().createStaticNode();
       stn.attachChild(trackNode);
       
       stn.generatePhysicsGeometry(true);
       rootNode.attachChild(stn);

webaf409 said:

Is there a reason jME Physics won't work with 'flat' terrains?

No, it works with flat terrains. Maybe the winding is incorrect? Apply a CullState to cull the backfaces and have a look whether you see your terrain from above or from below. If you can see it from below there is something wrong.

see TerrainTest btw

That does appear to be the problem…



Is there an easy way to fix it??? (I'm using blender btw, if that's where it needs to be done)

Not sure how this is done with blender, but you need to revert triangle winding, possibly blender also does this when you flip normals… you could of course revert them in jME, too, but it would be better if you find out (or someone tells you) how to do it in blender…

Okay, I got it… that wasn't exactly the problem…



My model was built out of quads, rather than triangles.  I turned them into triangles (Ctrl + T if anyone needs it) and it's worked since then. 



Thanks for the help!