Hello,
I've been trying to use the FaceFX 3Ds Max Ogre Exporter to export a Rocketbox character with a loaded biped animation to Ogre. The character is supposed to loop through this "Idle" biped animation and blend in FaceFX animations on the fly. Before, when I exported the character without biped animation, I had no problems loading the character into OGRE and using FaceFx to create facial animations. When I export the character with a skeleton animation using the FxOgreGUI.ms script and load the character in Ogre, the character's body performs the correct animation, but the head spins around in circles and eventually the shape of the head becomes distorted. I've also noticed the the model's eye lids and portions of the model's hair are yellow instead of the correct texture. I'm not sure if this is being caused by how I'm exporting the character using the FxOgreGUI.ms script, or by how I've modelled the character in 3Ds Max, or how I'm loading the character into Ogre. I've tested the animation in 3Ds Max, a third party Ogre Mesh Viewer, and even in FaceFx Studio 2012 (with the preview animation command). In all these programs I don't see any problems with the model or the animation, but when I try to load the animation programatically into Ogre I experience the head spinning issue. I've attached a short screen capture video of the Ogre output so you guys can see exactly what's happening. I was hoping you guys might have some insight about how I could fix this problem or where I could go to find a solution.
Thanks,
Jason
The material problem could be a missing texture or an incorrectly exported .MATERIAL file (the Max Ogre exporter does the best job it can, but can get materials wrong). The eyelids and hair might have transparency, and perhaps that is not being exported correctly.
To add transparency by hand to the .MATERIAL file, add the following two lines after the emissive color of the appropriate material:
scene_blend alpha_blend
depth_write off
You can also try exporting the file from the 2013 beta, or using 3rd party Ogre Exporter. If the textures look good there, take a look at that .MATERIAL file and see what changed.
As far as the head spinning goes, it sounds like the problem is in your implementation of playing the body animation in the ExampleGameIntegration sample project (it doesn't support that by default).
Here is a thread that talks about playing multiple animations simultaneously in Ogre:
http://www.ogre3d.org/forums/viewtopic.php?f=2&t=47798
It can be a little tricky. FaceFX Studio has an even more complicated skeletal animation system because it also supports ogre body animations blended in from events, so I don't think our implementation will be of much help.
I figured out the issue with the incorrect textures. It was because I was unintentionally rendering an opacity layer in Max. However I still have the head spinning problem. Although we eventually intend to blend the "Idle" skeleton animation with FaceFx animations, currently I am only playing the skeleton animation. This leads me to believe that there's no way another animation could be interfering with the skeleton animation.
The other thing that is really odd is that when the model is animating the head model actually gets distorted. It seems like the eye lids get stretched out really far away from the body and the mouth seems to open far enough to make the head go completely upside down. It seems like the positions for the facial bones in the animation are being overridden by something else, but since I don't have any other animations playing I'm not really sure what could be doing that.
We've tweaked the ExampleGameIntegration sample slightly in an attempt to prove the concept for our application. Currently I'm just enabling a looped AnimationState for the Idle animation immediately after the character is loaded into the scene in Engine.cpp of the sample project. Then I'm adding time to that AnimationState in MainLoop.cpp when the frameStarted function is called. I seem to be doing something right, since everything besides the head seems to animate properly.
If you have any further suggestions, they would be much appreciated. We're working very hard to prove the concept for our application before we allocate the necessary resources to build it out properly and I really appreciate all the patience and assistance that you've given us.
Thanks Again,
Jason
Please direct all support about source code to support(at)oc3ent.com as this forum isn't for source code discussions. We can pick up the support thread from there.