j3o works in the SDK but not Eclipse

Hi all,

I made a model in Blender, exported using ogre and it loads and displays fine in netbeans the SDK, convert it to j3o and change the .loadModel to load that instead, still all fine, I copy the j3o over to Eclipse (my preferred IDE) The mesh loads in just fine, and it looks like the uv mapping is working but the texture itself isn’t showing, I’m just seeing a different color/gradient where each of the UV mapping sections are, Eg, its a building so the roof is a red gradient, the sides are a blue gradient instead of using my UV map png. Is there something else I need to do to make it display correctly in Eclipse?



Everything is contained in the j3o isn’t it (mesh, uv mapping, uv texture) ?



[java]

Spatial cblock = assetManager.loadModel(“assets/Models/Building1.j3o”);

cblock.scale(1f, 1f, 1f);

cblock.rotate(0.0f, 0.0f, 0.0f);

cblock.setLocalTranslation(0.0f, 0.0f, -80.0f);

rootNode.attachChild(cblock);

[/java]

Use the SDK and set the key mappings to Eclipse. It will save you so much hassle if you just use the SDK.

1 Like

You probably copy it to some folder in your eclipse project, big difference. The paths stored in j3o files (e.g. textures etc.) are absolute, thats why the asset manager root has to be the same so that all relative folders are kept. In other words: If you convert the model with the image being in (Project Root)/assets/Textures/image.jpg then in your eclipse class path (or a folder that you assign an assetLocator for) you need the file to be available at Textures/image.jpg

1 Like