How to run a model's animation

I’ve made a nice running animation and exported as a .obj and converted it to .j3o. The model displays, but is not executing the animation. How do a run the animation?

.obj format does not support animations as i remember.

use GLTF / FBX formats instead if you need animations.

I did try fbx, but I got this error (sorry, it has a bunch of fbx stuff mixed into the it):

SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
[ 100.0 , 100.0, 100.0]
Bind Pose for: Bone.002
java.lang.NullPointerException
Local Bind: Transform[ -2.842171E-14, 0.5, 1.4210855E-14]
[ -0.5, 0.5000001, 0.49999997, 0.4999999]
[ 1.0 , 1.0, 1.0]
Local Trans: Transform[ -0.5, 2.980233E-8, -1.4901163E-7]
[ -0.50000006, 0.49999988, 0.49999988, 0.5000001]
[ 1.0 , 1.0, 1.0]
	at com.jme3.scene.plugins.fbx.mesh.FbxMesh.applyCluster(FbxMesh.java:127World Bind: Transform[ -4.7683712E-5, 100.0, -5.7620446E-6]
)
[ -0.5, -0.5, -0.5, 0.5]
[ 100.0 , 100.0, 100.0]
	at com.jme3.scene.plugins.fbx.mesh.FbxMesh.toJmeObject(FbxMesh.java:213)
World Trans: Transform[ 49.999947, 49.999992, 2.1258464E-5]
[ 0.49999982, 0.50000024, 0.50000006, -0.4999997]
[ 100.0 , 100.0, 100.0]
	at com.jme3.scene.plugins.fbx.mesh.FbxMesh.toJmeObject(FbxMesh.java:58)
Bind Pose for: Bone.003
Local Bind: Transform[ -1.9841977E-9, 0.6, 0.0]
[ 0.5, -0.5000001, 0.49999997, -0.4999999]
	at com.jme3.scene.plugins.fbx.obj.FbxObject.getJmeObject(FbxObject.java:113)
[ 1.0 , 1.0, 1.0]
Local Trans: Transform[ -0.44086584, 7.152558E-8, -0.40698567]
	at com.jme3.scene.plugins.fbx.node.FbxNode.toJmeObject([ -0.6585545, 0.6585546, -0.25749934, 0.2574993]
FbxNode.java:399)
[ 1.0 , 1.0, 1.0]
	at com.jme3.scene.plugins.fbx.node.FbxNode.toJmeObject(FbxNode.java:71)
World Bind: Transform[ 59.999954, 100.0, -7.193031E-6]
	at com.jme3.scene.plugins.fbx.obj.FbxObject.getJmeObject(FbxObject.java:113)
[ -6.953546E-8, -1.0728442E-7, 1.0, 5.258588E-16]
[ 100.0 , 100.0, 100.0]
	at com.jme3.scene.plugins.fbx.node.FbxNode.createScene(FbxNode.java:496)
World Trans: Transform[ 49.999992, 9.301422, -44.08654]
	at com.jme3.scene.plugins.fbx.node.FbxNode.createScene(FbxNode.java:503)
[ -4.172325E-7, -0.40105504, 0.91605383, -2.2351742E-7]
	at com.jme3.scene.plugins.fbx.FbxLoader.constructSceneGraph([ 100.0 , 100.0, 100.0]
FbxLoader.java:405)
Bind Pose for: Bone.004
	at com.jme3.scene.plugins.fbx.FbxLoader.load(FbxLoader.java:125)
Local Bind: Transform[ 0.0, 0.6, 2.842171E-14]
[ -7.1054274E-15, -5.9624483E-9, 2.6062632E-16, -1.0]
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:259)
[ 1.0 , 1.0, 1.0]
	at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
Local Trans: Transform[ 3.174301E-8, 0.48686698, -0.35065725]
	at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:416)
[ -0.30704647, 5.6744165E-9, -4.4531976E-8, 0.95169455]
[ 1.0 , 0.99999994, 0.99999994]
	at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:420)
World Bind: Transform[ 59.999954, 39.999996, -2.0067162E-5]
	at mygame.Main.simpleInitApp(Main.java:25)
[ -7.549791E-8, -1.0728442E-7, 1.0, 1.4261633E-15]
[ 100.0 , 100.0, 100.0]
	at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220World Trans: Transform[ 50.000046, 2.0422287, -103.645775]
)
[ -3.1578597E-7, -0.662953, 0.7486609, -2.9776064E-7]
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
[ 100.0 , 99.99999, 99.99999]
Bind Pose for: Bone.005
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
Local Bind: Transform[ -2.842171E-14, 0.5, 1.4210855E-14]
	at java.lang.Thread.run(Thread.java:748)
`

what about GLTF? im not using FBX so idk.

I cannot export as gltf for some reason. I think OgreXML was supposed to allow me to do that, but even after installing it (in SDK: tools → OgreXML → Install Blender OgreXML), it didn’t seem to do anything.

OgreXML is old format, i were using it ages ago, i would not suggest it now.

about GLTF Blender support it native now.

1 Like

Note: Blender 2.7 had a number of problems in exporting glTF; these notes refer exclusively to Blender 2.8+

I have Blender v2.79, is it necessary to upgrade?

nope, but then you would need install proper GLTF plugin for it. (there was 2, dont remember links)

so its just easier to upgrade.