.3ds File Conversion

any one knows how to change rendering state of a 3ds object after loaded in game?

If you’ve directly put it on your root node from the loader, then you need to know the name of the Spatial in order to access it.



If you know the name of the Spatial, you can set a RenderState as such:


RenderState wireState = DisplaySystem.getDisplaySystem().getRenderer().createWireframeState();
rootNode.getChild("Super Cool Model").setRenderState(wireState);
rootNode.getChild("Super Cool Model").updateRenderState();



If you have the loaded model assigned to a variable already, then it is even easier than searching the rootNode (or whichever node is the parent), you can just apply it directily:


RenderState wireState = DisplaySystem.getDisplaySystem().getRenderer().createWireframeState();
coolModel.setRenderState(wireState);
coolModel.updateRenderState();



Take special note of the use of the updateRenderState() method, many people forget to use it and wonder why they don't see the state change :D