ODE and Static Geometry

Started by
4 comments, last by toonist 16 years, 11 months ago
So I've been researching the Open Dynamics Engine for use in my game engine. And I can't find any info on adding static world geometry like walls and floors to the collision world. You don't use the box collision for each polygon I wouldn't think right? Have any of you used ODE for collision detection? Any one know how you go about this?
==============================
A Developers Blog | Dark Rock Studios - My Site
Advertisement
You could use a box collision for each flat object, a box for the floor or a box for the wall.
If you want irregular floor You can use a heightmap.
If you have complex objects you can use trimesh collision.

The only difference in ODE between static and dynamic objects is static objects only have Geom.


However, I've only used ODE a bit, so I may be wrong. Anyway, the ODE wiki is quite helpful.

http://opende.sourceforge.net/wiki/index.php/Manual_%28Collision_Detection%29
Look into TriangleMesh (trimesh), you can present it a polygon soup and make it static with the method described above. It will also do space-partitioning under the hood, so it's a pretty decent way of storing your level geometry. Be aware that there is a limit to the number of polygons it can handle, so you probably want to use a simplified collision mesh instead.
HTH
Hhhhmmmm...

Well I've got a BSP tree and the world geometry contained in it are polygons not tri-meshes. I suppose I could make tri-meshes out of my polygons but that'll b a bit more difficult.

If the world geometry is too much for ODE to handle at once (I was planning on each leaf being a space geom, then the leaf geoms would contain tri-mesh geoms for the actual geometry) you think I could add the geoms to the collision world in real time for testing?

Worst case scenario I would be doing this every frame which could suck.
==============================
A Developers Blog | Dark Rock Studios - My Site
The problem with dynamically adding geometry to the physics world is that objects out of sight still collide. ODE should be able to handle your entire worlds geometry, if you use low enough poly counts and take advantage of disabled bodys.
ODE is designed to detect geoms that don't move and optimize the scene according to that so that should bring a few fps more...

This topic is closed to new replies.

Advertisement