I'm trying to load a model with its textures. The model loads fine, but with no textures.
Here's the code:
URL model = SimpleGameTest1.class.getResource("/resources/human-warrior.ms3d");
FormatConverter converter = new MilkToJme();
converter.setProperty("texdir","resources/");
ByteArrayOutputStream bo = new ByteArrayOutputStream();
converter.convert(model.openStream(), bo);
Node warrior = (Node)BinaryImporter.getInstance().load(new ByteArrayInputStream(bo.toByteArray()));
warrior.setModelBound(new BoundingSphere());
warrior.updateModelBound();
rootNode.attachChild(warrior);
I've seen some threads about problems loading Milkshape textures and classpaths, but in my case the models and textures are under <project-folder>/src/resources which should already be in the app classpath.
Anything wrong with my code?
Thx,
Brancha.