.3ds texture path


Allthough it has probably been explained somewhere else on the forum, I just can't seem to be able to find the solution to this problem. I've converted a .3ds file to .jme and want to load it into my game now. The problem is that jme is now searching for the texures in the project's root directory, instead of the models/textures directory.

Is there a way to solve this problem, and if so, what it is?


If you are using a release you can specify the texture path in the jme loader with the "texurl" property. If you are using the CVS version you should already specify it in the conversion process.

I'm using the latest CVS files. Where do I set it during conversion? This is what my converter does:

   public Converter( String... args ) {
        new DummyDisplaySystem();
      MaxToJme m2jme = new MaxToJme();
      m2jme.attemptFileConvert( args );

   public static void main(String... args){
      new Converter( args );


m2jme.setProperty("texurl", yoururl);

before attemptFileConvert.

To the other devs: loading the url from .jme file causes problems when releasing with .jme files, doesn't it? I think we still have some work to do thereā€¦


Another problem I'm facing is that the models aren't being displayed in the gameworld. When I just place the images in the project root the models should just load normally. However, when I attach them to the scene, nothing is being displayed.

This is how I load the information from the file

            String fileName = model.getFileName();
            // Check in the model directory for the file in .jme format
            String jmeFileName = modelDirectory + fileName + ".jme";
               URL file = ModelManager.class.getClassLoader().getResource(
               JmeBinaryReader jbr = new JmeBinaryReader();
               //jbr.setProperty("bound", "box");
               Node node = reader.loadBinaryFormat(file.openStream());

               models.put(fileName, node);

            } catch (FileNotFoundException e) {
               logger.log(Level.SEVERE, "File not found: " + jmeFileName);

            } catch (IOException e) {
            } catch (NullPointerException e) {

'models' is a <String, Node> hashmap from which I later load the node as such:

Node model = ModelManager.getModelManager().getModel( fileName );

this.attachChild( model );

When I run the game, I see nothing and the fps seem to imply that nothing is being done. When I check the number of vertices and triangles that the node has, this is 42 and 24, so it seems that the info it there.

Does this ring any bells?

hmm, well what is 'this'. Is it rendered, or contained in the application root node? If no - do so :slight_smile:

'this' is a class that extends Node which, in turn, is attached to the application root node. When I replace the model Node with a 10x10x10 Box, the Box displays correctly, it's just the imported model that doesn't.

ok. maybe it's culled because it lacks boundings? check these. If you want to apply some, call setModelBounds and updateModelBounds.

Thanks, that was it. I though setting the reader property 'bounds' tackled it, but I needed to add it seperately.