Hello i'm working again on Bombastic (some of you know about it) and i'm facing a new problem while my prereqs have changed.
In JME 0.9 the code under was working, now the Texture of the loaded Model is not found. Do you have any idea how to solve the problem.
If ti consist to edit the model can you provide me a godd editor for milkshape ?
trace.startMethod("BoardUI.loadBoardModel()");
Node boardNode=null;
MilkToJme converter=new MilkToJme();
converter.setProperty("texdir","resources/models/");
ByteArrayOutputStream BO=new ByteArrayOutputStream();
URL diceModel=DiceUI.class.getClassLoader().getResource("./resources/models/board.ms3d");
try
{
converter.convert(diceModel.openStream(),BO);
} catch (IOException e) {
trace.println("damn exceptions:" + e.getMessage());
}
try
{
boardNode=(Node)BinaryImporter.getInstance().load(new ByteArrayInputStream(BO.toByteArray()));
} catch (IOException e) {
trace.println("damn exceptions:" + e.getMessage());
}
URL textu=DiceUI.class.getClassLoader().getResource("./resources/models/boardFace.bmp");
TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();
ts.setEnabled(true);
Texture texture = TextureManager.loadTexture(
textu,
Texture.MM_LINEAR,
Texture.FM_LINEAR);
texture.setWrap(Texture.WM_WRAP_S_WRAP_T);
ts.setTexture(texture);
boardNode.setRenderState(ts);
TextureManager.releaseTexture(texture);
boardNode.updateRenderState();
boardNode.setLocalScale(.18f);
trace.endMethod();
return