Jump to content
  • Advertisement
Sign in to follow this  
zweifel

[ODE] Bodies getting submerged in the Heightfield

This topic is 2867 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

Hi

My simulation is composed of one cube and a Heightfield, but the collision seems to work differently depending on the heightmap, contact parameters and body's size used. Until now, I found no way to make them collide such as the demo_heightfield (in fact, sometimes the bodies get submerged in the demo also!). I tried removing and decreasing the dContactSoftCFM, I tried using the same parameters as the demo, tried decreasing the step (right now using multiple steps of 1.0 milliseconds), but no results. Sometimes the bodies even collide in such a way as to explode!

Here is the final position of two simulations with gravity in a irregular terrain (both of them features bodies partially or totally submersed in the terrain):
http://img191.imageshack.us/f/heightmap.jpg/
http://img709.imageshack.us/f/heightmap2.jpg/

Here the same simulation, but with a regular Heightfield:
http://img709.imageshack.us/f/planec.jpg/
http://img835.imageshack.us/f/plane2v.jpg/

Any ideas of what may be the error?

I can post further information about the contact parameters, rendering and other things if requested.

Thanks in advance,
zweifel

Share this post


Link to post
Share on other sites
Advertisement
I know this problem from my IrrOde wrapper (see http://www.bulletbyte.de). From an answer I got on the ODE mailing list there seems to be a bug in the heightfield class that's not going to be fixed (at least not soon). The tip I got was to use a Trimesh instead of a Heightfield, and now it works.

I really would prefer a version of the Heightfield geom to this workaround as it seems that the performance is way better (exactly what I expected ;) ).

Share this post


Link to post
Share on other sites
Thanks Brainsaw. If this was only written on the Manual as something needing fixes would've saved me lot of time. :/

Now I need to decide if I move out to Bullet or remain with ODE using trimesh... any suggestions? I will give a look at Bullet demos.

Share this post


Link to post
Share on other sites
Well ... the only real change I noticed is the initialization time which takes quite a bit longer for a Trimesh than a heightfield. Maybe I should let the user of my IrrOdeCar demo decide which way to use so I can make some direct comparisms.

I agree that this is a real issue imho. I think that if you use big maps it will slow down the whole thing quite a lot, but the ODE devs don't seem to see this problem as big as I do. I'll stick with ODE mainly because I invested about 2 years of free time (well ... part of my free time) to get the IrrOde wrapper this far (and a first *real* demo game running). I think that if I knew of this when I started I would try another physics lib.

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!