You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
Hi, I have question about converting mesh generated from heightmap to Bullet btTriangleMesh. My current mesh converter don't work with terrain meshes. I get mesh in follow steps:
1. I generate ITerrainSceneNode.
2. I copy terrain LOD Buffer to CDynamicMeshBuffer.
3. I convert MeshBuffer to btTriangleMesh.
This is differences between 'collision' and 'drawing' meshes:
Collision mesh look as mix between Convex Hull and BVH... I have similar results when I use btTriangleIndexVertexArray instead btTriangleMesh
No, currently I don't test btHeightfieldTerrainShape, because two independent create meshes first via Irrlicht and second via Bullet can return differences results eg. more smoothly etc... so I think BVH is better solution for it. I think problem is in Irrlicht terrain mesh structure, so converter can't rewrite it properly.
The Terrain Scene Node has no index that is required in Bullet. You can create the terrain in Bullet first and then pass it to Terrain Scene Node afterwards.
In currently Irrlicht version indices are storage in irr::u32, so in Your Irrlicht to Bullet mesh converter You also have to change irr::u16 to irr::u32 eg.
Nadro wrote:In currently Irrlicht version indices are storage in irr::u32, so in Your Irrlicht to Bullet mesh converter You also have to change irr::u16 to irr::u32 eg.