Ogre3d crashes on self created animations from blender

Problems building or running the engine, queries about how to use features etc.
Post Reply
Onsokumaru
Kobold
Posts: 36
Joined: Tue Mar 01, 2011 3:41 pm
x 1

Ogre3d crashes on self created animations from blender

Post by Onsokumaru »

Hi,

I'm setting up a little game project in Ogre3d 1.7.2 and have created and animated a model in blender. I've exported it using the Meshes Exporter.

The animation was created with bone-armature and weight-painting, exporting works fine. I had some crashes with Ogre which referred to a specific code line and I could solve this problems (mainly I had to learn that all parts in blender have to have the same name (Model/Mesh, Armature, exported Materialfile ect)). But now it crashes somewhere at the call of "renderOneFrame()" with a mysterious message about a nothing saying errorcode R6010 and that "abort()" has been called. I 've not found anything interesting or helping when searching this errorcode... great thing this stuff without explanation or usefull information -.-
While playing around I saw my model with and without materials in the application... all working fine. Every try to get the animations into the application failed ending with the mentioned message. Ogre.log tells me that everything is fine and that no problems occured while loading my mesh/skeleton file. Also everything works fine when not using my mesh and Sinbad is happy and completely animated running around in my world ;)
I suggest that I'm doing something wrong with blender or something goes wrong while exporting. The code for using the animation should be (there is always the possibility for misstakes ;) ) ok, when Sinbad is animated running around without problems.
Does anyone has a idea what could be wrong?

Thanks for your help :)
Onso

StrakeFengala
Kobold
Posts: 28
Joined: Wed Feb 10, 2010 11:18 pm
Location: USA
x 4

Re: Ogre3d crashes on self created animations from blender

Post by StrakeFengala »

Greetings!

Your problem does sound pretty strange. For myself, blender and ogre have been working perfectly like bread and butter.
I don't know much about error codes, but I might be able to help if I could take a look at your .blend file and try to find out where the problem is, and try exporting it and loading into my Ogre application.
Also, I never recall needing to name the mesh, armature, and material file the same thing. In fact, I usually name them all different.

The problem could be in the animation code too. Just wondering, if you are using the SindbadCharacterController class there might be an inconsistency where the animations are handled. If so, you might want to try using to the bare code of loading an animation:

Code: Select all

//Define this globally or somewhere in your character class, if you are using one.
Ogre::AnimationState *mAnimState;

//Now load an animation.
mAnimState = YourEntity->getAnimationState("YourAnimation");
mAnimState->setEnabled(true);

//And just for testing...
mAnimState->setLoop(true);
And during your frame loop:

Code: Select all

mAnimState->addTime(evt.timeSinceLastFrame_OrWhatever);
Anyway, good luck with your project! (I know that it is very frustrating to find a problem and you have NO idea where it came from, it just seems to pop up out of the blue and it's like no one else in the world is experiencing the same problem, that happens to me a lot. :?)

StrakeFengala

Onsokumaru
Kobold
Posts: 36
Joined: Tue Mar 01, 2011 3:41 pm
x 1

Re: Ogre3d crashes on self created animations from blender

Post by Onsokumaru »

Thanks for your answer... but it was none of what you mentioned. :)

While you answered I gave it again a try and searched for the reasons. While doing this I thought "hey.. look at the console maybe there is something new". Done. And yes... there stood what caused the crash... it was just one line more than in the Ogre.log -> big hint for you guys developing Ogre3d: maybe put assertions also in the logfile not only on the console. I don't see any big difference between console output and what is written into the logfile. ;)

The reason was that I didn't assign all vertices to any bone. Yes the exporter mentioned this, but it's just a warning. There really should stay "You've to assign every vertex to a bone or your ogre application WILL crash!"... maybe it even shouldn't export when this porblem exists. I think every beginner would think in the way I thought about this warning: "So what? Then it just should treat this vertices like nothing is happening.. I want it so" ;)

Fine... learned the lesson of this day... assign vertices and look at the console ;)

Post Reply