Texture Issues Loading Collada File

Hi,



I’m currently trying to load my level data from a collada file. I’ve been able to use the md5 code to get it to load the test fish model (including texture and animation). However, when I add both the fish and the level from the collada file to the rootNode, it looks like in this screenshot. For comparison, in blender it looks like this. When I disable adding the fish to the rootNode, I get a fully white image, so I guess jme is just not setting the texture state. However, when I peek into the objects using eclipse, the images look fine inside the nodes.

The ResourceLocatorTool paths should be ok, I don’t get any error messages on load. Just in case, here’s the collada file I created: BasicRoom.zip. It doesn’t load any more in blender, but I guess its importer is just broken, since it’s missing a mesh that’s clearly there.



My loading code is


         URL levelURL = ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_MODEL, "BasicRoom.dae");
         if(levelURL == null) {
            logger.log(Level.SEVERE, "Unable find level");
            System.exit(-1);
         }
         ColladaImporter.load(levelURL.openStream(),"level");
         scene = ColladaImporter.getModel();
         scene.setModelBound(new BoundingBox());
         scene.updateModelBound();
         
         rootNode.attachChild(scene);



Did anyone ever encounter this issue and was able to fix it? I'm running out of ideas...

Are you calling updateRenderState on your rootNode after loading the scene?

Ha, that solved this issue, thanks :slight_smile:



Now it does display the textures, but the floor texture is not tiled but clamped. The other two are properly tiled, but I can't see any difference in the declaration in the Collada file. Is this a bug in the importer?