tetchi blog

Tetchi's blog about life and stuff

Autodesk Maya: Exporting to FBX


For Senior Project at school, I was responsible for modeling and animating 3D fishes. The app that we were using required me to export the models into FBX file. I learned the hard way that exporting to FBX is a HUGE pain in the butt, and hopefully this article can smooth things out for anyone working with Maya & FBX.

Thing to keep in mind when exporting to FBX

  • Deformer animations simply do not work. I’ve browsed through many, many forums looking for a solution but could not find an answer. What happens is that once exported to FBX, only the first frame will have the deformers applied, but not for any frames after that. This means that for the rest of the animation, the object being deformed will maintain the same shape from the first frame.
  • Blend shapes work! You just have to re-arrange the Input Orders (explained later)
  • Constraints may not alway work. I used parent constraints for my eyes and some of the controls, but they would do odd things when exported. For example, even though they’d work perfectly as an .mb file, in the FBX file there would be an offset on the objects that were constrained, so they wouldn’t be in the right positions.
  • You have to delete non-deformer history after you smooth your mesh. Otherwise, even when your model is exported, it will still be unsmoothed.
  • Make sure all your normals are facing the right way. To see normals, go to Display > Polygons > Face Normals. Not having the normals pointing the right way will mess up many things in the app/game, primarily the lighting.

Below, I’ve outlined the steps to properly export an FBX file. There is also a supplementary video that may help you get started. At this point, you should have the character modeled, textured, the joints and controls set up, and the mesh for any blend shapes created.

initial setup

Fig. 1: The initial setup

The proper steps for exporting to FBX

1. Smooth-bind the mesh to your rig.

Make sure you have the Animation menu open. Select the root joint, then select the mesh. Go to Skin > Bind Skin > Smooth Bind. Now, when you move your joints, your mesh should move as well. Don’t smooth just yet! Keep working in smooth-preview mode for now (hit 3 on your keyboard).

2. Weight paint the non-smoothed mesh.

You should now go ahead and weight-paint your model. I won’t go over the details on how to weight paint here, but I found this tutorial by unpicked1 very useful. It’s easier if you weight-paint before you smooth, since there are less vertices to worry about.

weight-painting the fish

Fig. 2: Weight painting the fish, with Color Ramps.

You only have to weight paint one side of your character. You can use the Mirror Skin Weight tool later to copy the weights from one side to another. When you use this tool, make sure your character is in its bind pose.

3. Animate the model.

Use your rig to animate the model. Walk, jump, swim… go nuts!

4. Smooth the mesh

Switch to the Polygons menu. Select the mesh, and go to Mesh > Smooth. If you have any meshes for blend shapes, go ahead and smooth them too. You may be tempted to export to FBX right away, but if you do now, your FBX model’s mesh will not be smoothed. Once you smooth it, you may have to weight-paint certain areas that may not be moving as they should.

smoothed meshes

Fig.3: All meshes are now-smoothed, including the blend shapes.

5. Delete Non-Deformer History.

Go to Edit > Delete by Type > Options. Make sure that “All non-deformer history” is selected (Fig. 4).

delete non-deformer history options

Fig. 4: Delete Non-Deformer History Options

Select the main mesh (not the blend shapes). Go to Edit > Delete by Type. This deletes the smooth node from the mesh, so now when you export it, it will be smooth in the FBX as well! If you did a simple Delete History, it would have deleted the smooth, but all weight-paint information and animations will be lost.

6. Create blend shape.

Switch to the Animation menu. Select the blend shape mesh, Shift+Select the main mesh, then go to Create Deformers > Blend Shape. The main mesh should now have a new attribute for the blend shape. When this new attribute gets closer to 1, the main mesh becomes more and more similar to the blend shape. Notice how in Fig.5, the goldfish’s mouth is now open like the blend shape.

blend shape created

Fig.5: The mesh now has a blend shape.

7. Change Input Orders

The problem right now is that the blend shape is now prioritized over the animations. This means that if the value for the blend shape attribute is set to 1, the mesh will take on the blend shape for the duration of timeline instead of doing the animations. To fix this, we must change the input orders of the main mesh. Right click and hold on the main mesh, and go to Inputs > All Inputs (Fig. 6).

Fig.6: Opening the All Inputs menu.

You will now see all the inputs of that mesh. Middle-click and drag the Blend Shape node on top of the Tweak node (when you middle-click over the Blend Shape node, you should see a plus sign). See Fig.7.

before and after of inputs

Fig. 7: Before and After of Inputs for main mesh.

Now, even with the blend shape attribute set to 1, the model will retain its animation, PLUS have the blend shape applied.

8. Include blend shapes into animation

You can no go ahead and keyframe the blend shapes into your animation. For me, I used the fish’s blend shape to animate the opening/closing of the fish’s mouth (Fig. 8).

correct input orders

Fig. 8: Animated goldfish with the right input orders

9. Check export options & export

Go to File > Export Selection… > Options. Under file type, select “FBX export”. Click the “Edit preset” button to open the FBX export options. In the options for the FBX export, look over the following:

  • Under “Animation”, make sure the Animation checkbox is checked.
  • Under “Bake Animation”, make sure the Bake Animation checkbox is checked. Also, set the Start and End values to the duration of your animation.
  • Under “Deformed Models”, make sure all checkboxes are checked

