Blender->Ogre->JMonkey animation?

Hello,



I know that Blender 2.49 is the officially supported version for Alpha-4, but I was wondering what the status is on loading animations from blender 2.5.

I’m using the blender2ogre script, and can import meshes and textures just fine, but I cannot get animations to work. The weird part is jme recognizes that there is an animation, as I can use getAnimations to list off my one animation, “Run”. It also finds the length of the animation correctly, and even executes the AnimCycleDone method on correct intervals. However, the model on screen doesn’t move. I’m using an armature in blender with vertex groups, no envelopes(read somewhere it wasn’t supported).



Also, I’m using the latest nightly build, set up through the JMonkeyPlatform updates. I’ve even tried rebuilding from the svn source with no luck.



Any help?

The nightly has a blender export script for 2.5+ coming with it, install it via Tools->OgreXML

Edit: Also note you need to animate with bone animation

1 Like

http://hub.jmonkeyengine.org/groups/general-2/forum/topic/animations-arent-working-at-all/

1 Like

Thanks for the quick replies!



@normen

normen said:
The nightly has a blender export script for 2.5+ coming with it, install it via Tools->OgreXML
Edit: Also note you need to animate with *bone animation*


Hate to bug you, but can you elaborate on animating with BoneAnimation at all? I'm looking at the API at the moment, but I don't understand how to get that BoneAnimation. At the moment I'm trying to use the code found in the tutorial:
[java]
control = player.getControl(AnimControl.class);
channel = control.createChannel();
channel.setAnim("some_anim");
[/java]
which obviously isn't the same.

Thanks for the help!

Bone animation is a feature in blender. The code to play the animation in jme3 would look somehow like that yeah.

Huh, thats how mine is set up. No model movement however. Perhaps my blender model isn’t set up correctly.

You sure you checked the help on how to export animations? The one of the blender exporter as well as the docs in the wiki?

ptblduffy said:
Perhaps my blender model isn't set up correctly.


If your model is animated in blender, just export it using the ogre exporter(do not apply the armature modifier). Then you'll notice a .skeleton.xml file ok? That file stores your model's bone setup and animations. When you export the .mesh.xml and .skeleton.xml and .material.xml(have to have the same name of the model), just import it in jmp by using the ModelImporter plugin, and open the auto-generated .j3o in SceneComposer and let us know if you get to animate your model by choosing the animation from AnimControl in Properties Window.

I have a problem with animation (blender2.6+ogre). I did everything as describes in manual (I created NLA track), then I converted xml model to j3o. And when I change a track in Animation Control nothing happens in the SceneViewer.



My model (blend and ogre): http://dl.dropbox.com/u/26887202/123/jme_blender/character.zip

sorry for the hijack but the 2.49 ogre files will continue to be supported right, if it is for how long…I still find the 2.56 version to be more “work” than the 2.49 version

The 2.49 ogre files are still supported, yes.

But i have all my models in 2.6. With 2.56ogreExporter Meshes, Animation Tracks are loaded, but animation does not work. Nothing changes. Can anybody test my model and say what I did wrong?

Or give me an example with working blend2.5/2.6 and ogre animated model.



Thanks.

Yeah, we read that ^^ Do you use the exporter that comes with the SDK?

yes, i installed nightly importer with SDK.

I tried to open animated blender2.56 model in blender2.49 and it opened only meshes without animations. So the only way is to use blender 2.56.

Yep, animations work way different in 2.5+

for example i have models (character, shield, weapon) in one blend file assigned to one same armature.



and i would use blend 2.56 with animation named system. Will it be possible to import as j3o each element separately?



becouse now using 2.49 i must assign to each object each animation names list, and each element export to ogre separately ;/

Did anybody try to load an animated model with blender 2.5/2.6 and ogre?

mifth, you really want to ask basically the same question every second post?