Animating with a Referenced Model in Maya

Hello,

After a lot of searching I’ve seen similar questions asked repeatedly but I haven’t seen an answer. I’m asking this again because I think it’s very important and I haven’t been able to find a solution after searching and trying numerous ideas.

What I’m trying to accomplish is:

Here’s what happens:

  • I make a base model / rig file. Let’s call it “”. I export this as an FBX into my Unity asset folder.
  • I make a new Maya file for animating and reference in .
  • Maya adds a namespace prefix, “:”, to the referenced elements in the DAG.
  • I animate some bones in that file.
  • I export to FBX, using the @ convention.
  • Unity picks up on the fact that the animation from the animation FBX file should be associated with , just like the documentation says. The animation clip is added to the prefab for .
  • At runtime, playing the animation on does nothing.

Why is this happening? Is there any way to use Maya references in this way with Unity?

Copying and pasting the model and rig into each individual animation file is unacceptable on a large project with many animations where the rig may have to change. My team really doesn’t like the workflow of doing all animations in one file using different frame ranges. That method doesn’t scale to multiple animators.

I dropped both the prefab and the @ prefab into the scene. The latter animates while the former does not. Both of them have the same animation clip set in their animation component. Here’s what a simple test hierarchy looks like.

I would expect that “test” would be animating, since it is referencing the animation clip from “test@bounce” in its animation component. Unfortunately, it isn’t. On the other hand, “test@bounce” is animating. (Normally I would never put “test@bounce” in the scene hierarchy. I’m only doing that as a test to compare the two.)

If I had to guess, is this being caused by the namespace in the reference? Does the animation clip exported no longer know how to find the correct transforms on ? Is there some secret FBX export voodoo to make this work?

Any help is greatly appreciated.

Mark

In the model file you need to remove the rig and keep joints + model only.
And in the animations file, only joints left keeping the exact same joint hierarchy.

It works just fine in this way.

I made a super simple test using two joints and parenting. If you or anyone else has a few minutes, could you please take a look and give me an idea of what is wrong? Again, any help appreciated.

I’m using Unity 3.4.2 and Maya 2011. In this test I skipped manual export of FBXs and just used the MB file directly.

Here’s the download for my test project: 739151–26980–$ReferenceTest.zip (280 KB)

Hmmm well, many people use their MB file directly into Unity but I am definitely against :slight_smile:

I am sorry, are you trying to export References?
Into the …@…mb file, the skinned models seems to be a Reference… isn’t it?

I understand now your title “Referenced Model in Maya”.

But I am not sure you can deal with, that could be a very important source of problem if you have to change the referenced model O_o…
All your animations could be broken!!!

As you can see, Maya renames all the joint hierarchy using the XXX:XXX form.
This provide different names from the main model.

That is very important the name of your hierarchy from your skinned model and animation data only keep the same name flow.

If you still want to deal with References into Maya, you can for sure to write a mel script that is break the reference and rename joints before to do a FBXExport; That shouldn’t be difficult o_<

Your guess is correct, this is caused by the different names on your base and your references. Maya is a real pain this way. :slight_smile:

What you need to do is export your Unity base model from one of your referenced animations, for example just make an empty animation and use that as the “” in Unity. This way they all have the same namespace.

2 Likes

Thanks for the help guys.

Profanicus - that fixed it for me. I wish I had thought of that earlier! It’s a little bit weird as a work around but it’s simple and only one extra file to manage. Thanks again!

I realize this thread is very old now, but just in case someone else gets stuck on this and finds themselves here… you can resolve the naming issue when you create your reference simply by going to the option box in maya next to “Create Reference”.

Scroll down to the Namespaces section and choose the option to “Merge into selected namespace and rename incoming objects that match”.

1891161--121724--upload_2014-12-19_4-18-7.png

Kerihobo, you are a SAINT!! That totally worked!!

Alonso