Using Joint Scale in X to create a stretchy IK for spine, tail, neck,
or any multi joint system that requires stretchy ability.
1. create an arc length attribute for your ikspline curve:
arclen -ch true "insert name of curve"; - (do not use quotes for final command)
2. Create a multiply/divide node and name it:
createNode multiplyDivide -n spineScale_md; (use name that describes what you are setting up. Eg: tailScale_md, or neckScale_md)
3. Open connection editor and connect your arclenth attribute into the Input1 X of the multiply/divide node.
Note: MultiplyDivide nodes can be found and selected if you turn off DagObjectsOnly in your outliner. They will be located near the bottom of the menu.
4. In attribute editor, open the InputX of your MD node.
- copy and past the value from Input1X to Input 2 X.
5. Connect the Output X of your MD node to the Scale X of your root joint your chain and notice the joint change scale.
6. To fix this, open attribute editor of MD node and change Operation from Multiply to Divide. This will snap joint scale back to 1.
7. Repeat the connection process from MD node to Scale X of the rest of the joints in your chain.
Use this handy mel script to automate the process by filling in your own naming conventions.
connectAttr -f spineScale_md.outputX jjj_spine02.scaleX;
connectAttr -f spineScale_md.outputX jjj_spine03.scaleX;
connectAttr -f spineScale_md.outputX jjj_spine04.scaleX;
etc, etc, etc...