Home Website Youtube GitHub

Baking animations and importing to Unity

Hi so I made some animations for a small game I’m working on also this is for school. How t
Do I bake the animations and export as a FBX my animations?

I created this video about my workflow exporting animation from mgear to FBX.
Whether is unreal or unity the exporting data from Maya is the same. Hope it helps.

3 Likes

Thanks @Milio! :slight_smile: :smiley:

1 Like

Hey so i haven’t gotten anything to work the skeleton doesnt have any key frames and every bit of animation is attached to the controllers, if i delete the controls all animation disappears and i can’t seem to get anything to work

@Luis_HerreraPortillo didn’t watch the entire video. But I do know that I have to set all my joints channels to keyable before baking, otherwise they don’t bake properly. I don’t know if the Game Exporter does this automatically or not. (I use a different tool.)

Could you tell me how to set all the joints to keyable?

@Luis_HerreraPortillo
This is my code:

import pymel.core as pm

jnt_org = pm.PyNode('jnt_org')

deformjnt = [s for s in pm.ls(jnt_org,ap=1,dag=1,type='joint')]

att = ['.tx','.ty','.tz','.rx','.ry','.rz','.sx','.sy','.sz','.v']

for i in deformjnt:

    attr = pm.PyNode(i+".shear")

    attr.disconnect()

    for attr in att:

        pm.setAttr(i+attr,keyable = True)

How exactly does it work?

im confused, i don’t know how code works, especially in maya

I don’t know if I got what you described (English is not my native language, sorry), I understand how to make this code run and work? ! Right?
The gif shows how to use it.

I don’t get how you selected the joints clicked something on the code, ran it and just worked

Select the translate, rotate, scale, and rotateOrder attributes on all your joints. (rotateOrder might be locked. If it is, don’t worry about it.)

Right-click on the channels. And select “Make selected keyable”. You’ll see the channels go from light grey (non-keyable) to yellow (connected).

Ok i did it, i made it keyable and the little lights are yellow, is that it?

Ok so im having one small little issue, so i get a little warning that says
The plug-in has detected mesh nodes with unsupported operators that affect the vertex and/or face count. To correct this, delete the Non-deformer history before exporting. The following nodes will not be processed:
Head
Mouth_main
Belly_and_legs
And i don’t know how to fix it!