FBX Animation doesn't export when using referenced multi mesh character rig

FBX Animation doesn't export when using referenced multi mesh character rig

Stefmon
Contributor Contributor
5,728 Views
4 Replies
Message 1 of 5

FBX Animation doesn't export when using referenced multi mesh character rig

Stefmon
Contributor
Contributor

Ok, so this is an issue I've encountered for a few months now. Hopefully someone can drop in an insight. (pics and vid at bottom) (I tried a DAE export and it didn't help. Also that doesn't explain the issue)

 

Scenario 1

I model a character 

I reference the model file and I rig it

I reference the rig file (the model is included) and animate it

I export the animation to an FBX 

Result - The mesh is exported, it has an animation, but the mesh does not move. It stays in it's first frame. 

 

Scenario 2

I model a character (it has 2 meshes and 1 rig)

I reference the model file, rig and animate it.

I export the animation to an FBX

Result - only one of the meshes has the animation applied.

 

It's not the usual "have you selected the right things, have you ticked the right export boxes" issue. Something else is up and I think it's the referencing. Is there something I need to tick in the reference menu? That's the only thing I can think of right now.

 

Thanks either way,

Stefan

 

Below is the video and pics. It's a really basic block model but the same principle would apply for a fully developed game character. This is a multi mesh model I was testing stuff on. The body and the book are separate models with a shared rig. You can see how the book acts in the vid. It's gotta be a reference issue 🤔

 

https://youtu.be/4FyHHz4lMEs

 

Stefmon_3-1595422903238.png

Stefmon_4-1595422947546.png

 

0 Likes
Accepted solutions (1)
5,729 Views
4 Replies
Replies (4)
Message 2 of 5

Stefmon
Contributor
Contributor

Ok, here's an update. I made a new, good, rig using Rig Studio 2.0 and made a new 2 Mesh character.

I didn't reference the character more than once (only the rig referenced into animation scene) and I bound both meshes to the rig at the same time while skinning.

 

Still the problem remains.

Referencing is somehow part of the issue. When I export an animation from the rig directly (without referencing it into a scene) it works fine. It's not a Unity problem. The results in Unity and in FBX review, or when re-inporting the FBX back into Maya, are all the same.

 

Below is a video showing this once more with the new rig and meshes. 

I can't tell whether the joints for the sword are not animating or the sword mesh simply doesn't export it's weights. It's on or the other. I also don't know weather there are some options that need to be ticket when creating the reference, in order for it to work better as fbx exports.

 

0 Likes
Message 3 of 5

Stefmon
Contributor
Contributor
Accepted solution

Here are some solutions to the above issues. The issues are listed anew as well.

 TLDR:

  • Don't reference a reference
  • Skin all the geometry pieces to the skeleton at the same time
  • Export your rig with ALL the joints you need selected, not just the topmost
  • Unity ignores extra joints if you switch the rig type's setting to Humanoid Skelleton (no solution yet)

 

Problem -

  1. Exported FBX character rig and animation has no animation, but still has animation clip (in which nothing happens).
  2. Exported FBX character rig and animation made up of multiple objects (e.g. body, sword, hat and accessory all exported with the rig at the same time) has animation clip but only on one of the two objects is animated.
  3. Exported FBX Character rig and animation made up of multiple objects have animation when played in maya or FBX review but not in Unity when using Humanoid Skeleton.

Reason for Problem and Solutions -

  1. This issue occurred because of bad practice during rigging when using references.
    I made the Geo, then referenced that into a scene and rigged it. Then I referenced the rig and geo into yet another scene for animation. That must have caused some export issues with the skin.
    Solution: Don't reference a reference. Reference the finished rig scene that has both the rig and animation into a new scene for animation. 

  2. This issue has two reasons. One is that the extra object was bound to the skeleton at a different time from the body. (lets say a book floating in front of your mage character with its own extra joints connected to the root of the character skeleton. You bound the body to the skelleton, then you bound the book to the skelleton, then you animated them. The exported FBX doesn't apply the book's animation, only the body's.)
    The second reason is that when exporting to FBX,
    only the topmost joint was selected, and not every single bound joint. This leads to problems.
    Solution: Make sure that you bind all objects to the skeleton at the same time. That means shift-clicking every joint you want to bind, as well as shift clicking all the objects that are to be bound. All the joints and objects are selected and the skin is bound at the same time. 
    AND when exporting the rig or animation, select all skinned joints, not just the single topmost joint. Also select the joints first, then the geo. 
     
    Untitled.jpg

  3. This is a Unity specific issue and I don't think is replicated in Unreal (have yet to try) 
    Essentially, with all the above issues sorted, things should work fine, and they do.
    Except if you switch the Asset's Rig Type setting from Generic to Humanoid Skelleton. Then unity doesn't read the extra joints as part of the rig and ignores their animation. The multiple objects the character is made of are not the cause anymore. It's the fact that they may be bound to extra joints which Humanoid Skelleton ignores.  
    No Solution Yet: I haven't been able to find a way to get around this. One forum post said it was impossible. You could just export the extra asset separately, but then you would need a duplicate of the animations too, and set them to generic. That seems pretty impractical. Well, this one goes to the unity forums.

And that's it! I hope anyone that comes across these issues can use these fixes. If you spot something that I'm wrong about do let me know. Also if anyone has ideas about the Unity Human Skeleton issue then hit me up. 

Have a good one 👍

0 Likes
Message 4 of 5

Stefmon
Contributor
Contributor

above is an answer with a lot of good practices for fixing bad unity exports, but also make sure you remove the namespace from your referenced rig before exporting the animation. Also don't save after removing the namespace and exporting it, just close the file without save. Here is a link to a post that explains this in detail : 

https://forums.autodesk.com/t5/maya-animation-and-rigging/maya-is-not-letting-me-delete-a-namespace/...

0 Likes
Message 5 of 5

Stefmon
Contributor
Contributor

ALSO - make sure that when you remove the prefix from the animation file's contents, you do so for everything and not just the skeleton.

0 Likes