Hello,
I have any problem when i imported a file product with blender in JME.
I exported this file in obj format and file .mth.
The object is loaded in a scene of the game but the texture missing, i saw in the web but i not able to solve this problem.
The exception is:
13-apr-2010 20.35.35 com.jme.util.TextureManager loadImage
AVVERTENZA: loadImage(URL file, boolean flipped): defaultTexture used
java.io.FileNotFoundException: C:Documents and SettingsMIcheleworkspacejmeMATTONI-MURI—104.JPG (Impossibile trovare il file specificato)
i have insert into folder C:Documents and SettingsMIcheleworkspacejme the file Mattoni-Muri—104.jpg
but the message error is equals.
I apologize for grammatical errors.
Waiting for your advice MIchele Castriotta
Greetings
protected void simpleInitGame() {
TextureState ts = display.getRenderer().createTextureState();
URL model=HelloModelLoading.class.getClassLoader().getResource("jmetest/data/model/a.obj");
FormatConverter converter=new ObjToJme();
converter.setProperty("mtllib",model);
Texture baseMap = TextureManager.loadTexture(TestNormalmap.class.getClassLoader().getResource(
"jmetest/data/images/pav14.bmp"), Texture.MinificationFilter.Trilinear,
Texture.MagnificationFilter.Bilinear);
ts.setTexture(baseMap, 0);
ByteArrayOutputStream BO=new ByteArrayOutputStream();
try {
converter.convert(model.openStream(), BO);
Node maggie=(Node)BinaryImporter.getInstance().load(new ByteArrayInputStream(BO.toByteArray()));
converter.setProperty("texdir",model);
try {
ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_TEXTURE,
new SimpleResourceLocator(Test.class.getClassLoader().getResource("jmetest/data/model/")));
} catch (URISyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
maggie.setRenderState(ts);
maggie.setLocalScale(.19f);
maggie.updateRenderState();
rootNode.attachChild(maggie);
} catch (IOException e) {
logger.logp(Level.SEVERE, this.getClass().toString(),
"simpleInitGame()", "Exception", e);
System.exit(0);
}
}