i used the testBumpMappimg.java
in this example Mark Powell used a torus and i want to use a model
which i load
Node maggie = null;
try {
converter.convert(model.openStream(), BO);
maggie = (Node) BinaryImporter.getInstance().load(new ByteArrayInputStream(BO.toByteArray()));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
maggie.setModelBound(new BoundingSphere());
maggie.updateModelBound();
a few lines later i want to use the example code
BumpMapColorController c = new BumpMapColorController(maggie);
maggie.addController(c); // npe
MaterialState ms = DisplaySystem.getDisplaySystem().getRenderer()
.createMaterialState();
ms.setColorMaterial(MaterialState.CM_DIFFUSE);
maggie.setRenderState(ms);
maggie.updateRenderState();
it works fine with the torus object but not with a node
also a little bit later these lines aren`t possible
//maggie.copyTextureCoords(0, 0, 1);
//maggie.getBatch(0).scaleTextureCoordinates(0, 8);
also works fine with torus
so.. is node the wrong class ?