[SOLVED] Animation does not work using JME 3.1 and Blender 2.78

Dear community,

when I upload my models without animation, everything is fine.
But when I try to upload any model with animation, it does not work.

First I tried to use Orge exporter and spent a day checking what is wrong.
There all data is exported without problems, but crashes, when I try to start animation in JME.

Reading forum, most people recommend to use JME menu “File-Import Model”.
After some tries I get model exported from Blender without errors, but JME crashes while trying to play animations:
(Block at lines 58-60 is the one causing it)

Please let me know what do I do wrong? I try to solve it since some days and it is driving me crazy already.

Here is my mesh, which is really simple and has just one animation on NLA track

1 Like

It seems that your Node “simple” has no AnimationControl.
Could you post a screenshot of the scene composer “scene explorer” (usually bottom left corner of your window) with all items expanded?
My guess would be that not your loaded model, but rather a sub-node has the anim control.

1 Like

Hi Robbi,

thanks a lot for quick answer!!

Here is the screenshot:

I see that if I click on the Hello animation, it is played correctly in scene composer.

But now it seems the problem is that import model imports not only model, but all around it (lamp, camera).

What is the correct way here:
A) should I somehow delete scene and leave only needed controls,
B) should I access object Scene, and find my object in the node below somehow?

Please recommend, as I am complete newbie here…

(Currently I just deleted Camera and Light and getChild of asset named Object, and now animation works!)
Thanks a lot for pointing where to look as well !!!

What version is your Ogre script?

This one:

This is expected. Maybe the Blender Exporter has a setting to only export the “selected mesh” or something.
What you can do is either deleting them in the blender scene (You aren’t rendering a video and as such you don’t need really need lights and such, or at least you can always remove them and re/add them or keep two separate files).

Three other things: Deleting Scene would remove everything below that, which is not what you want. You would remove Lamp and Camera and possibly Armature.

The second: The SDK has a Ogre Script as well, which you can use to install to blender somewhere under the tools menu. And it comes bundled with a blender.

The Third: There are many other ways of importing the Model (Direct .blend import, xbuf), which are really helpful, so as part of learning you could try to understand them as well.

Oh and the fourth: Your code would need ((Node)spatial).getChild("Object").getControl(AnimControl.class)

1 Like

I haven’t seen this fork myself but it does link to the original 0.6.0 version which does work with 2.78.

Try the script 0.6.0 and see if it fixes problem is where I would start, as Darkchaos said, its in the SDK.

I am not sure if there is a problem: Of course the exporter exports the whole scene, how would it know what is relevant and what is not?

I was referencing the troubles for exporting with Ogre.

I went through this same nightmare because of using the wrong Ogre script. Just using that wrong script 1 time screwed up the SDK for all importing of any file type unless I restarted the SDK. So the Ogre script was making it seem like the other methods were also messed up when they weren’t. Since he is using the fork and I know 0.6.0 does work, thought was worth a shot.

Ogre default setting is “Export selected only” so he can just select the model and rig and that’s all that gets exported.
I may be misunderstanding the comment, if so clarify please.

Your control is simply not in the root of your model. You have to go “down” the tree until you find your control.

Problem with Ogre is following:
I call it from Blender plugin, using “Export” parameters and following setup:

(here part of settings are only seen if you make image bigger)

A) Here animation is not exported unless I do not call modifier “Triangulate faces”, which I would like to avoid if possible, but keep if there is no other way:

Then if I add “Triangulate modifier”, it seem everything is exported correctly:

And then, that is what happens:

Please advise, what am I doing wrong.
Here is the link to the blend file and exported ogre files:

I haven’t tried ogre export since I upgraded to 2.78c blender but after doing so the Ogre exporter no longer exports things correctly for me either. I get the same crash.

The SDK blender importer works just fine though.

You using 2.78c?

1 Like

Ok I figured it out…

The script in the SDK is BAD. I forgot that I had changed to the SDK script to test it.

Use the script on the google site 0.6.0.


Jme requires it.

1 Like

Hi Mitm,

thanks a lot for your response, that was the reason. Blender 2.78 is not working correctly with Ogre Exporter.
(I switched to version 0.6.0 of Ogre and it did not help).

So I upgraded Blender to 2.78c and problem was solved!!
No animation is shown correctly and does not crash JME anymore :sunglasses::slight_smile: