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) {
e.printStackTrace();
}
lightState.detachAll();
rootNode.attachChild(aFighter);
}
but it throws:
java.io.FileNotFoundException: /Volumes/Data/Users/atze/Source/JGL/LittleFighter/Decayin0.bmp (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:69)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:156)
at java.net.URL.openStream(URL.java:913)
at com.jme.util.TextureManager.loadTexture(TextureManager.java:235)
at com.jme.util.TextureManager.loadTexture(TextureManager.java:160)
at com.jme.scene.model.XMLparser.JmeBinaryReader.buildTexture(JmeBinaryReader.java:809)
at com.jme.scene.model.XMLparser.JmeBinaryReader.readBegining(JmeBinaryReader.java:178)
at com.jme.scene.model.XMLparser.JmeBinaryReader.loadBinaryFormat(JmeBinaryReader.java:124)
at com.jme.scene.model.XMLparser.LoaderNode.loadFromFilePath(LoaderNode.java:45)
at Main.simpleInitGame(Main.java:31)
at com.jme.app.SimpleGame.initGame(SimpleGame.java:344)
at com.jme.app.BaseGame.start(BaseGame.java:64)
at Main.main(Main.java:25)
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 :)