How to add the scene made by MonkeyWorld3D to JME?

The scene made by MonkeyWorld3D can be saved as an XML file. How to load this file to jme? Do I have to write some code to pharse this file and convert it to somthing that jme can read?



another question. I don't know how to place a model to a sence in MonkeyWorld3D. I have added them to workspace by rightclicking in the "workspace tab"  "workspace"  and selecting import -> models. The model can be seen in the workspace tree. But when I drag-and-drop it to the scene, nothing happaned. How can I place the model into the scene?

Hi,



take a look at this.



I think this is what you want.

i hate for this to be spam, punish me as needed but…





[size=30pt]PLEASE, STOP WITH THE ANIMAL NAMES!!![/size]

Wow, we seem to have found what upsets drfugly…come to the dark side drfugly…we can help you come up with a good animal name. :-p



darkfrog

to madlion :

    thanks a lot. I try it in eclipse, but an exception was catched. It says:

                java.lang.NoSuchMethodError: com.mw3d.core.entity.data.EntityNode.setWorldBound(Lcom/jme/bounding/BoundingVolume;)V

at com.mw3d.core.entity.CameraEntity.loadSpatial(CameraEntity.java:53)

at com.mw3d.core.entity.CameraEntity.<init>(CameraEntity.java:31)

at com.mw3d.core.util.Runtime.enableActiveCamera(Runtime.java:1721)

at com.mw3d.core.util.Runtime.activateLevel(Runtime.java:1527)

at com.mw3d.core.util.LevelManager.openLevel(LevelManager.java:152)

at MyApp.SimpleMonkeyGame.simpleInitGame(SimpleMonkeyGame.java:34)

at com.jme.app.BaseSimpleGame.initGame(BaseSimpleGame.java:447)

at com.jme.app.BaseGame.start(BaseGame.java:56)

at MyApp.SimpleMonkeyGame.main(SimpleMonkeyGame.java:92)



      Here is the code.



import java.util.Properties;



import com.jme.app.SimpleGame;

import com.jmex.physics.PhysicsWorld;

import com.jmex.sound.openAL.SoundSystem;

import com.jmex.sound.openAL.scene.SoundNode;

import com.mw3d.core.util.LevelManager;

import com.mw3d.core.util.Runtime;



public class SimpleMonkeyGame extends SimpleGame {



protected SoundNode soundNode ;

protected int sNode;



protected void simpleInitGame() {



    //Initialize the physics world for the game.

    initPhysicsWorld();

   

//Init the sound system.

initSoundSystem();



//Initialize the runtime.

    initRuntime();

   

//Load the level from the xml.

//String fullPath = SimpleMonkeyGame.class.getClassLoader().getResource("workspace/test6.xml").getPath();

String fullPath = "E:\MonkeyWorld3D\context";

System.out.println("Full path : " + fullPath);

LevelManager.getLevelManager().setWorkspace(fullPath);

        //This is only the file name without its extension.

LevelManager.getLevelManager().openLevel("level1");

//We need to do this to override the behaviour of our camera entity, this is

//because we are not finish with developing our Runtime input system.

Runtime.getRuntime().removeEntity(Runtime.getRuntime().getCameraEntity());

}



/**

  • This update must be called for updating all the relevant runtime behaviour.

    */

    protected void simpleUpdate() {

    Runtime.getRuntime().update();

    }   



    /**
  • Initializes the runtime.

    *

    */

    private void initRuntime() {

    // sets the runtime properties.

    Runtime.getRuntime().setProperties(new Properties());

    Runtime.getRuntime().setRootNode(rootNode);

    Runtime.getRuntime().setCamera(cam);

    Runtime.getRuntime().setSoundNode(sNode);

    }



    /**
  • Init the sound system.

    */

    public void initSoundSystem() {

    SoundSystem.init(cam, SoundSystem.OUTPUT_DEFAULT);

    soundNode = new SoundNode();

    sNode = SoundSystem.createSoundNode();

    }



    /**
  • Returns the sound node.
  • @return

    */

    public int getSoundNode() {

    return sNode;

    }



    /**
  • Creates the <code>PhysicsWorld</code> that will manage the physics.

    */

    private void initPhysicsWorld() {

    PhysicsWorld.create();

    PhysicsWorld.getInstance().setUpdateRate(100);

    PhysicsWorld.getInstance().setStepSize(2/100f);

    }



    /**

    *
  • @param args

    */

    public static void main(String[] args) {

    SimpleMonkeyGame app = new SimpleMonkeyGame();

    app.setDialogBehaviour(SimpleMonkeyGame.NEVER_SHOW_PROPS_DIALOG);

    app.start();

    }



    }

@drfugle Don't you like animals? As darkfrog says… we can help you :wink:



@jDonkey I didn't try it by my self. I just know about the thread. Sorry can't really help you with this.



Maybe it's a jme version problem!?

So that the method com.mw3d.core.entity.data.EntityNode.setWorldBound() is not right.

drfugly said:

*Cry for help  :D*


Just rename yourself into "jHam(p)ster", you know you want it.... :mrgreen:

to madlion:

   

    yes. It is a jme version problem.  The Spatial class in jME 0.9 Released has an method "setWorldBound(BoundingVolume worldBound)", but this method is deleted in new released jME 0.10.

   

    It seems I've got a big problem. I have to phase the xml myself.

Or you can just wait for MonkeyWorld3D version 3.0 to come out.



We will support jME 0.10!

Why don't you just stick with the supplied jme.jar that you downloaded with the release, I don't think you will have any problems with that.