View Full Version : Spring Controller
devotchka 02-18-2005, 01:10 AM I'm trying to set up a character so that his belly bounces a bit when he's animated. I'm using Character studio, and i have an additional box placed at his middle (which the spring will be applied to). A Dummy links to his spine, and the box links to the dummy. The box is also added to the skin so that the vertices i want are affected.
I'm using a spring controller on the position track of the box, to give the bouncyness, however, i cannot figure out a way to keep the box from travelling in directions i dont want it to (like inside him and behind him). There does not appear to be a way to apply the spring controller to only one position track. It would be nice, for example, if it would only bounce up and down.
My question is, is this a typical way of setting this up, or am i doing it all wrong? any suggestions?
Thanks
|
|
I'm trying to set up a character so that his belly bounces a bit when he's animated. I'm using Character studio, and i have an additional box placed at his middle (which the spring will be applied to). A Dummy links to his spine, and the box links to the dummy. The box is also added to the skin so that the vertices i want are affected.
I'm using a spring controller on the position track of the box, to give the bouncyness, however, i cannot figure out a way to keep the box from travelling in directions i dont want it to (like inside him and behind him). There does not appear to be a way to apply the spring controller to only one position track. It would be nice, for example, if it would only bounce up and down.
My question is, is this a typical way of setting this up, or am i doing it all wrong? any suggestions?
Thanks
The easy answer is, wait for it...yes!
Explaining it is far harder. You can't apply a spring controller to a single axis directly. There are X,Y,Z values for the spring controller but that is world space. You could dial down X and Y and only get bouncing up and down but when the character bends over the spring will be passing into him.
What I do is set up a system where I can pull the local values from an object that is controled by a spring. So here is the set up in a hut shell.
Three objects.
A = the spring controled object
B = Parent object of A
C = Final controled object
Align in position and orietation A to B and then link A to B so that B is the parent.
Create an extract transform helper and pick A as the extract node.
Now you can wire the X,Y and Z position values of C to the local extracted values in the extract transform helper node.
Here is an example of a test I did that used this method to drive rotations with springs. Only the first bone in the chain is animated. The rest are using local springs to drive rotations.
http://paulneale.com/temp/10springBones.mov
The next trick gets...well...trickier:S
What I do is use script controllers instead of wires to create velocity checks for the spring and ramp the values up and down based on the speed that the object is moving at. This stops the over shooting that happens when the character moves to fast and the spring is left far behind for a few frames and then catches up and shoots past the object as it stops. You can write this expression on the weight of a list controler or a few other places depending on what kind of control that you want.
Here is an example of that working.
http://paulneale.com/temp/gp2/BullRig.avi
I'm not sure that I can show the skinned version at this time but I will once I have the release on it.
azozel
02-18-2005, 02:15 PM
Dang! Paul that's a sick rig man. I likes it. The noodely bone rig think is sweet too!
steev
06-03-2005, 11:00 PM
What I do is use script controllers instead of wires to create velocity checks for the spring and ramp the values up and down based on the speed that the object is moving at.
hey, paul. bugging you again...:rolleyes:! could you share the math you use in those script controllers for the velocity check? i'd really appreciate it. thanks!
CarlosA
06-05-2005, 06:42 AM
a very simple way of limiting the secondary motion is to have the spring drive a bone with an ik. this way you can set limits on the bone throught the motion panel.
but you won't get the nice smoothing that pual system has.
cheers,
Los.
Well Steev, better late then never but I have uploaded to my site two functions. One is a Hermite function where you can define the curve with two inputs and pass it a value and it will return the corrisponding value along that curve, and the second is a clamp range script that will take any range and convert it to any other range and even invert the range. You pass it a value and will return the corrisponding value for the new range. Use the clampRange FN to clamp any range down to 0 to 1 to pass to the Hermite function. You can then use all this to help drive and ramp spring controllers.
http://paulneale.com and go to scripts.
steev
06-07-2005, 04:01 PM
thanks a bunch again paul! i imagine i'll be crosseyed by the end of the day getting this set up.:argh:
wish me luck!
CGTalk Moderation
06-07-2005, 04:01 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.