PDA

View Full Version : MotionDynamics Constraints?


Tab32
10-23-2005, 09:46 PM
I am have got a good effect for the dreadlock hair flopping using MotionDynamics on my bones with Min and Max constraints set in the Inverse Kinematics block. I am trying to find and expression that will do the same think as the IK block. I have tried the Clamp expression, but it doesnít give me the same effect. I need to apply sliders to the min and max constraints so I can animate them. Anyone have any ides?



Any help is appreciated,

Terry

Tab32
10-24-2005, 06:16 PM
Here is motion test of my what my effect so far.



http://12forward.com/newsgroupsUploads/PinappleMotionTest.mov



I have a bone chain in each leaf with MotionDynamics and Min and Max constraints set in the IK block. I really need to be able to control this effect. Does anyone know how to set keyframes on the min and max constraints? I can set an expression for the stiffness, but it doesnít give me enough control. If anyone knows how to get this same effect some other way with more control, I would love to know how.



Thanks,

Terry

Wegg
10-24-2005, 07:21 PM
That looks great! What happens on slower motion though? Like if he were to tile his head to the left really fast but then hold it there for 30 frames? Does it jiggle?

Suricate
10-25-2005, 06:13 AM
That looks promising, Terry!


I have a bone chain in each leaf with MotionDynamics and Min and Max constraints set in the IK block. I really need to be able to control this effect. Does anyone know how to set keyframes on the min and max constraints? I can set an expression for the stiffness, but it doesnít give me enough control. If anyone knows how to get this same effect some other way with more control, I would love to know how.

I think the only way to control the 'min' and 'max' values is by digging in the SDK. If you are interested, I will have a look at how it can be programmed.

maks
10-25-2005, 11:32 AM
Hi, Mark Wilson wrote a plugin some time ago called DynamicFunc, wich allows you to set dynamic IK limits, among other things.
http://www.zoogono.com/plugindetail.cfm?pid=30

Haven't tried it for IK limits yet myself, but I think that's what you might be looking for...

Looking cool btw :)

Suricate
10-25-2005, 01:33 PM
Hi, Mark Wilson wrote a plugin some time ago called DynamicFunc, wich allows you to set dynamic IK limits, among other things.
http://www.zoogono.com/plugindetail.cfm?pid=30

Haven't tried it for IK limits yet myself, but I think that's what you might be looking for...

Looking cool btw :)

Dang, I missed that one! That plug-in should do the trick. Anyway, if anyone is interested in yet some more IK related expressions, have a look the attached file. It contains expressions 'IKUseChannel' (for enabling an IK channel and enabling limits), 'IKMinMax' for setting min/max limits and 'IKStrength' (for setting strength and direction). Source code is included.

Tab32
10-31-2005, 04:35 AM
Dang, I missed that one! That plug-in should do the trick. Anyway, if anyone is interested in yet some more IK related expressions, have a look the attached file. It contains expressions 'IKUseChannel' (for enabling an IK channel and enabling limits), 'IKMinMax' for setting min/max limits and 'IKStrength' (for setting strength and direction). Source code is included.

Suricate,
WOW did you right that plugin for me? Thatís so cool.
Only played with it a little, but it seems to work great. If I ever get a chance to meet you - the beer is on me.



That looks great! What happens on slower motion though? Like if he were to tile his head to the left really fast but then hold it there for 30 frames? Does it jiggle?

I posted some other motion tests showing what happens after the animation stops. It doesnít come to a nice stop yet, but it does giggle. I think the dynamics on all the bones is fighting itself. I hope that I can get a better effect with some of the motion dynamic and spring settings. Does anyone have any ideas of how to make it come to a nice natural stop?


http://12forward.com/newsgroupsUploads/PineappleTestSideSide.movchrome://targetalert/content/skin/new.png (http://12forward.com/newsgroupsUploads/PineappleTestSideSide.mov)


http://12forward.com/newsgroupsUploads/PineappleTestTwist.movchrome://targetalert/content/skin/new.pngchrome://targetalert/content/skin/new.png (http://12forward.com/newsgroupsUploads/PineappleTestTwist.mov)


