Blender to OGRE - Having 2 Animations Messes Up

Problems building or running the engine, queries about how to use features etc.
Post Reply
RonnieNeeley
Gnoblar
Posts: 4
Joined: Mon Jun 16, 2014 12:33 am

Blender to OGRE - Having 2 Animations Messes Up

Post by RonnieNeeley »

Hey guys,

We (my friend and I) have a basic character for our game. We are having trouble connecting his top walking animation (arms swinging) to his bottom walking animation (legs moving) without yielding glitches.

We can do it, but when we do, the animations get messed up. When we do the animations individually (say, just his top or bottom), they work just fine.

When we combine them, well... this happens:

[youtube]6Yvn63ZS4G0[/youtube]
(Ignore the frame drops at points, that's the screen recorder's fault.)

I've followed many tutorials on the subject, including this one (for your reference):
http://wiki.openclonk.org/w/NLA_Hijacking

When I export Sinbad, he works just fine in the program. When I export our character, bad things happen.

Here's the .blend file, if anyone would like to play around with it: http://www.mediafire.com/download/uh84l ... ated.blend

We've tried everything we can really think of at this point, and still can't get him to work. My thought was it had to do with how I was doing the NLA strips, but when I did Sinbad (the same way I'd done everything else), he worked fine. So I'm guessing it has to do with my animations, although I don't see how something could be causing that. My current hypothesis is the UPRIGHT_WALK_TOP is including animations for the bottom as well, which is conflicting with the UPRIGHT_WALK_BASE. However, I don't see how that could be, considering there are no keyframes on the legs/feet in the UPRIGHT_WALK_TOP, and Sinbad's top has keyframes on the bottom (and bottom on the top), and it works flawlessly.

Anyways, thanks for your time, and apologies on any incoherence, I've been at this for a handful of hours at this point and am exhausted.
Any suggestions would be greatly appreciated!

Thanks,
Ronnie
RigoCL
Greenskin
Posts: 114
Joined: Mon Oct 14, 2013 1:41 am
Location: Chile
x 3

Re: Blender to OGRE - Having 2 Animations Messes Up

Post by RigoCL »

Hi RonnieNeeley, I checked your blend file, why the UPRIGHT_WALK_TOP starts at frame 60? Also, I can see that the UPRIGHT_WALK_BASE animation is rotating the "chest" bone, this could be conflicting with the UPRIGHT_WALK_TOP, though it shouldn't be conflicting with the legs animation. Besides that, the NLA looks ok to me.

How are you running the animations from within Ogre?

Anyway, I have had problems when using Quaternions in Blender to animate, so I always use "Euler XYZ".

I would do the following to check, make a couple of new animations, one just moving an arm and the other just moving a leg, but both starting at frame 0 in the DopeSheet.
Integrated: Ogre3D + dotScene (Blender loader) + MyGUI (UI) + RakNet (Client/Server) + Leap Motion (The future is here!) + StereoManager (3D Anaglyph red-cyan)
WIP: StereoManager (Real 3D) + CCS (Camera Control System) + Sound, experimenting with Android.
RonnieNeeley
Gnoblar
Posts: 4
Joined: Mon Jun 16, 2014 12:33 am

Re: Blender to OGRE - Having 2 Animations Messes Up

Post by RonnieNeeley »

Hey RigoCL, thanks for your reply,
why the UPRIGHT_WALK_TOP starts at frame 60?
The UPRIGHT_WALK_TOP animation starts at frame 1, however in the NLA it starts at frame 60 or so because that's what the tutorial I was following said to do. My understanding is that it shouldn't really affect anything (especially the problem we're having). I've had it start at frame 0 as well on the NLA sheet, and the problem persisted.
Also, I can see that the UPRIGHT_WALK_BASE animation is rotating the "chest" bone, this could be conflicting with the UPRIGHT_WALK_TOP, though it shouldn't be conflicting with the legs animation.
I'll play around with removing his chest rotations and seeing what happens, however Sinbad's root bone moves as well and he doesn't suffer from the same graphical issue.

EDIT: I unkeyframed the hips, and the problem still persisted.
How are you running the animations from within Ogre?
What exactly do you mean by this? I am not the programmer so I have no idea, but I know when we were using the Sinbad model, he worked fine, so I'm guessing it's nothing on the programming side.
Anyway, I have had problems when using Quaternions in Blender to animate, so I always use "Euler XYZ".
Could you explain your issues? Sinbad used Quaternions to animate and he works fine, so not sure why my character wouldn't animate as well. Would love to hear what your troubles were.
I would do the following to check, make a couple of new animations, one just moving an arm and the other just moving a leg, but both starting at frame 0 in the DopeSheet.
Thank you for the suggestions, I will do that now and see!

Thanks for your time,
Ronnie
RonnieNeeley
Gnoblar
Posts: 4
Joined: Mon Jun 16, 2014 12:33 am

Re: Blender to OGRE - Having 2 Animations Messes Up

Post by RonnieNeeley »

We seemed to have fixed it! Long story short, we turned "Only Animated Bones" on, and keyframed the legs further (rather than just the IK bones), and everything seems to work! Thanks for your help :D
Post Reply