Hi, this is as much of a conceptual question as a technical one:
A friend of mine copied a rig of bones for a human character that has a wire parameter in the hips so that it swivels as the feet spread apart. The hip has the following expression on it:
• degToRad(atan((RF-LF)/1000)
• (RF = has the Y.pos of the right foot)
• (LF = has the Y.pos of the left foot)
• (1000 = just an arbitrary value that, through trial-and-error, worked fine in the viewport)
WHY/HOW calculating the arctangent of the difference on the position of the feet makes the hip sway that way? WHY ARCTANGENT?!?
I’m trying to study trigonometry by myself for a long time already, I know that it works, but… WHY? I still don’t grasp the concept! And just copying things without RALLY understanding doesn’t help that much…
It’s driving me crazy for som many months…
Thanks!
- Nelson Baietti
-----------------------------------------------------------------
-- how this part of the rig its done step by step:
-----------------------------------------------------------------
• Create a set of 3 bones for the right leg (thigh, calf and foot)
• Create a HI Solver (Animation, IK Solver, HI Solver) from the thigh to the foot
• Under the foot create an elliptical spline and call it “Right Foot”
• Link the IK Chain01 (the cross in the ankle created by the HI Solver) to the “Right Foot”
• Do the same for the other leg and name the spline “Left Foot” instead
• In the front view, crate a dummy, call it “Hip”, and place it between the legs, on the hip area
• Link both legs to the “Hip” (may not look good but it’s just a proof of concept)
• Now, click on the “Hip” dummy,
• Go to the tag “Motion”,
• Make sure the “Parameters” button is pressed
• Open the tab Assign Controller
• In the tree below, expand “Rotation”,
• Select “Y Rotation” and click on the button above called “Assign Controller”
• Select “Float List” from the list that opens
• Expand the Float list that has just been created on the Y Rotation
• Click on “Available”
• Click again on the “Assign Controller” button
• Select “Float Expression”
• On the new window, in the field “Name” type “RF” and click “Create”
• In the field “Name”, again, type now “LF” and click on “Create” again
• Both variables should appear on the list “Scalar” below
• On the window "Scalar", select your variable “RF”
• Click on the button just bellow called “Assign to Controller”
• Navigate on the tree until you find the object “Right Foot”:
• - Objects
• - Right Foot
• - Transform Position/Rotation
• - Position
• - Y Position: Bezier Floar
• Select it and click “Ok”
• Do the same on the other variable for the Left Foot
• On the “Expression” window type the following:
degToRad(atan((RF-LF)/1000))
• And click on Evaluate
• Move the feet back and forward, if little happens, decrease the value of 1000.
• Using “Float List” lets you rotate the hips both manually and through the expression
----------------------------------------------------------------------------------
And now, again: WHY ARCTANGENT works here?
----------------------------------------------------------------------------------
gruhn · 2008-09-22