Reply To: Robot RIG strange behaviour

Forum Archive Robot RIG strange behaviour Reply To: Robot RIG strange behaviour

#31507
danpro
Participant

    Thanks for the kind words, but my status as a “god” has been greatly exaggerated. My proof is, Wayne had a better comprehension of your end goals. I completely missed that you wanted to rig this for Unity. So, I will retract my suggestion to use bendy bones and regular IK. With that said, I am still not sure if this solution will work for you as I do not rig for Unity. I have no idea how using curves and spline IK will convert when you import from Blender to Unity.

    Wayne has given the solution, so I just went ahead and packaged it up with the changes to your spline IK file. I did change some things in your file to make it a bit easier to work. The first three scene layers have the mesh objects, (#1-Main non deforming arm meshes, #2-Curves, #3 Pipe meshes) The second row of scene buttons have the armatures (#11-ControlRig, #12-SplineRig)

    Some changes to the ControlRig:

    1. Parented the curves to the root bone (Base)

    2. Added new bones to control the curves and parented them to appropriate bones. 

       LowerSpline.001-004, parented to Horizontal_Rotator

       LowerSpline.005, UpperSpline.001-003, parented to Arm_Rotator

       UpperSpline.004-005, parented to Vertical_Rotator

       Feel free to change the parenting of these hook control bones if you do not like the deformation of the curves. This is what looked good to me with minimal testing.

    These new bones replace the empty objects used for the hook modifiers. 

    Note: To hook a curve to a bone, select the bone you want to hook to (armature in Pose mode), Shift select the curve, Tab into edit mode of the curve, Select the vertices you want to assign to the bone, CTRL-H, Hook to Selected Object Bone. 

    3. Removed all spline IK bones and separated them into their own armature. Renamed SplineRig.

    4. Some clean up on translation locks for all bones. (Locked scale for most bones, switched to Euler rotations for bones that only need to rotate on a single axis.)

    SplineRig:

    1. Only contains the bones for each spline IK chain.

    2. Pipe meshes are parented to the SplineRig with Armature Deform. Preserve Volume is enabled on the armature modifiers to help with deformations.

    3. SplineRig is parented to the ContolRig, Object to Object parenting so the spine rig does not get lost.

    4. An object constraint was added to the SplineRig  to copy the scale of the ControlRig Base bone. This was the only way to get the Base bones scale transforms to scale the pipe meshes correctly.

    5. The SplineRig can largely be ignored, left in object mode, and hidden on an unused scene layer.  

    I would add action constraints to the Upper and Lower Spline controls to aid in deformations when the arms are bent to extreme angles if you want to automate the deformations a bit.

    File: http://pasteall.org/blend/index.php?id=47954

    Good luck!