PDA

View Full Version : Bake IK



Skonk
03-28-2017, 07:54 AM
Howdy.

Trying to take an object that contains IK based bone animation and export it as an FBX for use in Unity.

The bone animation is not transferring over due to it using IK but I can't figure out how to get it into a form that will work.

I tried baking to MDD, applying the MDD file and then exporting but this doesn't seem to work either.

Any ideas?

hypersuperduper
03-28-2017, 09:18 AM
There should be an option to bake the animation in the fbx exporter. You shouldn't need to do anything else.

squarewulf
03-28-2017, 04:55 PM
Try Rebel Hills animation toolbox, it's part of the free version of Rhiggit

http://rebelhill.net/html/rhiggit.html

Sensei
03-28-2017, 08:57 PM
I tried baking to MDD, applying the MDD file and then exporting but this doesn't seem to work either.


How can it not work?
In other words: what happens?
Did you disable entire IK, and the whole bone system, f.e. loading object alone in fresh scene, and then using MDD on such raw object, and play it in Layout, to see whether it's deforming/displacing as expect.. ?

Mr Rid
03-28-2017, 09:57 PM
The old school method is to select all bones and make keyframe on each frame. Baked. :)

samurai_x
03-29-2017, 02:06 AM
Mdd is not for bones but for vertex animation.
There are a bunch of bakers like mm baker, dstorm baker, et.

Skonk
03-29-2017, 05:57 AM
Cheers all.

When I baked the motion to an MDD and loaded that motion in; lightwave played the animation back as you would expect, with the IK disabled.

Exported that as an FBX to unity but the animation wasn't there still.

I'll try it again because I was baffled at the time as to why that didn't work, I didn't see how it couldn't work; so maybe it wasn't updating the model properly in unity or something.

I assumed that once the IK/Bone animation had been replaced by actual vertex animation then it would work just fine. Like I aid though, I'll give that a try again with a different model or something.

Otherwise I'll try the other suggestions :)

Ztreem
03-29-2017, 07:32 AM
Cheers all.

When I baked the motion to an MDD and loaded that motion in; lightwave played the animation back as you would expect, with the IK disabled.

Exported that as an FBX to unity but the animation wasn't there still.

I'll try it again because I was baffled at the time as to why that didn't work, I didn't see how it couldn't work; so maybe it wasn't updating the model properly in unity or something.

I assumed that once the IK/Bone animation had been replaced by actual vertex animation then it would work just fine. Like I aid though, I'll give that a try again with a different model or something.

Otherwise I'll try the other suggestions :)

Mdd will never come over in an fbx file. You must use bones or morphs for fbx. One solution can be to find a mdd importer or alembic for unity, never used this my self so I don't know how well it works.

hypersuperduper
03-29-2017, 09:47 AM
Again. Most of what you need is built into the fbx exporter. make sure the exporter is set to export animations and to bake them. This should handle IK just fine. You can then open the resulting fbx in lightwave and delete all the IK goals. If your fbx export settings are correct it will animate just fine.

RebelHill
03-29-2017, 10:44 AM
hypers right... the fbx exporter gives the option to bake animation, you just need to check that. Ofc, as he also points out, it'll also end up exporting the additional "fluff" of the Ik goal nulls, etc, which mean a reimport/clean/rexport. Its also possible that you'll have euler flipping on some of the baked bones/any other items, which can often give lil glitches in the motion when replayed elsewhere.

straigntforward route to sort it all... get the animation toolbox... use the motionbaker on all the bones, run the euler filter on the result... clear all Ik nulls and associated fluff... export.

Skonk
03-30-2017, 03:02 AM
I actually had ticked the bake option when I first tried it (keep in mind this was helping someone else who had already done a few exports with no luck) and with the option ticked it still didn't work.

But I just tested it on some fresh objects and it did work so I'm guessing unity wasnt updating the model properly. Will try it again later today when I see the person I was helping.

Cheers.