Converting 3D mesh terrain ( OBJ ) to TerrainBlock


In order to solve a problem in our game development, I was able to produce these python scripts that are simple and can help you take the Mesh-based terrain from a program like Google Sketchup ( or other 3D mesh modeling app that saves .OBJ ) and convert to the TerrainBlock array structure that JME uses.



BonecoDeNeve Games

Why do you want to do that? You could simply use a TriMesh, a TerrainBlock is also just that. What extra functions of the Terrain do you need?

Trimesh doesn't have getHeight and getSurfaceNormal for terrain following though or am i missing something.

getHeight and most important with terrainpage you can break the heightmap into several terrainblocks which have their own bounding volumes.