Once this is done. select your model or the group containing your model. Go to File > Export Selection…. Export the FBX model to the directory of your choice. You should now have a fully-working FBX model.

I made a supplementary video that guides you through this as well. You can check it out here.

Conclusion

Anyway, those were my findings while working with FBX, and I couldn’t find information on this anywhere else.

Hope it helps!

*UPDATE* Caught embarrassing mistake. Thanks Grant!

16 Comments

  • Jeffrey
    Jeffrey on July 16th, 2011

    Great post man! I’ve been searching for hours for this info, and I finally hit the motherload for exporting maya objects. Thanks you!

  • Tetsuro
    Tetsuro on July 20th, 2011

    Awesome, thanks Jeffrey! I’m glad someone found it useful! :)

  • Ian
    Ian on July 21st, 2011

    OMG! I need to do this for school too, and this has helped a LOT! Thank You!

  • Tetsuro
    Tetsuro on July 25th, 2011

    Frikkin sweet!! I’m glad you guys found this handy!

  • Cakewalkcg
    Cakewalkcg on July 23rd, 2012

    Hi,

    Very important tutorial. Almost lot of fellows skip the “Change Input Order” step while exporting to FBX. Nice to see you put it there.

    Keep up buddy.

    Regards,
    Cakewalkcg
    ———————–
    Visit http://www.cakewalkcg.com for free 3D models and video tutorials.

  • Feras
    Feras on July 31st, 2012

    Do you know how to reduce the file size of an fbx? right now, animations i’m exporting are coming out at hundreds of kilobytes, and I’d like to know if there was a way to reduce the size in any way.

  • tetchi
    tetchi on August 10th, 2012

    @Cakewalkcg thanks for the kind words!

    @Feras Man, I wish I could tell you but I’ve been without Maya for almost 1.5 years… sorry man :(

  • jestoni
    jestoni on February 11th, 2013

    is it possible to export animated scenes with referenced files? ex. all the characters and environment are referenced (all files are maya 2013 ascii) then animated and saved as a maya 2013 file. now i need to export it as fbx for import in maya 2011. i tried exporting a single character as fbx (rigged without animation/maya2013 ascii) i used fbx 2011 in advanced options. when i imported the fbx in maya 2011 all the constraints were not imported, although i checked the constraints while exporting from maya 2013.
    this is basically what i need to do. convert all maya 2013 scene files (animated referenced files) to maya 2011 scene files.

    anybody knows how to solve this?

  • maytha satika
    maytha satika on May 16th, 2013

    great tutorial!!
    thanks man

  • tetchi
    tetchi on May 16th, 2013

    Thanks for reading! :)

  • jord
    jord on August 8th, 2013

    Thank man, might be quote old but still really useful! I’m using this tutorial to create my own character in a psp game (dissidia 012).

  • Mudit
    Mudit on September 7th, 2013

    Very helpful post! Thanks.

  • Carin
    Carin on October 1st, 2013

    Thanks alot for this information!

  • Sergiy
    Sergiy on January 6th, 2014

    Great write-up!
    You should mention that the source of the trouble is that FBX is not a native Maya format, but a format for exchange of media between different applications. It’s not completely open per se, but Autodesk provides a comprehensive SDK that one can use to export/import FBX.
    If Autodesk allowed exporting all the features present in Maya (like all deformers), they’d also have to supply the proprietary code that applies all the deformations. Not necessarily open source it, but at least supply it with the SDK. And while most of that code is trivial , some of it may have some trade secrets (however ridiculously outdated).
    Even if that wasn’t an issue, it’d still be a huge amount of work to essentially embed all the features of .ma/mb file into fbx.
    Even if they decided to do that, what do you do with custom nodes? Do you export them and say “good luck on the other end”? :)
    Even if all of the above was magically solved, it’d make already complex and versatile format even more complex. This means adoption would suffer and FBX wouldn’t be supported completely by anyone (because to support it would require a lot more effort, essentially as much as supporting loading a full Maya scene). Even worse, if adoption wasn’t an issue (like if Autodesk decided to extend FBX with a bunch of features to support more precise export from Maya scenes), it’d only mean that a lot of software that supports FBX fully now simply wouldn’t support those features. It’s even worse because after exporting FBX you’d never know what shows up in which other software you’re importing it.
    I’m rambling, though :)

  • Marco
    Marco on September 1st, 2014

    Thanks, great blog!

    But i get really terrible issue´s by exporting fbx files with placement textures like crater or something.
    How should i proceed?
    Look forward for your reply!

  • Jack
    Jack on October 11th, 2014

    Hey there,

    I’m working on a fun little app with a developer, a character designer from Disney, and animator from Dream Works.

    I’m running into a similar problem, and my animator is unable to figure out how to successfully export the file as a proper FBX file format.

    We actually need the file to be converted to a DAE file format, but I’ve read that you can get there by first exporting it to a FBX format and then converting it to a DAE format afterwards.

    I was wondering if you’d be interested in helping us figure out how to properly convert the Maya animation to an FBX format.

    I can pay you for your time.

    Please let me know if you can help us out, it’d be greatly appreciated!

    Take care,
    Jack

Post a comment