How to use .j3o files?

Hi guys. I used the blender plugin for jmonkeyplatform to take my .blend file into a .j3o file. I am doing this because when i exported as Ogrexml the UV maped texture i made in blender didnt quite go on my model once loaded in JME so I found the plugin. Now how do I load this .j3o file? Loading it like a normal mesh just wont work. Any suggestions or tips would be appreciated!

The path is important, you have to load it on the path it was imported.

I think i have the path… Here is my code:

[java] Node b = (Node) assetManager.loadModel("Models/GarbagePod.j3o");

geom = (Geometry) b.getChild(0);


Is that wrong?


So, and what’s the error?

Do you have an exception or just a bad display?

Jan 20, 2011 11:14:11 AM handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.ClassCastException: com.jme3.scene.Node cannot be cast to com.jme3.scene.Geometry
at mygame.Main.simpleInitApp(
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(

That was the error. Sorry I didnt think to post it before.

Uh, the error is in line 3, apparently child 0 is not a Geometry… The model loads fine.

Ok I changed my code to

[java] b = (Spatial) assetManager.loadModel("Models/GarbagePod.j3o");


EDIT: SIlly me, the reason this was black was because I did not apply the texture yet. My texture w/ UV mapping is working great now. The .blend file importer is really helpful! THanks for the help!

Do you guys know how to use the animations on a j3o model? my XML exporter from blender is skiping the animation on the skeleton so I cant use them

If it skips the animation the animation isn’t correctly done. You need a bone animation with one root bone.

but it makes all the bones but skips the animation on the Skeleton , and if I try it on the SDK on the .j3o model and you look for the animations they all work so I dont understand why the XML exporter is not working

Because the animation is not correct

Check the tutorials that the end of this tutorial (and best to the tutorial too)