Sign in to follow this  
Wavesonics

ODE and Static Geometry

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this