k, I want to make sure that I have a vague idea of what I’m doing here.
So I need to export an mGear rig with animation to an FBX which will be imported into Unreal 4. Currently we’ve just been exporting the bind skeleton and the mesh. That seemed to be “working”, but upon closer inspection from our animation lead I had failed to note that the bind skeleton has custom mGear nodes which resulted in a shearing issue with scaling when exported to FBX.
So there’s the gameTools.py which looks to address this issue under the shifter folder, but it looks like it still needs some work, so I’m trying to fill in the blanks.
- Duplicate the bind skeleton
- Disconnect the Parent Inverse Matrix from the joints of the duplicate bind skeleton
- Scale and parent constrain the duplicate bind skeleton to the source bind skeleton
- Bake the animation to the copy of the bind skeleton. Now that think about it this shouldn’t be needed if the FBX Exporter is baking the animation to begin with.
- Export the duplicate of the bind skeleton as an FBX
Am I missing anything here?
Having looked at the code again I think I understand the process you’re doing now, maybe.
- Export a “clean” version of the skeleton without the Parent Inverse Matrix connections
- Importing or Referencing that clean version back into the scene
- Scale and Parent constrain the clean skeleton to the source skeleton
- Export the constrained clean skeleton as an FBX?
K, I take that back, I’m not sure of the process the code is trying to do.
Why save out a copy of the Parent Inverse Matrix connections? It seems simpler to dupe the bind skeleton and break Parent Inverse Matrix connections and constrain the whole thing back to the source skeleton. That way you can just remove dupe later without affect the rig or animation. What is the benefit of saving that data? Am I dirtying up the scene duping the bind skeleton or something?