9903286
February 28, 2016, 9:25am
1
Hi, so i’m trying to load an .OBJ file exported from blender but i keep getting this error: http://pastebin.com/uR1BQv8u
Been trying for about 2 days, but keep getting that error.
There isn’t really much else to say, except that i’m using eclipse and this model: https://dl.dropboxusercontent.com/u/22001728/hummer.zip
java.lang.ClassCastException: com.jme3.asset.AssetKey cannot be cast to com.jme3.asset.TextureKey
I suppose you are doing something really wrong, can you post the code?
9903286
February 28, 2016, 9:44am
3
Oh yeah, how could i forget the code…?
public void simpleInitApp() {
viewPort.setBackgroundColor(ColorRGBA.Blue);
Spatial model = assetManager.loadModel("Models/hummer.obj");
rootNode.attachChild(model);
DirectionalLight sun = new DirectionalLight();
sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));
rootNode.addLight(sun);
}
normen
February 28, 2016, 9:54am
4
Try renaming the textures to AvHummer.tga and Housecolor2.tga (note the capital letters). Loads fine for me in the SDK then.
1 Like
9903286
February 28, 2016, 9:57am
5
That worked… weird. I thought that since the textures work fine in blender it had nothing to do with capitalization.
Thank you for your help!
please add “[solved]” to the title of this thread for future reference =)