Best way to handle a complex model?

Hy, what is the best way to handle one complex model (trimesh)?

I know that the collision detection supports spheres, boxes and cylinders, so that the bound of a complex model should be compounded out of these primitives. As each Spatial can have only one bound, i think i must use several dummy Spatials (for example Points) and set their bounds to what i need and set their culling states to CULL_ALLWAYS. After this i can put them together as shown in the CompoundedObjectTest class.

I think this will work, but is there a better way (than culling dummy Spatials off)?

Thanks a lot.

For convenience I would recommend to divide the trimesh in the modeler and assign the type of bound already (as far as possible, don't know what's supported there).

For rendering performance it would be better to keep a single mesh, though. The best way would be to provide a way to model the physical representation independently. Unfortunately the physics type can be specified for single object, only, not for compound objects.

Maybe someone can make some proposals…

Mojomonk, if you read this: Can the bound info be stored in .jme-files, already?

The best way would be to provide a way to model the physical representation independently.

Yes that would be best and brings me to a basic, but important question, which is not clear for me: does jME-physics support trimesh collision? If so, is it working?

This is something I haven't messed with really at all but I have seen terrain examples in jME-Physics that you can use the ball shooter and they will hit the terrain and roll around on it as it should.  I would assume this is utilizing what you're wanting to do.  Take a look at the tests in jME-Physics, it's a pretty neat little test although I've encountered issues where I would fire a ball at it a certain way and it would just fly right through it, so not bug-free but I think this will get you what you want.


Yes you are right, i have totally forgotten the TerrainXX-tests. My fault. I will take a look at them.


No problem…I've looked at them but have no idea how they work as I have yet to have need of such knowledge. :slight_smile: