Working With FBX Files + Imported Meshes

Hi,

I’m struggling to get a loaded mesh to animate at runtime. Here’s what I’m working with:

  1. FBX File: Contains a skeleton, mesh, avatar, animator, and skinned mesh rendererer
  2. Multiple Meshes (stored as asset files)
  3. A custom component called “Character Model”, which contains an animator, skinned mesh renderer, and a skeleton (the skeleton GameObject is a parent to the root joint).

I have stored the FBX’s skeleton as a prefab, so I can instantiate it at runtime for multiple poses, based on the game’s requirements. I have also prefabbed my Character Model component, so I can render multiple meshes.

For the FBX, the rig has a Humanoid animation type (even though it’s coming in as generic - I overwrite this), the avatar definition is “Create From This Model”, and when I configure the avatar definition, I simply select “Automap”. For the animation, the animation type is also Humanoid, the avatar definition is “Copy From Another Avatar”, and the source is the FBX’s avatar.

My steps to animate a mesh are:

  1. Instantiate a new Character Model
  2. Instantiate a new Skeleton
  3. Load a mesh
  4. Update the Character Model’s Skinned Mesh Renderer with the root joint of the skeleton (I make sure the GameObject is named “root_JNT” - this is required by our animations), and the loaded mesh

What I end up getting is a character in the T-Pose, subtly animating the root joint. The animation I’m providing is an idle animation, and has the character rotating (slightly) about the y-axis. It also has his hands by his side (instead of in the T-Pose).

So, any ideas as to what I’m doing wrong, and my I can’t pose my custom meshes? This is difficult to debug, and I’m not quite sure where to start? Do I have a bone weighting issues? Are my bind poses off?

Any tips/suggestions would be greatly appreciated.

Thanks!

Brennan

Hey Brennan
I’ll give you some troubleshooting tips and you can relay back the results and a solution if you figure it out.

I would start by re-importing everything you have and confirm animations coming in when you import the fbx’s.
Secondly I would NOT setup a prefab until you get your character working. That just adds a small extra layer of complexity which - if you remove the prefab setup from the equation - can be eliminated as a problem.
Once you re-import everything and you confirm the animations come in with the fbx files I’d setup a simple state machine.
Not sure about this next part (been working in Max for 3 straight months so another animator can correct me if I’m mistaken) I believe the state machine can be included in the prefab - so after the state machine is setup and working correctly then you can proceed to create a prefab of the character.

Let us know if you figure it out. Character issues are usually resolved by a iterative process of elimination.