jmeBinaryReader: texture loading problem with converted 3ds

hi there.

(i’m giving full paths here to clarify the problem)

i converted a 3ds to jme using

com.jme.scene.model.XMLparser.Converters.MaxToJme /Volumes/Data/Users/atze/Desktop/SOL2Stuff/LittleFighter/Fighter.3ds /Volumes/Data/Users/atze/Desktop/SOL2Stuff/LittleFighter/Fighter.jme

that worked fine with the 3ds being generated on a mac (MM format).

the textures Decayin0.bmp and Decayin1.bmp are in the same directory.

now i try to load the jme-model it with

   protected void simpleInitGame() {
      LoaderNode aFighter = new LoaderNode("Fighter");
      try {
         aFighter.loadFromFilePath("binary", "/Volumes/Data/Users/atze/Desktop/SOL2Stuff/LittleFighter/Fighter.jme", new HashMap());
      } catch (IOException e) {

but it throws: /Volumes/Data/Users/atze/Source/JGL/LittleFighter/Decayin0.bmp (No such file or directory)
   at Method)
   at com.jme.util.TextureManager.loadTexture(
   at com.jme.util.TextureManager.loadTexture(
   at com.jme.scene.model.XMLparser.JmeBinaryReader.buildTexture(
   at com.jme.scene.model.XMLparser.JmeBinaryReader.readBegining(
   at com.jme.scene.model.XMLparser.JmeBinaryReader.loadBinaryFormat(
   at com.jme.scene.model.XMLparser.LoaderNode.loadFromFilePath(
   at Main.simpleInitGame(
   at Main.main(

what's the problem here? is it either
- the 3ds does have the wrong path in it (only LittleFighter/Decayin0.bmp) or
- LoaderNode assembles the path the wrong way?

/Volumes/Data/Users/atze/Source/JGL is my eclipse workspace containing both, jme and my test-project.
so how do i tell the LoaderNode how to find the texture?

and any insight on what the HashMap in loadFromFilePath is good for would be welcome as well :)

I really don’t know the answer to this, but I do notice this:

you load your model from -


but it’s looking for the texture at -


Desktop/SOL2Stuff vs. Source/JGL

Any ideas where this descrepancy is coming from?

One of two things.

  1. Sometimes programs like milkshape or max will specify "specific" paths for textures that the .jme file will try to find. Make sure the path in max is relative.

  2. Try setting the texurl property to a URL where the “base” of the file path should be. For example, if in max your texture is suppose to be “mytexturesbugblue.jpg” and the actuall texture is in “c:programsmytexturesbugblue.jpg” then you’ll want to do something like this

JmeBinaryReader jbr=new JmeBinaryReader();
jbr.setProperty("texurl",new File("c:\programs").toURL())

If you play around with the file's location and the texture's location inside the model, along with texurl property, you should be able to get it to find the correct texture.