Materials get not applied to .obj models when loaded in a gamestate based game

Hello,



the subject says it all, while my .obj model loader is basically a copy of the one in jmex.model.util.ModelLoader in my case the material does not seem to get applied to the model. Maybe one of You could help me out here?



That's my loader:


    class Loader implements Callable<Node> {

        private String letter;
        private URL model;
        private URL material;
        private FormatConverter converter;

        Loader(String letter) {
            this.letter = letter;

            this.model = ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_MODEL,
                    letter + ".obj");
            this.material = ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_MODEL,
                    letter + ".mtl");

            this.converter = new ObjToJme();
            converter.setProperty("mtllib", material);
        }

        @Override
        public Node call() throws Exception {
            ByteArrayOutputStream BO = new ByteArrayOutputStream();
            Savable savable = null;
            try {
                converter.convert(model.openStream(), BO);
            } catch (IOException ex) {
                logger.severe("Can't convert Model: " + ex);
            }
            try {
                //load as a TriMesh if single object
                savable = (Savable) BinaryImporter.getInstance().load(
                        new ByteArrayInputStream(BO.toByteArray()));
            } catch (IOException ex) {
                logger.severe("Binary import failed: " + ex);
            }
            if (savable instanceof Node) {
                return (Node) savable;
            }
            Node node = new Node(letter);
            node.attachChild((Spatial) savable);
            return node;
        }
    }



and I call it like that:


        LetterView representation = null;

        Loader loader = new Loader(letter.getLetter().toString());

        Future<Node> future = GameTaskQueueManager.getManager().update(loader);
        try {
            representation = new LetterView(letter, future.get());
        } catch (InterruptedException ex) {
            logger.log(Level.SEVERE, null, ex);
        } catch (ExecutionException ex) {
            logger.log(Level.SEVERE, null, ex);
        }



LetterView is basically a representation of a letter using the model provided by the Loader.  Oh: I got Object an material files for the Letters.

Thank You,
    Florian