Spline IK seems to break after saving out the file and reopening it

aldentesinferno
Participant
Participant

Spline IK seems to break after saving out the file and reopening it

aldentesinferno
Participant
Participant

So I'm not super experienced with rigging, but I'm messing around with making an auto-rigger in order to get better at it.

Currently, I'm attempting to generate some IK spine controls; I have some control curves that drive some clusters that are attached to the CVs of a spinal curve that drives the bind joints through Maya's IK Spline system (plus some node math that uses the length of the spinal curve to do some squash/stretch stuff).

When I first generate the controls using my script (which just uses cmds and openmaya, no outside plugins or anything) they work as I expect, however, when I save out the scene and reopen it, the bind joints no longer follow the spinal curve.
The working version:

aldentesinferno_0-1698527290705.png

The not working version:

aldentesinferno_1-1698527305778.png

 

As near as I can tell, both scenes are identical except for the ikHandles, which appear to have the exact same parameters except the ikHandle in the saved-out scene stays in it's original position, has disappeared from the viewport (even after clicking "show all" and messing around with that stuff), and has an empty bounding box.

original bounding box:

aldentesinferno_2-1698527594919.png

saved bounding box:

aldentesinferno_3-1698527606866.png

 

I'm really kinda' stumped here and am half-considering attempting to make like a custom solver or something, but that seems like a lotta work I don't want to do.

 

(Also, as a secondary question: why are the bounding box fields always marked blue? They don't seem to be constrained/connected to anything as near as I can tell)

 

Thanks in advance!

(oh and screenshots showing the effectors and the rest of the outliner:

aldentesinferno_4-1698527785882.png

aldentesinferno_5-1698527800604.png

 

Reply
Accepted solutions (1)
343 Views
2 Replies
Replies (2)

aldentesinferno
Participant
Participant

I suppose, also, I should upload the file in case anyone wants to look at it.

0 Likes

aldentesinferno
Participant
Participant
Accepted solution

Okay, so I fixed the issue by getting rid of any intermediate transforms between the joints being driven by the spline IK, so they're all alone together in a chain.

 

I'm not sure I like this fix, because I have to layer additional transforms (like squash and stretch scaling, moving the joints so the chain is the same length as the control curve as it stretches, etc.) in the Node Graph rather than the outliner, which breaks the convention I've been using and feels harder to debug.


Alls well that ends well, but I guess I would like to know why the issue came up still though.  The Spline IK tool does require that the joints you're setting up to be driven be in a simple chain with no intermediate transforms between the joints, but if you add those transforms after you create the spline IK it doesn't seem to object and everything works as expected.  It's only after you save out the file and open it up again that things break, so maybe its an issue with the way the spline ik system keeps track of the joints it's controlling?  The spline IK handle only has the starting joint and the end effector as settable attributes, so maybe it's only saving those and tries to get the joints in-between when it is first created/on scene load, and the code for that can only do that if the joints are in a simple chain?

0 Likes