Activity › Forums › Maxon Cinema 4D › Anim2Dynamics, again
-
Anim2Dynamics, again
Posted by Rodrigo Diaz on March 17, 2009 at 1:47 pmHello, last time I posted here Brian Jones showed a very nice and easy way to pass animated object movement into rigid body dynamic with a litle bit of xpresso.
This way you can combine animation and dynamics seamless. But when I tryed the same method on rotational movment (rotation velosity), it doesnt work the same way. Seems like the rotation directions change or get inverted?Anyone know something about passing “rotation velocity” into a rigid body with xpresso?
Thanks
Brian Jones replied 17 years, 4 months ago 3 Members · 10 Replies -
10 Replies
-
Adam Trachtenberg
March 17, 2009 at 5:10 pmI don’t know the answer, but as a general rule when dealing with Xpresso and rotation you have to convert degrees to radians … if that’s any help at all….
-
Brian Jones
March 18, 2009 at 2:26 amyou’re right, adding a negate (between the passed history value of the rotation velocity vector and the w input of the Rigid Dynamic tag) appears to solve it. I’d have to study it to find out if that’s the solution really – It’s probably more obvious if the example doesn’t have rotation in all 3 axis. Maybe if the vector is broken up into HPB values…
-
Brian Jones
March 18, 2009 at 1:31 pmtried some quick tests last night and a single axis rotation when passed into the Rigid Dynamics tag moves the wrong way (wrong axis). Vector rotation is non-intuitive for me, I can’t work on it until later but if I find consistent behaviour I’ll post some kind of example.
-
Brian Jones
March 19, 2009 at 2:52 amI had to split the rotation velocity vector into reals and run some tests with single axis spins to get the right spin to the dynamics. Results here. It works, simplified the xpresso too, it had redundant bits given that the Solver only uses the passed Start values once (what was I thinking?).
-
Rodrigo Diaz
March 19, 2009 at 3:00 amYes its strange. But it would be nice to find a solution. It could be a one touch function, just turn on and off with easy key framing. 🙂
Are there many other operations wich depend on POSITION\ROTATION VELOSITY input?
-
Brian Jones
March 19, 2009 at 3:24 amWell my tests in the next post work but the ‘real’ solution may be in understanding matrices and what to feed to what to get a simpler solution without having to work out the ports and negating the values to get the right spin. I’ve looked at matrix math before but have never had a good enough reason to wrap my head around it (assuming that that really would be a cleaner solution to the rotation stuff, I don’t actually know that it is)
-
Rodrigo Diaz
March 20, 2009 at 12:15 amThe way I see it, you found a great solution. Im very gratefull for your effort in this. You sertanly made my day! Thanks a lot!!
Now I only got 1 question.
You know, animation is seldom made in one stroke. You have to tweak it, often many times. And since there is a solver involved, the solver needs to be cleared and baked several times also, right? I tryed that on your anim2dynamicsROT. But the solver doesnt continue the movements from the “new” position… Am I missing something?
Thanks 🙂
-
Brian Jones
March 20, 2009 at 2:20 amUnfortunately, as far as I know, you can’t get around it – the quickest way is to pull the object from the solver, Clear the solver, change the object’s animation, move to the final frame of animation for the object (if not there) and drop it back in the solver.
-
Rodrigo Diaz
March 20, 2009 at 4:14 pmok, maybe the whole thing with moving the object out of the solver can be achived, or at least be simplified with user data.
Can Xpresso move things around in the object hierarchy?
And if so, you think you could point a finger on to whitch nodes\commands are usable and I will try to make something out of it?Thanks again.
-
Brian Jones
March 21, 2009 at 1:40 amdon’t think xpresso can do that, it would take Coffee script or something like that.
Reply to this Discussion! Login or Sign Up