Sliding in VR with ODE, part 2

Posted by Kaya Kupferschmidt • Monday, April 2. 2007 • Category: Programming
After I started the integration of ODE into the immersive VR project, I stumbeled over a lot of difficulties, with some of them being still not properly solved:

  • Collisions between arbitrary triangle meshes is a complex thing. ODE needs as much information as possible for correct collision response. This include the contact point and normal (both are rather easy to get) and the penetration depth. The later is not trivially extracted from a collision, moreover it even is not simple to give a correct definition in the case of non-convex geometry. I had to work around this problem by approximation the penetration depth on a triangle-by-triangle basis, but my approximation still can return much too big values, so I finally had to clamp the result.

  • The connection of the virtual object and the tracked hand of the user is now realized by a fixed joint between two ODE bodies (one body for the hand ("user body") and one body for the object ("object body"). Out naive approach simply repositions the user controlled body in each frame and hopes that ODE will try to move the connected object body to the user body while trying to obey to collisions. This went well in some sense, but as soon as there are some collisions, the distance between both objects has been increased and remained even after the object has been moved out of collision again. Debugging the code showed that the user body has accumulated insane velocities in order to resolve the fixed joint constraint, and these velocities haven't been reset after collision. So I had to insert a linear and an angular motor with target speed of zero in order to slow down the objects. Still this is not an ideal solution, it would be much better to use motors in the first place to control the virtual object.

  • ODE seems to be very sensitive to scaling. The ODE manual states that best results are achieved if all values are in the range 0.1 to 10.0. But we have models in milimeters (cars) and models with a meter scale (airplanes). ODE seems to be especially sensitive to different masses, it turned out that a proportional increase of all masses resulted in ignorance of all collisions.


Still there are a lot of open topics, and I was only able to achieve some sliding (the user moves a virtual object, which obeys to collisions with a static environment) in a artificial toy environment. Maybe we will try a different physics library, but my guess is that the biggest problem is the lack of proper penetration depth information.

0 Comments

Display comments as (Linear | Threaded)
  1. No comments

Add Comment


Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA 1CAPTCHA 2CAPTCHA 3CAPTCHA 4CAPTCHA 5


Markdown format allowed



A Simple Sidebar