PDA

View Full Version : Rigid Body Dynamics Problem


person01
02-16-2006, 03:36 PM
I have a rigid body (rigidMain) connected to a hinge, when the wind blows rigidMain swings on the hinge.

I am trying to simulate a pully on a rope connected to another rope connected to the end of rigidMain. So I made a second rigid body (rigidPulley). rigidPulley is placed at the end of rigidMain, halfway between rigidMain and the ground. Then a spring attaches rigidPulley to the ground, and another spring is attached to rigidPulley which is constrained to the end of rigidMain. Thus when rigidMain swings out, it pulls on the spring connected to rigidPulley. I hope you can envision this. It works fine until the whole thing is animated. When the whole setup is animated it appears that rigidPulley starts to affect rigidMain in an unforseen way, it basically starts pulling rigidMain off of its hinge constraint.

So I deleted unneeded connections to rigidBody transform nodes on rigidMain and the problem went away, then I later added more springs connected to rigid bodies and the problem recurs... Not only does it recur, but returning to the previous working state does not fix the problem. The only way to get rid of the problem is to break the constraint binding the rigidPulley spring to the end of rigidMain...

I also tried using two nail constraints instead of hinge, doesn't solve the issue.

Strangely, the issue occurs even if the rigidPulley is not directly constrained to rigidMain via a spring. For instance, if a locator1 is parented into the rig, then aim constrained to rigidMain, and a second locator2 is rotated via an expression deriving its rotation from locator1, and a rigidPulley is created which has springs point constrained or parented, to locator 2, rigidMain will STILL bounce funky on its hinge constraint, even though there are no springs directly constrained to it...

So the problem seems to be having a rigidBody spring constrained to any object somehow deriving its position from rigidMain.

Any ideas on how to resolve this issue permanently??

person01
02-16-2006, 09:50 PM
I figured this out earlier today so here is the solution:

For a situation as described previously where you must use the dynamic movement of the hinge constrained rigidBody1 to drive the movement of a rigidBody Spring constraint on rigidBody2 which causes the hinge constraint on rigidBody1 to start acting weird do the following:

Create locator1, parent locator1 into whatever hierarchy the rig is in so that its rotational values will be relative to the rig and not worldspace. Create another locator2, aim constrain locator1 to rigidBody1 above, then manually connect the rotational values of the two locators using the connection editor/hypergraph. Now you can directly parent the spring constraints you want to react to rigidBody1's movement to locator2 and rigidBody1's hinge constraint will behave normally no matter where you animate the rig in the scene! Although in my scene, the locators I have being driven by what is locator2 in this description are controlled by expressions, so if you have issues try that.

Hope this helps someone.

By the way, this is in regards to a dynamic sailboat rig.

person01
03-01-2006, 08:08 PM
If anyone out there is familiar with having a rigid body attached to an object that is animated on a path I could use some help.

Currently the rig is working perfectly, except when the object that the dynamics setup is parented to is animated along a path. There are issues associated with initially attaching the whole system to a path, once those are overcome everything plays back fine... However, when rendered in Mental Ray things go bad, real bad. However, if the same object is animated by keyframes as opposed to a path animation, everything becomes good again in Mental Ray.

Of course there are easy workarounds, like, baking the simulation, not a preference of mine due to the fact that I like things to work.

Just curious if anyone has had this issue where the dynamics rig constrained to a path goes nuts only when rendered but is fine when playblasted...

yenvalmar
03-16-2006, 04:28 PM
but your scene isnt the same as mine. however, if i have passive rigid bodies directly parented to other objects that animate, their position and rotation "freaks out" once you start animating. i cant tell if this is due to interaction with active rigid bodies, as in your example, which i am also doing, or what. i will try some of the indirect parenting you outline and see if it helps.

CGTalk Moderation
03-16-2006, 04:28 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.