Monday, June 6, 2011

Soft body manipulation using an attached rigid body with Phantom Omni Arm

I uploaded a new video that demonstrates the manipulation of a soft body using an attached rigid body and with the Phantom Omni Arm.
I attached the rigid body to the soft one with a linear joint. The goal is to insert the soft body in the tube that is present in the scene. I detect the insertion testing the Aabb boxes of the two objects.

- The manipulation is not intuitive, is like manipulating a copter, and to stabilize the moved object, you must move the Phantom Arm in the opposite direction. This is because I apply a force to the moved object, and Bullet calculates his inertia after that. No prediction or something to make the manipulation more intuitive is used. Tested on some users, they stated that is difficult. The problem is in the fact that I do all the rendering and simulation in the same thread. I also tried to do the simulation in another Win32 thread, but there appear problems on synchronization, that are not so easy to correct. Also, I did some research on the possibility to manipulate a soft object directly, and the only solution was to loop through all the soft body clusters, and to calculate, based on their velocities etc. the resultant force, and apply it to the cluster. In general, you will obtain at the end the possibility to manipulate directly the body. The manipulation, however, is not easy, and for those who tested what I done was more difficult to insert the soft body in the tube than in the case of an attached rigid body :)
- I must be very accurate with the forces that I apply to the moved objects, because if not, they may explode. So that's the main reason why no enhancements were done to assist the user in the manipulation. Also because I had no allocated time for that (to think and implement).

Here's the link to the video: