RenControlEditor + Milkshape

Hi,



    I wanted to know if it is possible to replace the Box on terrain in RenControlEditor.java with a Milkshape imported model.

If so could you please tell me how to do so or link me to some examples on similar lines. I tried modifying setupcharacter() method in RenControlEditor like this :


 try {
                i = (Node) BinaryImporter.getInstance().load(new ByteArrayInputStream(BO.toByteArray()));
            } catch (IOException e) {
                logger.info("darn exceptions:" + e.getMessage());
            }

            Node modelRoot = new Node("Milkshape");
            modelRoot.attachChild(i);
            modelRoot.updateWorldBound();
            m_character = new Node("char node");
            m_character = modelRoot;
            rootNode.attachChild(m_character);

            m_character.getLocalTranslation().y = 255;
            m_character.updateWorldBound(); // We do this to allow the camera setup access to the world bound in our setup code.




and got this error :

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at jmetest.util.JMESwingTest$ControlImplementor.setupChaseCamera(Unknown Source)
        at jmetest.util.JMESwingTest$ControlImplementor.simpleSetup(Unknown Source)
        at com.jmex.awt.SimpleCanvasImpl.doSetup(Unknown Source)
        at com.jmex.awt.lwjgl.LWJGLCanvas.paintGL(Unknown Source)
        at org.lwjgl.opengl.AWTGLCanvas.paint(AWTGLCanvas.java:308)
        at org.lwjgl.opengl.AWTGLCanvas.update(AWTGLCanvas.java:339)
        at sun.awt.RepaintArea.updateComponent(RepaintArea.java:239)
        at sun.awt.RepaintArea.paint(RepaintArea.java:216)
        at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:301)
        at java.awt.Component.dispatchEventImpl(Component.java:4486)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)





Thank you,
Pranav