Missing textures from 3ds file

I tried TestMaxJmeWrite with my own 3ds file which is placed in a folder with its textures  (jpg files). I can move through the space  but textures are missing. Where I need to put these jpg files? Below is the error.



INFO: Node created.

java.io.FileNotFoundException: GRASS2.JPG (The system cannot find the file specified)

        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:70)

        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)

        at java.net.URL.openStream(URL.java:1007)

        at com.jme.util.TextureManager.loadImage(Unknown Source)

        at com.jme.util.TextureManager.loadImage(Unknown Source)

        at com.jme.util.TextureManager.loadTexture(Unknown Source)

        at com.jme.util.TextureManager.loadTexture(Unknown Source)

        at com.jme.image.Texture.read(Unknown Source)

        at com.jme.util.export.binary.BinaryImporter.readObject(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.resolveIDs(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.readSavableArray(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.readSavableArrayList(Unknown Source)

        at com.jme.scene.state.TextureState.read(Unknown Source)

        at com.jme.util.export.binary.BinaryImporter.readObject(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.resolveIDs(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.readSavableArray(Unknown Source)

        at com.jme.scene.SceneElement.read(Unknown Source)

        at com.jme.scene.Spatial.read(Unknown Source)

        at com.jme.scene.Geometry.read(Unknown Source)

        at com.jme.util.export.binary.BinaryImporter.readObject(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.resolveIDs(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.readSavableArray(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.readSavableArrayList(Unknown Source)

        at com.jme.scene.Node.read(Unknown Source)

        at com.jme.util.export.binary.BinaryImporter.readObject(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.resolveIDs(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.readSavableArray(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.readSavableArrayList(Unknown Source)

        at com.jme.scene.Node.read(Unknown Source)

        at com.jme.util.export.binary.BinaryImporter.readObject(Unknown Source)

        at com.jme.util.export.binary.BinaryImporter.load(Unknown Source)

        at com.jme.util.export.binary.BinaryImporter.load(Unknown Source)

        at jmetest.renderer.loader.TestMaxJmeWrite.simpleInitGame(Unknown Source)

        at com.jme.app.BaseSimpleGame.initGame(Unknown Source)

        at com.jme.app.BaseGame.start(Unknown Source)

        at jmetest.renderer.loader.TestMaxJmeWrite.main(Unknown Source)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:585)

        at jmetest.TestChooser.start(Unknown Source)

        at jmetest.TestChooser.main(Unknown Source)

I got the same problem, did u find a solution ?

Before loading the model try setting this:



TextureKey.setOverridingLocation(MyClass.class.getClassLoader().getResource("relative/path/to/textures"));



Where 'MyClass' is your class name, and you put in the proper relative path to your textures.

Thanks, it doesn't complaine anymore saying : java.io.FileNotFoundException: texture.JPG (The system cannot find the file specified)

but my models doesn't seem to have it's textures, it still stay with some simple colors… I ll search for the bug.

i've had no luck getting 3ds to load it's texture…

it seems to export the entire path to the file, and formats the texture filename in 8.3 which is odd…

i normally over ride the texture location using



converter.setProperty("texurl", textureLocationURL);



this way when it imports the 3ds it uses the texture you specify as opposed to the one in the 3ds file…

have you tried .obj instead is there some reason why 3ds is your model choice If  you're using max it exports .obj from version 6 up and then there is blender that can import 3ds. added to that you can always fix path issues in a text editor with .obj