
Rigid Math Constraints, Simpler way?
I''ve got a Rigid body system working, but I am having a perplexing time when dealing with multiple contacts in a frame. ( a box on a flat floor for example. )
I have seen how to do this documented in Bariffs papers, and seen an implementation, however the code seems quite mathmatically intensive. ( compute a_matrix, b_vector, constraint solver etc ).
I cannot see this been the only way since this would be far to intensive for a PSOne, ( or a PS2 perhaps!
.
So does anyone else know another method/hack?
Thanks for any info.

Penalty functions are much easier to implement than Baraff''s lagrange multiplier approach; HOWEVER, penalty functions tend to either exhibit significant drift from the rigid constraint you are wanting or significant instability in the numerical solution. You wouldn''t want to use simple Euler integration if you implement penalty functions to enforce constraints, or your system will likely blow up frequently. Runge-Kutta methods, 4th order preferred when you have penalty functions, are more stable, but they too are imperfect and WILL blow up if your penalty stiffnesses are too great or time steps too large.
In some cases, for example, the crate sitting on the ground, you could handle with special cases. You really don''t want to be simulating objects that aren''t moving anyway. Add some logic that checks for the case that the crate is very close to sitting flat and just settle it to zero and stop simulating until an external force acts on the crate.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
In some cases, for example, the crate sitting on the ground, you could handle with special cases. You really don''t want to be simulating objects that aren''t moving anyway. Add some logic that checks for the case that the crate is very close to sitting flat and just settle it to zero and stop simulating until an external force acts on the crate.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
There is a new gamasutra article which describes a constraint system without complex linear algebra. And it is quite fast, too.
- D.G
http://sourceforge.net/projects/ssframework/
Physics & Visualization Framework
v0.0.4b as of 16.01.2003
- D.G
http://sourceforge.net/projects/ssframework/
Physics & Visualization Framework
v0.0.4b as of 16.01.2003
"Don't panic"
Thanks, I''ll take a look.
I have inter-penetration working so the object stays on the ground without jittering, although I have not tried it at a low frame rate yet ( ~25fps ). Basically keep a record of you inter-penetrations, (Hit point, contact normal etc ), you go through this list applying corrective force at the hit point. The important bit is if you do apply a force you must then go through the list again. Repeat this until the relative velocities at the intersect points are zero or positive. ( i.e. the objects are moving apart/resting ).
This seems to work, of course you need to put a bail ot counter into this so you don''t keep going around the loop forever, which can happen if you have 3 RB objects intersecting.
Thanks Graham, I was thinking of putting a "Suspended" state into the RB, so it would do no processing until is was woke up by an impact, then go back to sleep again when it comes to rest.
Next I have to implement contact friction so things don''t act like they are on an ice ring, and can "trip-up".
Thanks for the help.
(btw I use a set of bounding spheres for object->World(poly) collision, its cheap and accurate enough for games IMHO ).
I have inter-penetration working so the object stays on the ground without jittering, although I have not tried it at a low frame rate yet ( ~25fps ). Basically keep a record of you inter-penetrations, (Hit point, contact normal etc ), you go through this list applying corrective force at the hit point. The important bit is if you do apply a force you must then go through the list again. Repeat this until the relative velocities at the intersect points are zero or positive. ( i.e. the objects are moving apart/resting ).
This seems to work, of course you need to put a bail ot counter into this so you don''t keep going around the loop forever, which can happen if you have 3 RB objects intersecting.
Thanks Graham, I was thinking of putting a "Suspended" state into the RB, so it would do no processing until is was woke up by an impact, then go back to sleep again when it comes to rest.
Next I have to implement contact friction so things don''t act like they are on an ice ring, and can "trip-up".
Thanks for the help.
(btw I use a set of bounding spheres for object->World(poly) collision, its cheap and accurate enough for games IMHO ).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement