Interesting Dillema

I've created a robot character. There is a cable plugged into the back of the robots upper torso, and which then plugs into the back of the robot's head. Whenever the robot turns it's head, the cable needs to react in a way that dictates it being stuck in 2 seperate locations.

How would I go about rigging this part of the robot?

Doug

image location:
http://www.utdallas.edu/~djh022000/images/temp\_help.jpg

I'm a fan of splineIK for anything that is snake or rope-like.

Create the joint chain using a say eight to ten joints.

Skeleton-->SplineIK-->[option box]
reset settings, uncheck 'auto parent curve'

select the root joint with the pointer and then the end joint with the pointer. This runs splineIK down the joint chain. Hide your joints and IK handles and select the curve. Right click on the curve-->vertices. Select a vertice and go deform-->create cluster. Do this for each cluster. There should be four.

Make three controllers. One for each end and one for the middle of the joint chain, somewhere between the middle two cluster deformers. Parent the clusters on the end to their respective controller and then parent the two clusters in the middle to the controller in the middle. The controllers on the end will keep the joint chain stuck in place (unless you move them) and will follow what they're parented to. So you could parent the top one to the head controller and the bottom one to the chest controller (or whatever is convenient and works). You can parent the controller in the middle to perhaps the top controller.

You could also group the controllers and write a script in the expression editor so that the middle controller moves at a proportional rate to the top controller. Such as

middleControllerGroup.rotateY = topControllerGroup.rotateY / 2;

You can move the middle controller to get secondary motion on the middle of the cord. If you do not want secondary motion and want things to be very easy, you could skip the controllers all together and parent the top two clusters to the head controller and the bottom two to the chest controller. This would allow for no additional motion but would have the joint chain follow whatever is moving.

Make sure you take the splineIK and curve that was created and group them and make a group called something like doNOTmove. These should not be parented to the rig heirarchy or things go screwy.

Optional for SplineIK
To allow for stretchiness in the cord you can create some nodes to make the cord stretch beyond what would normally be possible. This also allows the rig that has splineIK to be SCALED, which is handy.

select the curve
in the command line type
arclen -ch 1;
In the hypergraph click 'input and output connections' and hit 'F' to frame the selection
find the arcLength node;
open the attribute editor and make a note of the length of the curve
in the hypershade under the utilities tab create two multiplyDivide nodes

open your connection editor
on the left load arcLength node, on the right load the first MultDiv node, MultiplyDivide1
connect the arcLength.output1x to the MultiplyDivide1.input1x
in the attribute editor set both nodes to Divide and in the first one fill in the input2x with the arcLength number you took note of

now in the connection editor
on the left load MultiplyDivide1, on the right load the second MultDiv node, MultiplyDivide2
connect the MultiplyDivide1.outputX to the MultiplyDivide2.input1x
on the left load the rig controller, keep the right the same
connect the rig.scale to the MultiplyDivide2.input2

on the left load the MultiplyDivide2 node, on the right load in each joint in the SplineIK one at a time and connect the node's output x to the scale x on the joints:
MultiplyDivide2.outputX to the yourJointName.scaleX

Now the joint chain can be squashed or stretched and the rig can be scaled.

I hope this helps. If you have any questions, feel free to email me.
tpayne21@student.scad.edu

wow, thanks for the very detailed post

.... however, I have run into a problem in movement of my robot. After grouping all objects in the scene under one group (global control), I attempt to move/rotate my robot, but all the bits and pieces that are rigged are off setting. Any ideas?

::edit::
guess i should add that I have attempted to parent the problematic pieces to anything and everything I could think of. I even tried setting IK blend to 0 and then rotating to see if i could do it manually, but to no avail. Off-setting still occured even after blend was at 0.

:: edit again ::
also note that I simply parented the IK handle (located at head end of cord) to the head. this might be what is causing difficulties?

to hair or not to hair?

QUOTE
wow, thanks for the very detailed post

.... however, I have run into a problem in movement of my robot. After grouping all objects in the scene under one group (global control), I attempt to move/rotate my robot, but all the bits and pieces that are rigged are off setting. Any ideas?

Sounds like you're having double transformations. The mesh (geometry) should never be parented to the rig controller or any other part of the rig. It should be in a group by itself.

All of your main controllers should be parented to a single controller or locator named 'rig'

QUOTE
::edit::
guess i should add that I have attempted to parent the problematic pieces to anything and everything I could think of. I even tried setting IK blend to 0 and then rotating to see if i could do it manually, but to no avail. Off-setting still occured even after blend was at 0.

:: edit again ::
also note that I simply parented the IK handle (located at head end of cord) to the head. this might be what is causing difficulties?

The IK handle should not be parented to the rig. I usually take both the Spline IK handle and the Spline curve and put them into their own group. It should not be parented to anything.

You may need to implement the stretchy fix that I had labeled as optional for the rig if you haven't already and make sure those MultiplyDivide nodes are set to Divide. I can't remember if you can rotate a character without adding the fix for the splineIK. I always add it anyway. It's not that complicated and takes about ten minutes to implement the first time you try it.

So you're saying that Joints and IK should be in groups 1 and 2. and global control should control everything else? Can I put groups 1 and 2 under global control?

if you disamle trasform inheritace of the other group.