FBX Export for Any rig's

Hello,

I’m having a hard time exporting any rig and animation with FBX.

I have to follow tutorials for each rig system and I am not always successful, what is the logic of this issue?

How do I know which bone system needs to be exported so that it can work especially in game engines?

What software are you exporting your fbx from?
What engine are you exporting your FBX to?
Are you exporting a skinned mesh ,or just joint animation?

Most software packages will have an option to export only selected nodes. A game engine generally requires only the rig joints that actually drive mesh deformation, and the mesh being deformed if you are trying to export the entire model. For animations, joints alone are usually sufficient. How you determine which joints are actually deformers depends on the software.

Sorry for less information.

Maya 2023
I’m using unity generally meanwhile learning unreal engine. its is make any difference?
mainly i want to make game character animation sets.
I want to transfer it so that developers can use it for the game.( i guess skinned mesh not enough for this purpose,probably i need joint animation)

RE: I have to follow tutorials for each rig system
Brute force it maybe?

Export an intermediary FBX file.
Import it back in Maya.
Inspect details, add and remove objects that is needed on your target system.
Export a final FBX file.

Of course I’ll try, but I want to learn the logic of it. Isn’t there a clear way to decide which bone system is necessary for movement and which one to export in a healthy way?

The logic is :
Find the joints connected to any skinCluster nodes which deform the character mesh

Select a deforming mesh, open the Maya Node Editor
click the “input and output connections button”
the node editor will show all joints connected to the mesh’s skinCluster node

you can also use a python script that finds the joints deforming a selected mesh

import pymel.core as pm
meshNode=pm.selected()[0]
shapeNode=meshNode.getShape()
for sc in shapeNode.listConnections(type='skinCluster'):
    for jnt in sc.listConnections(type='joint'):
        print(jnt)
1 Like

Wow! thanks for script ı’ll make some test I will try it on the rigs I have difficulty with

Keep in mind that pymel has not been maintained or updated for a long time.
Therefore, there is no version of pymel for Maya 2024.
And pymel cannot be installed for Maya 2024 using pip.
So it goes…
So get used to using cmds and OpenMaya…

We are not on the latest version but isn’t pymel already ships on whatever Maya version you have?
That was true for 2018-2023. Is Maya 2024 different?

It had been a while, but your post was poorly timed… there was literally a new PyMel release yesterday. :slight_smile:

1 Like

Yes, PyMEL version 1.3.0 was released yesterday, but only for Maya 2019-2023…(vs version 1.3.0a2 Maya 2018-2023 )
In any case, pymel was not included in the Maya 2024 distribution.
And it is not known if PyMEL will be released with Maya 2024 support…
IMHO:
Perhaps this is just my age grumbling. :innocent:
And I think it’s not worth sacrificing performance, especially in rigs, for the sake of deceptively compact code.
10-20 years ago, when most Maya users were using MEL and the Maya Python API 2.0 didn’t exist yet, PyMEL was seen as a panacea. And now there are a huge number of users who have no idea how to do some simple things without PyMEL. Plus a huge code base… That is, it has become a tradition on the verge of religious fanaticism…
But, of course, the PyMEL situation is just a reflection of the general decline of the Maya.
All this pales in comparison to using Electron instead of Qt/PySide… :upside_down_face:

Though you could have had it pip installed, even prior to this latest release.
It wouldn’t run straight away (Maya would crash, or get stuck at loading), but after copying/renaming those 4 files from cache folder (Solved: Maya 2024 python issue (macOS) - Autodesk Community), it should work normally (at least it works for me, and many others; haven’t thoroughly tested it, but few snippets I’ve tried weren’t causing any issue).

And it looks like you need to do the same thing even with pymel version 1.3.0 - pip install seems not to generate those files for 2024 (in my case).

P.S. Pardon me for joining in this totally off-topic discussion about pymel installation :slight_smile:

1 Like

I think generally speaking:

you have probably FK-chains, IK-Chains and control rigs. You wanna seperate all of that out and export only the Bones that you apply mesh-weight painting to. Base-Cahin/Result-chain or I name-convention it to “SK_Root” for example.

You’re resulting export file should contain the following for the baserig FBX export:

  • character/obj mesh
  • SK_Chain
  • Blendshapes/Morph Targets
  • [The following REMOVED]: any constraints, controllers, FK chains (sometimes the SK chain is used for FK logic, in which case obviously that should be exported), IK Chains.

And animation files should contain:

  • SK_Chain
  • animation keys on SK_Chain
  • they DO NOT need the character mesh, because your baserig already contains that.

And easy way to check would be to export the UnrealEngine mannequin SKeletamMesh as an FBX and import it into Maya, then you should see exactly what your baserig file needs.