Jump to content
  • Advertisement
Sign in to follow this  
Wavesonics

ODE and Static Geometry

This topic is 4077 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!