Sign in to follow this  

Nonconvex Rigid Bodies with Stacking Question

This topic is 4271 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, I have managed to implement a rigid body simulator with spheres using the the method described in the above paper and it seems to be working pretty well; so now I am trying to add boxes (currently just dropping a box onto a ground plane) to my simulator and am trying to iron out a few bugs. Here is the algorithm as I have implemented it: 1.Calculate forces acting on the rigid bodies Collision Resolution 2.Store rigid body info (Lin and Ang velocities, Position and Orientation) 3.Integrate new velocities 4.Integrate new positions 5.Do collision detection 6.Reset velocities to previous values 7.Sort contact list in order of deepest penetration 8.Apply collision and friction impulse to first item in the list if its relVel * ColNorm < 0 (updating velocities but not positions) 9.Update all relative velocities of objects in the list affected by the impulse 10.Step through the list, remove all items with relVel*ColNorm >= 0 11.Repeat 8-10 until list is empty 12.Reset Positions and Orientations to previous values 13.Repeat 2-12 five times 14.Calculate forces acting on the rigid bodies 15.Integrate new velocities Contact Resolution 16.Store rigid body positions and orientations 17.Integrate positions using new velocities 18.Do collision detection 19.Sort contact list in order of gravity (lowest first) 20.Apply collision and friction impulse to first item in the list if its relVel * ColNorm < 0 (updating velocities but not positions) 21.Update all relative velocities of objects in the list affected by the impulse 22.Repeat 20-21 so that you go through the entire list 23.Reset positions and orientations to previous values 24.Repeat 16-23 ten times. When the collision impulse is applied use an initial value of e = -0.9 and for each iteration add 0.1 25.Integrate new positions and orientations Does this look right to you guys, or is there anything I am doing wrong or missing out?

Share this post


Link to post
Share on other sites
Looks OK. One other things mentioned in the slides in order to improve the contact phase is using the contacts of the candidates along with current positions.

Anyway, what problems do you have?

-Dirk

PS:
Most of this topics have been discussed very sorrowly here. Seek the forum to find further information

PSS:
You like to consider the presention of Erin Catto at the GDC. His algorithm seems to be a good improvement, especially the accumulated impulse and the clamping against it during contact. I think you can integrate it easily into the Guendelman method.

www.gphysics.com

PSSS:
Once you have the contact stuff working seek for Rachel Weinsteins paper regarding constraints. Again, I recommend looking at Erin Cattos implementation and simply solve for the constraints and contacts together during relaxation.

Share this post


Link to post
Share on other sites
I'm also interested in this algo for collision hanlding and I have a question.

When there are multiple bodies (3 or more) are steps 2-13 done 2 bodies at a time from my list of "potentially" colliding bodies. Or are the steps done accross all potentially colliding bodies at once ?

Put another way. In step 5, should I be finding all contact points accross ALL bodies in my system, then ordering All these contact points by deepest penetration? Or should I just be finding the contact points between 2 bodies from my list of potentially colliding bodies.

Hope my question is clear enough.

Share this post


Link to post
Share on other sites

This topic is 4271 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this