Thanks for everyoneís input,

Terry

Suricate
10-31-2005, 09:12 AM
No problem, programming that plug-in was rather easy. :)

Maybe it's an idea to use an expression to fade out the motion dynamics when the springs should come to a stop. You can use the 'CycleBranchMorphFrame' expression for that. I attached a scene that is a slight modification of the 'LittleMan' scene from the sample files. I added a slider and an expression which has the effect that the rotation values of the leg bones fade towards their values at frame 0 when the slider has a value of 1.0.

DMack
10-31-2005, 10:15 AM
Hi Terry,

The dreads strike me as being very similar to antennae (though a few more than you'd expect!). I spent some time coming up with a solution for antennae and also got some good help from other forum folk (Boris Goreta). In the end, dynamics on IK chains prooved too unpredictable and so I used an IK chain per antennae and got them to target nulls that had motion dynamics attatched (so motion dynamics on a single Null, NOT the bone chain). It worked a treat - search the forum for 'antennae' - I think it might help. I'm a bit tied up at the moment but if I get some free time, I'll try and explain a little more clearly.

Hope that helps

David.

Tab32
10-31-2005, 10:30 PM
No problem, programming that plug-in was rather easy. :)

Maybe it's an idea to use an expression to fade out the motion dynamics when the springs should come to a stop. You can use the 'CycleBranchMorphFrame' expression for that. I attached a scene that is a slight modification of the 'LittleMan' scene from the sample files. I added a slider and an expression which has the effect that the rotation values of the leg bones fade towards their values at frame 0 when the slider has a value of 1.0.

Ok, I understand the way this works, but puts my leafs back strait up in the air. Is there anyway to make this work with sliding the pose back to a position that was created by the dynamics? Like say instead of frame 0 you used frame 20 in the example you posted. It did not work for me, but maybe there is something I don't understand. If so I think this could work.

Thanks so much for your help,
Terry

Suricate
11-01-2005, 10:00 AM
The 4th parameter of the 'CycleBranchMorphFrame' expression is the frame the expression gets the rotation/position/scaling from. If this frame is the current frame, the procedural motion is taken, otherwise the keyframed motion. As the leafs are controlled by the dynamics, the only keyframed motion is the one at frame 0.
To change that, you can do:
1. Disable the expression
2. Run the animation with the dynamics until you find a frame 'n' where the leafs are in a sutiable end position. Keyframe the motion for the hierarchy in that postion.
3. Enable the 'CycleBranchMorphFrame' expression and set as the 4th parameter the frame 'n' that you used in step 2.
4. When the 5th parameter of the expression is 1, the hierarchy will morph into the keyframed motion at frame 'n'.

Tab32
11-03-2005, 06:25 PM
The 4th parameter of the 'CycleBranchMorphFrame' expression is the frame the expression gets the rotation/position/scaling from. If this frame is the current frame, the procedural motion is taken, otherwise the keyframed motion. As the leafs are controlled by the dynamics, the only keyframed motion is the one at frame 0.
To change that, you can do:
1. Disable the expression
2. Run the animation with the dynamics until you find a frame 'n' where the leafs are in a sutiable end position. Keyframe the motion for the hierarchy in that postion.
3. Enable the 'CycleBranchMorphFrame' expression and set as the 4th parameter the frame 'n' that you used in step 2.
4. When the 5th parameter of the expression is 1, the hierarchy will morph into the keyframed motion at frame 'n'.

Christopher,

This sort of works. I can set a key frame fine, but when I animate the morph amount control, my bones kind of fly up (very unnatural) as they morph into position. Itís kind of like the motion dynamics is a little different every time the animation plays threw. Is there anyway around this? Or a way to bake the motion in? Iíve played around with this a bit with no luck.



Thanks,

Terry

pelos
11-03-2005, 08:29 PM
hi, nice plugs, and a intersting thred

what i can think for this motion

is play with motion dynamics aplied to the end of a IK chain, (the goal, can be a null)
and add a key fader expression to the IKgoal, so you can have all the dynamics motion but when the pinaapple stop dancing you can control the stop of the motion manually,
(i am not im my pc right now to show you a scene, i will try to get you one as soon as i can =)

