Deleting unecessary keyframes in Maya after key baking simulation, is a good way to cut back file dimension out of your ultimate FBX(s) format. Which is essential if you find yourself coping with loads of animation clips, performance-oriented. And that’s the best method we have now to take, if we had been careless within the first place.
Let’s say we’re engaged on a 3D character animation. And we create all of the animation we’d like for a singe shot, for exaple a hand-waving animation clip. And our purpose on this instance is to switch the animation info to a sport engine, resembling Unity.
Be aware: The way in which to make that occur inside Unity, is to have separate FBX file for our geometry-character and a separate FBX file for our animation clip(s), and the best naming conference, which is necessary. I’m assumed you’re accustomed to this method. Though in case you are not, I’ll submit a step-by-step course of within the close to future.
So so as our animation to work on a sport engine, like Unity, the animation must be baked. So we have to bake our animation in Maya first, earlier than we export it.
Some earlier rigging articles about Maya you could discover attention-grabbing:
Deleting Pointless Keyframes in Maya, Idea:
Let’s say we’re carried out with our character animation keyframes, and we’re prepared for the important thing bake simulation part.
Go to Key – Bake Simulation (sq. icon) (Animation module). And reset the settings from that new popup window, from Edit – Reset Settings.
As you may see the Channels parament is about to All keyable.
So by default this course of will add keys on all our chosen joints in each seen attribute from the Channel Field (translate, rotation, scale-all axis). However in reality, we don’t really want all these unessesary keys, as a result of they may enhance our ultimate FBX file dimension, as we talked about earlier.
What we really need is just these keys that strikes by way of time (particular joints and particular attributes)
However let’s assume we don’t do it in the best method and we choose All keyable possibility from the Bake Simulation Choices and we bake it. And at last we export our animation FBX file.
clear that mess?
The reply is easy, by deleting the Static Channels for the entire joints hierarchy of our rig, from the Edit – Delete by Sort – Static Channels. We have now to do the identical course of for all exported FBX.
Deleting Pointless Keyframes in Maya, Instance:
Let’s clear issues up and see the entire course of with an instance.
The entire course of:
- Create the animation, by setting keyframes
- Key bake simulation
- Export as an FBX
- Clear unnecassary keys kind exported FBX
On this instance we’re going to use the next 3D mannequin – Stickman. Hyperlink 1 and Hyperlink 2, if you wish to test them out.
I’ve already created a quite simple waving animation. So the primary stage (create animation) has been carried out. I’m positive you already created your animation as properly, or not less than been accustomed to the method.
Let’s transfer to the second stage (key bake simulation).
Key bake simulation:
So as a way to key bake simulation we have now to pick all of the nessasary joints heirachy of our rig. I’ve created a set that features of of my character joins within the Outliner, for simple entry (methods to create a set in Maya). However if you happen to haven’t, simply choose all of the joints of your character and go to Key – Bake Simulation (icon field), be sure to have reset the settings on that new popup window and click on bake.
After you hit bake or apply, Maya will take a while, relying on the complexity and the quantity of keyframes you’re engaged on, to really bake keys for each body, in your present timeline. After the method has been accomplished, you’ll discover that Maya has however key for each body of your animation (indicated by crimson traces, within the timeline).
Now we have now baked keys, let’s leap to the following stage (Export as an FBX).
Export as an FBX:
As soon as once more, choose all of the nessasary joints heirachy of your rig and go to File – Export Choice (possibility field). Simply be sure to are exporting an FBX file format and you’ve got checked Animation, underneath File Sort Particular Choices – Embody – Animation.
Now you have got an FBX file format in your animation, in your choosen folder.
When you hover over that exported FBX file you may see the dimensions of it (kb, mb, and so on.). Or you may right-click on it and go to properties to see the file dimension as a substitute.
Within the subsequent and ultimate step, we’re going to cut back dramatically the dimensions of that file.
Clear unnecassary keys kind exported FBX:
Import that animation FBX into Maya, by going to File – Import, or by drag and drop it into Maya.
At this level, since we had chosen All keyable Channels possibility, within the bake simulation course of, each joint has keys by way of the solely choosen timeline. This trigger the relative massive file dimension of our FBX. Let’s repair that.
Choose all of the joints of your character, by chosen the highest node of your rig from the Outliner in Maya and go to Choose – Hierachy from the primary menu.
And whilst you have that choice, go to Edit – Delete by Sort – Static Channels.
And whilst you have nonetheless that choice go to File – Export Choice, and re exprot that FBX.
What deleting static channels did:
- deleted all these pointless keys from all chosen joints, that haven’t any movement in any respect
- deleted all these pointless keys from all chosen joints, and stored solely that attribute(s) animated
In my case, the FBX file that had all that unessesary keys was about 750kb, and the file after cleansing up all these unessasary keys was about 220kb. So it’s a giant diferente.