Problem with animation made in Blender 2.6 and Blender2Ogre

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
cumbiambero
Gnoblar
Posts: 11
Joined: Fri May 04, 2012 1:00 pm

Problem with animation made in Blender 2.6 and Blender2Ogre

Post by cumbiambero » Sun Aug 05, 2012 7:41 pm

Hello!

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 http://code.google.com/p/blender2ogre/. 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!
Attachments
frog.blend.rar
(200.47 KiB) Downloaded 126 times
0 x

User avatar
Waruck
Goblin
Posts: 210
Joined: Mon Dec 12, 2011 12:52 pm
Location: Germany

Re: Problem with animation made in Blender 2.6 and Blender2O

Post by Waruck » Tue Aug 07, 2012 5:09 am

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.
0 x

User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
Contact:

Re: Problem with animation made in Blender 2.6 and Blender2O

Post by duststorm » Tue Aug 07, 2012 10:50 am

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.
0 x
Developer @ MakeHuman.org

User avatar
cumbiambero
Gnoblar
Posts: 11
Joined: Fri May 04, 2012 1:00 pm

Re: Problem with animation made in Blender 2.6 and Blender2O

Post by cumbiambero » Tue Aug 07, 2012 2:48 pm

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.
Attachments
frog.blend.rar
(162.37 KiB) Downloaded 108 times
0 x

User avatar
Waruck
Goblin
Posts: 210
Joined: Mon Dec 12, 2011 12:52 pm
Location: Germany

Re: Problem with animation made in Blender 2.6 and Blender2O

Post by Waruck » Tue Aug 07, 2012 3:49 pm

what exactly is the problem now? for me the model exports without problems and the animation looks fine in OgreMeshy
0 x

User avatar
cumbiambero
Gnoblar
Posts: 11
Joined: Fri May 04, 2012 1:00 pm

Re: Problem with animation made in Blender 2.6 and Blender2O

Post by cumbiambero » Tue Aug 07, 2012 4:36 pm

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?
0 x

User avatar
cumbiambero
Gnoblar
Posts: 11
Joined: Fri May 04, 2012 1:00 pm

Solution found!

Post by cumbiambero » Tue Aug 07, 2012 7:33 pm

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
Blender2OgreExporterSettings.png (47.09 KiB) Viewed 4161 times
Thank you for everything and have a good time.
0 x

Post Reply