Page 1 of 1

Problem with animation made in Blender 2.6 and Blender2Ogre

Posted: Sun Aug 05, 2012 7:41 pm
by cumbiambero

I'm creating a 3D-Frogger clone with Ogre and I'm using Blender 2.63 for the modelling and the animation. To export the .mesh I use the Blender2Ogre-Exporter from Now I'have the following 2 problems:
  • The animation doesn't look in Ogre as is it looks in Blender. This is the main problem. :cry:
  • I have to use "my_animation" to use the animation, and can only use one animation.
Can someone please have a look at the attached blender file and tell me, what I'm doing wrong. The most important thing is that the animation loos exactly the same in Blender and in Ogre. And the other thing is I would like to know how I can define multiple animations in the same .blend file and give apropiate names like "idle", "jump", etc.

I'm very new to both Blender and Ogre. I' ve searched a lot but I didn't find a working solution. Thank you very much for your help!

Re: Problem with animation made in Blender 2.6 and Blender2O

Posted: Tue Aug 07, 2012 5:09 am
by Waruck
ok, again a problem of global rotation, translation and scaling in blender that is ignored by the exporter (you should get an error-message about that).
First go into the Action Editor and delete the keyframes for LocRotScale at the bottom. it won't change anything but will mess things up if you keep it while applying the transform in the next step. While you are there you can also delete the keyframes for Leg.L and Leg.R since blender can't find the bones anymore.... I guess you deleted these bones or renamed them.
Next step: go into Object Mode (!) and select your model (you might want to disable the auto-recording of keyframes) and press ctrl+a to open the apply-menu. Apply Location, Rotation and Scale of the model. (You need to re-open the menu each time). After that, select the Skeleton and apply everything to it, too.
After this your model should export fine with this animation.

If you want to export more than one animation and give them names you need to convert your actions to nla strips:
go to the nla-editor, choose an action and hit the 'snowflake'-button next to it. this will create an nla-strip based on the action. Note that blender will create a new nla-track for each new nla-strip. you can keep the strips in different tracks or move them into one and delete the others.
The exporter will export every nla-strip as an animation and give the animation the strip's name. One thing to pay attention to is, that nla-strips that are overlapping on the time-line will influence each other when exporting. The newest version of the exporter has an option to disable this influence.

Re: Problem with animation made in Blender 2.6 and Blender2O

Posted: Tue Aug 07, 2012 10:50 am
by duststorm
Press the N key when mouse hovering over the 3D viewport to open the properties panel, and at the top of it look at "transformation".
Notice that armature and model have a different position and scale. That is the problem.

What I did: select armature, then
CTRL+A > Apply Location
CTRL+A > Apply Rotation & Scale

then select the frog mesh, and do the same thing.

Try exporting it now.

Hint: use OgreMeshy to preview your Ogre mesh. Very useful is the "show bones" feature, so you can verify whether the bones are properly aligned with the model.

Re: Problem with animation made in Blender 2.6 and Blender2O

Posted: Tue Aug 07, 2012 2:48 pm
by cumbiambero
Thank you very much for your answer. The advice with the NLA was very helpful. Unfortunately the animation still doesn't work. I made another one, where the frog only turns his head, but I had no luck. What do I have to select, when I add a keyframe with "I"? I have attached the actual state of the blender file to this post. Thank you again.

Re: Problem with animation made in Blender 2.6 and Blender2O

Posted: Tue Aug 07, 2012 3:49 pm
by Waruck
what exactly is the problem now? for me the model exports without problems and the animation looks fine in OgreMeshy

Re: Problem with animation made in Blender 2.6 and Blender2O

Posted: Tue Aug 07, 2012 4:36 pm
by cumbiambero
Thank you Waruck and duststorm.
I don't have OgreMeshy installed because it's linked against Ogre 1.8. I'm using the version 1.7.4-3 of Ogre (it comes with the Ubuntu 12.04 repository) Should I switch to Ogre 1.8?
I'll have to build it from the source. Could changing to the latest version be the solution?

Solution found!

Posted: Tue Aug 07, 2012 7:33 pm
by cumbiambero
Now I found the solution :D :
I had to select Tangent Split Mirrored and Tangent Split Rotated in the options at the bottom while exporting from Blender:
Blender2OgreExporterSettings.png (47.09 KiB) Viewed 4323 times
Thank you for everything and have a good time.