Problem with blender exported ogre animations

I’ve been having a problem loading animations exported from blender 2.7 to the ogre format and finally to j3o. The stack trace is here:

SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.ArrayIndexOutOfBoundsException: -3
	at com.jme3.animation.CompactVector3Array.deserialize(CompactVector3Array.java:95)
	at com.jme3.animation.CompactVector3Array.deserialize(CompactVector3Array.java:42)
	at com.jme3.animation.CompactArray.get(CompactArray.java:132)
	at com.jme3.animation.BoneTrack.setTime(BoneTrack.java:232)
	at com.jme3.animation.Animation.setTime(Animation.java:112)
	at com.jme3.animation.AnimChannel.update(AnimChannel.java:344)
	at com.jme3.animation.AnimControl.controlUpdate(AnimControl.java:362)
	at com.jme3.scene.control.AbstractControl.update(AbstractControl.java:128)
	at com.jme3.scene.Spatial.runControlUpdate(Spatial.java:736)
	at com.jme3.scene.Spatial.updateLogicalState(Spatial.java:879)
	at com.jme3.scene.Node.updateLogicalState(Node.java:230)
	at com.jme3.scene.Node.updateLogicalState(Node.java:241)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:242)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
	at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:193)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:232)
	at java.lang.Thread.run(Thread.java:745)

If i go from blender → Xbuf → j3o the animations work, however xbuf seems to only export 1 animation, and every additional track copies over as the exact same animation. (essentially it loses the additional animations i.e if i have walk, run, attack, i’ll end up with every animation being walk – although named run/attack in the animMap)

If i import blends directly without exporting to an intermediary format, i end up with extremely deformed meshes.

Anyone have any hints or tips on how to solve this?

1-in dope sheet menu
2- set proper name for animations
3-for each animation click on push down
4-in NLA Editor
5-You should see all animation tracks with same name.(do not rename them here)

After exporting to xbuf now you should be able to play animation in jme.
Before exporting make sure all your animations playing correctly in blender.

You can also see and play animations in JME SDK’s scene explorer.

Edit : I forgot to mention this. In step 2 make sure the F option (it is next to “+” button) is selected for all animations.

2 Likes