Hi - okay, so the problem I have is this:
I have tried a test in Maya with just two joints - the same thing happens: I can create my export joints, but parenting them will result in LRA's changing. So it looks like it is not an issue with my rig, but rather something in Maya I've setup incorrectly?
I hope it makes sense ๐
Above: you can see the local rotation axes changing when I parent the joints (this should not be possible, since each export joint is parent constrained to the original rig joint so I dont understand what's going on) ๐
Solved! Go to Solution.
Here is a little test scene where I've tried troubleshooting things.. maybe it's easier to see here: the 3 separate joints are driven by the smaller joint chain.. parenting totally screws up their local rotation axis - once I unparent the joints, the LRA is back to how it should be
I believe this is how Maya works. Create a joint chain. Notice that when you create the next joint, the orientation of the parent joint changes. The joint orient values change based on the options you've set for the joint creation process. It's dependent on the child joint. If you notice in the script editor, there's an additional command that's run.
joint -e -zso -oj xyz -sao yup joint1;
So it would follow that parenting joints would have a similar effect...changing the orientation of the joint. But the results would be a bit more "unexpected" since it wasn't created as a single chain to begin with. And the above command isn't run. So I guess the take away is if you want the result to be a joint chain, create it as such instead of parenting individual joints.
Hi ๐ Thanks for your reply.
I may not have explained very well what I'm after.
I have a "messy" skeleton which is used for the rig I'm doing. This skeleton contains all manner of stuff I don't want exported to the game engine (such as no-flip IK joints, duplicate FK/IK arm chains, superfluous joints, etc.)
Using a python script, I create a clean export skeleton which contains ONLY the joints that need to be skinned to my mesh. These are parent constrained to the "messy" joints, resulting in a bunch of standalone clean joints that can be exported to the engine with no clutter.
My issue comes when I try to parent the clean joints back together. That's when the orientation changes - which should not be possible, since they are parent constrained to the original messy joint. That's the core of my problem: I don't understand how this can happen, when the clean joint has a parent constraint from the messy joint.
Another note: if 1) I remove the parent constraints from the clean joints and then 2) parent the clean skeleton together, and then 3) reapply the parent constraints - everything works as it should. The messy skeleton drives the clean one, and it can be exported clean to the game engine.
Perhaps there is a bug in Maya 2018 relating to python? Or perhaps relating to parenting while a node is constrained?
Joints are unlike transform nodes in that they have a "jointOrient" attribute. This is what's causing the issues you are experiencing. That's why it only works the way you described. With constraints in place, the joint orientation is probably unable to be set correctly.
hmm.. well - I tried using a point + orient constraint instead of a parent constraint. That worked fine - so it seems like it is something specific to the parent constraint - perhaps some flag in the python script that is missing, so the script is not behaving as it should (although I find that hard to believe given the person who gave to me knows his stuff) ๐
I do have a test scene I could attach ..
Okay.. so here's what I ended up doing.
Instead of using a parent constraint when creating the export skeleton, I used a point constraint and an orient constraint. This works, and the joints don't change their orientation when I parent the skeleton back together.
One issue is, it does not take scale into account. To get around this, I went into the node editor and linked the scale of the main control to the scale of the export skeleton's root joint.
Can't find what you're looking for? Ask the community or share your knowledge.