I’m trying out the blender ogre exporter and jme2. I placed the mesh.xml and scene.material in a package and a associated texture.jpg. When I run I get “warning: unable to locate: texture.jpg” Where am I to put this image? I’ve put it in the same package as Program.java. I’ve also picked through the code and it appears it may want it to be in a “texture” dir, so I tried it too.
Program structure:
ResourceLocatorTool.addResourceLocator(
ResourceLocatorTool.TYPE_TEXTURE,
new ClasspathResourceLocator());
URL meshURL = Program.class.getResource(“mesh.xml”);
URL matURL = Program.class.getResource(“Scene.material”);
newpackage/Program.java
newpackage/mesh.xml
newpackage/Scene.material
newpackage/image.jpg & i’ve tried newpackage/texture/image.jpg and texture/image.jpg
Scene.material
texture_unit
{
texture image.jpg
tex_address_mode wrap
filtering trilinear
colour_op alpha_blend
}
If you are getting this error:
hall_monty said:
When I run I get "warning: unable to locate: texture.jpg"
Then you might want to check whether it's actually texture.jpg or image.jpg, unless you changed the names to protect the innocent. For locating images with JME2 and ogrexml just look at the mesh loading test with the ninja and make sure you have all the loading code the same for loading the material file. The location for the file seems fine, it should just be relative to the material file. Good luck ;)