Cannot load my .obj file [SOLVED]

Hi, so i’m trying to load an .OBJ file exported from blender but i keep getting this error:
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:

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?

Oh yeah, how could i forget the code…?

public void simpleInitApp() {

	Spatial model = assetManager.loadModel("Models/hummer.obj");
	DirectionalLight sun = new DirectionalLight();
	sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));

Try renaming the textures to AvHummer.tga and Housecolor2.tga (note the capital letters). Loads fine for me in the SDK then.

1 Like

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 =)