### Collision Detection for Sliding Simulations in VR

Posted by Kaya Kupferschmidt • Wednesday, March 28. 2007 • Category: Programming
Currently I have to develop a robust method for sliding simulation in a immersive VR environment. This means that the user in a CAVE should be able to move objects around, but these movements should be resitricted by collisions with a static environment. Unsurprisingly this task turns out to be non-trivial. We chose to integrate ODE as a physics simulation backend combined with our own collision engine originally developed by Gabriel Zachman.

There are two obvious problems:

Interestingly I found out that commercial physics packages seem to employ much more advanced collision algorithms which can calculate the penetration depth or work in a continious mode and thus calculate the exact time of the first collision. Plus many games use simplified collision geometry and special bodies (spheres, cylinders, boxes) which make such calculations much more easy, while we have to cope with arbitrary high-resolution triangle meshes.

While looking for solutions on the net, I found two good PhD thesises on physics simulations:

There are two obvious problems:

- The virtual body moved by the user eventually has to be moved by ODE. This means that I had to extract the forces needed to move the object as desired by the user and pass them to the physics engine. This has been rather easy once I understood what the words torque and intertia tensor mean (both are needed for rotational movements).
- The more complex problem is the integration of the collision engine. The integration itself was straight forward, but the real problem is, that as soon as a collision is detected, the simulation gets out of control. The reason is that what we really would need is a penetration depth or we have to try to approximate the exct time of the first collision between two bodies. As our collision engine does not offer the penetration depth, I have to go down the second road and approximate the time of collision by progressively subdividing timesteps in case of a collision.

Interestingly I found out that commercial physics packages seem to employ much more advanced collision algorithms which can calculate the penetration depth or work in a continious mode and thus calculate the exact time of the first collision. Plus many games use simplified collision geometry and special bodies (spheres, cylinders, boxes) which make such calculations much more easy, while we have to cope with arbitrary high-resolution triangle meshes.

While looking for solutions on the net, I found two good PhD thesises on physics simulations:

- Stable, Robust, and Versatile Multibody Dynamics Animation by Kenny Erleben from March 2005
- Impulsbasierte Dynamiksimulation von Mehrkörpersystemen in der virtuellen Realität by Jan Bender from January 2007

## 0 Comments

## Add Comment

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.