[ODE] Bodies getting submerged in the Heightfield

Started by
2 comments, last by Brainsaw 13 years, 6 months ago
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
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 ;) ).
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.
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.

This topic is closed to new replies.

Advertisement