[ODE] Contact joints simulating rough surfaces

Michal Bacik michal at lonelycatgames.com
Wed Mar 19 03:41:01 2003


> > How do I set-up contact joint which simulates highly-rough surface, for
> > example as if object was moving through grass? If I had sphere,
> I'd like it
> > to stop very soon when moving on the surface.
> > Now, a sphere just rolls forever, without stopping.
>
> The forces you're looking for do not come from contact joints, and/or are
> not part of "rigid body" dynamics (e.g. grass).  But, you can fake it by
> applying those forces yourself.
>
> The rolling sphere thing comes up here often, AFAIK the usual solution is
> to apply a force proprotional to its velocity.


Thanks. I've played with several possibilities, but it never looked
realistic. Is there a thread where something similar was discussed?

I'd like to simulate for example an earth - when you throw an apple on it,
it won't roll unless the slope is really big. I'm planning the normal
randomization approach, which could be fine for earth-like rough surface.

Thinking about grass - in reality it seems to apply forces into various
parts of rigid body. Simulating friction into center of body could do it,
but I can't come with an idea how to compute the force direction and length.
It could be proportional to linear velocity, but when I tested it, the
sphere never stopped - it moved more slowly, but kept moving :( I'd need to
stop it completely unless other forces (e.g. when ground is enough steep)
make it overcome the stopping forces.

- mb