Tab32
11-03-2005, 11:57 PM
Hi Terry,

The dreads strike me as being very similar to antennae (though a few more than you'd expect!). I spent some time coming up with a solution for antennae and also got some good help from other forum folk (Boris Goreta). In the end, dynamics on IK chains prooved too unpredictable and so I used an IK chain per antennae and got them to target nulls that had motion dynamics attatched (so motion dynamics on a single Null, NOT the bone chain). It worked a treat - search the forum for 'antennae' - I think it might help. I'm a bit tied up at the moment but if I get some free time, I'll try and explain a little more clearly.

Hope that helps

David.

David,
I have posted a messiah file with the objects with the same animation, One has MotionDynamics on the bone chain and one just on the goal of an IK chain. The IK version has default setting, but I have spent many hours playing with them with no real luck. I get a much better look out of the bone chain. It stops nice with one leaf, but not so nice with many, and I need about 50. I would like more input on making the IK version work better. I followed your thread at:



http://forums.cgsociety.org/showthread.php?t=205012



I am looking for a dread lock hair type movement on the leafs, and others have commented on the IK goal approach, but as you can see it doesnít look as good as the alternative. This approach would be easier to set up and manage, but I will ultimately go with what looks best.


I posted the file here:


http://12forward.com/newsgroupsUploads/Leaf_MotionD_and_IK_.mpj



Thank for your help,

Terry

Suricate
11-04-2005, 08:21 AM
Christopher,

This sort of works. I can set a key frame fine, but when I animate the morph amount control, my bones kind of fly up (very unnatural) as they morph into position. Itís kind of like the motion dynamics is a little different every time the animation plays threw. Is there anyway around this? Or a way to bake the motion in? Iíve played around with this a bit with no luck.



Thanks,

Terry

Hi Terry, I've tested the 'CycleBranchMorphFrame' expression with your scene and there might be indeed a slight hiccup at the frame that is keyframed. I think the trick is that after keyframing the motion at a frame 'n', you should move those keys to another frame that is not used in the animation. That way you avoid any interference.
I modified your scene slightly, see below. I keyframed the motion at frame 89, but then moved the keys to frame -4 . The 'CycleBranchMorphFrame' expression with the slider refers to frame -4 then and the motion comes to a stop at frame 89.

Tab32
11-04-2005, 06:06 PM
Hi Terry, I've tested the 'CycleBranchMorphFrame' expression with your scene and there might be indeed a slight hiccup at the frame that is keyframed. I think the trick is that after keyframing the motion at a frame 'n', you should move those keys to another frame that is not used in the animation. That way you avoid any interference.
I modified your scene slightly, see below. I keyframed the motion at frame 89, but then moved the keys to frame -4 . The 'CycleBranchMorphFrame' expression with the slider refers to frame -4 then and the motion comes to a stop at frame 89.

Christopher,

Thank you so much for your help. These works great with 1 leaf, but not so good with many.

I should have posted you a move complex example. I am posting one now that has 9 leafs and is a much better example of my rig. The final will have about 70 leafs. If you have time could you please take a look at it to see if I am doing something wrong, or you have any other suggestions?

http://12forward.com/newsgroupsUploads/PinappleRig_CycleBranch.mpj



Thanks again,

Terry

Tab32
11-11-2005, 01:32 AM
I found a solution.

http://www.12forward.com/newsgroupsUploads/HairTest_BankAtZero.mov

I did not have IK checked on for the bank of all the bones. When I turned it on and set Min and Max to zero everything comes to a nice stop. So I did not need CycleBranch at all. I have a much more complicated version working with about 60 leafs and sliders to control Min and Max, so it has a lot of control.
I will post it when I get a test rendered. Thanks everyone for your help. The people on this list really are great.

Terry

pelos
11-11-2005, 02:32 AM
hey! very nice, i would like to see a scene =) i really like how it stops

CGTalk Moderation
11-11-2005, 02:32 AM
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.