The low poly mesh for May worked pretty well even around her elbows and knees. The joints for the elbows and knees were placed very close to the outline of the mesh so she deforms better. And now I wanted to see if joint animation can be imported into Flash.
I first tested something very simple. I keyed a few frames to make her shake her head, selected her mesh and exported her as a collada file. Joint keyframes exported fine by ticking Animation and Joints and skin in the export option. But anything from the graph editor did not appear in Flash – it appeared like step animation.
Okay, that made sense. So I keyed every frame in Maya to get the tweens by going to the Graph Editor and selecting Curves => Bake Channel . Sample by option was set to 1.
Next, I wanted to test whether IK works. The quick answer was “No”. But it “worked” when I converted IK keys to joint keys manually by keyframing the joints that are affected by the IK. There had to be a better way to do it, and sure enough, I found that you can do that with a click of a mouse:
Select the COM joint and go to Edit => Keys => Bake Simulation Options . Tick the Below box and hit Apply. IK handles can now be deleted and all joint animation is baked on every frame. Yay!
However, when I exported the baked animation, I got the following error:
INFO: animations #27 of 27
TypeError: Error #1009: Cannot access a property or method of a null object reference.
I googled for help and I found a couple of posts that could fix the problem. One was to open the Collada file and find an tag that didn’t have an id attribute and add one. They all had ids. Another fix was to convert all tags to . All had already.
I was convinced that it was the Collada export that was the problem so I had a look at my export settings. What fixed the #1009 error was ticking Apply Transformations in the OpenCollada Export Settings.
So here is a screenshot of the OpenCollada export settings that worked fine with joint animations in Flash. Click the thumbnail for the full export settings window.
In words, make sure you have Bake transforms, Triangulate, Animations, Joints and skin, Polygon meshes ticked. I also tick Relative paths and Copy textures so I can just use relative paths for the Collada file and texture files when I upload them.
To upload your animation to your webpage, you need to upload the swf file, the dae file, and the texture file. Here’s the test animation online.