general problems with loading models :X

Hello ppl,
I am new here… i saw many useful things in this forum (thank you), but i have some problems with loading 3d models and i could not find posts about them :-\

I’m trying to make some simple “game”, at the moment i have Oto model loaded + some keys to animate the walking and dodging animation + simple terrain to move on it :slight_smile:
(Using JME3, Oto model and the tutorials i found about JME3)

I have problems with finding that Oto model (win 7) i searched everywhere for it and couldn’t find it :frowning: - Can someone point where he is ? :smiley:
If i can see how the things work with that model i can make my own models work too (copycat ^^ )

??? The real problem for me is how to load my own models. I am talking about file formats and how to make it work.
for example I can make models on Maya. What format should i export from Maya? Do i need to work on it with some other software so that i can import them in Java and actually move them there?
Ask if you cant catch my thoughts.

Here is samples from my game source for basic scene. I don’t wanna paste whole code here because it will be too confusing :stuck_out_tongue: + feel free to use it if u want. It is made for education purposes. :slight_smile:


{import's from jme3}

public class aHelloSteffMakeUp extends SimpleApplication implements AnimEventListener {
	 
	  
	public static void main(String[] args){
		aHelloSteffMakeUp app = new aHelloSteffMakeUp();
        app.start(); // start the game
        }

	Node golem;
	
	/** golem's coordinates*/
	float xGolem;
	float yGolem;
	float zGolem;
	float scaleGolem;
	{
	 /* golem's starting place*/
        scaleGolem = 0.2f;
        xGolem = -40;
        yGolem = 1;
        zGolem = 0;
	}

	 static{
		    /** Initialize the floor geometry */
		    floor = new Box(Vector3f.ZERO, 50f, 0.1f, 50f);// shiro4ina viso4ina dyljina
		    floor.scaleTextureCoordinates(new Vector2f(50, 50));    
	 }


    public void simpleInitApp() {
/** Set up Physics Game */
        bulletAppState = new BulletAppState();
        stateManager.attach(bulletAppState);
    	
/** Configure cam to look at scene */
        cam.setLocation(new Vector3f(-50f, 5f, 0f));
        cam.lookAt(new Vector3f(0, 0, 0), Vector3f.UNIT_Y);
        
        initMaterials();
        initFloor();
        shootables = new Node("Shootables");                    //not needed  
        rootNode.attachChild(shootables);                           //not needed 
        shootables.attachChild(makeCube("a tin can", xGolem, yGolem+3, zGolem));     //not needed 
        shootables.attachChild(initFloor());   //not needed 
        
        /** za animacii ***************************************************************************/
        initKeys(); //not needed 
        initSun();
        initGolem();
        initCrossHairs(); //not needed 
        initMark();       // a red sphere to mark the hit //not needed 
        viewPort.setBackgroundColor(ColorRGBA.randomColor());
        
       
    };


   
 /** Initialize the materials used in this scene. *****************************************/
    public void initMaterials() {
    	floor_mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        TextureKey key3 = new TextureKey("Textures/Terrain/splat/grass.jpg");
        key3.setGenerateMips(true);
        Texture grass = assetManager.loadTexture(key3);
        grass.setWrap(WrapMode.Repeat);
        floor_mat.setTexture("ColorMap", grass);
    };



/** MAKE THE GOLEM */
    public void initGolem(){
    	golem = (Node) assetManager.loadModel("Models/Oto/Oto.mesh.xml");
        golem.setLocalScale(scaleGolem);
        golem.move(xGolem,yGolem,zGolem);
        golem.lookAt(new Vector3f(0f,0f,0f), new Vector3f(0f,0f,0f));
        rootNode.attachChild(golem);
        
        /** Make golem physical with a mass > 0.0f. */
        golem_phy = new RigidBodyControl(2f);
        /** Add physical golem to physics space. */
        golem.addControl(golem_phy);
        bulletAppState.getPhysicsSpace().add(golem_phy);
 
        control = golem.getControl(AnimControl.class);
        control.addListener(this);
        channel = control.createChannel();
        channel.setAnim("stand");
    };

   /** ADD SUN so we can see the golem*/
    public void initSun(){
    	DirectionalLight dl = new DirectionalLight();
        dl.setDirection(new Vector3f(-0.1f, -1f, -1).normalizeLocal());
        rootNode.addLight(dl);
    };
}

If u cant understand something or need more feedback with the things pls ask :slight_smile:
Any information given will be great :slight_smile:
Thank you in advance! :smiley:

You can find the Oto model here (along with most of the other assets used in the tutorials). Im not sure if the tutorials are up to date, because it seems that the assets are packed in another place in the newest version. I have not searched thoroughly though, so I might be wrong.

As to loading models, I know that they atleast support Ogre XML and Wavefront OBJ, so you should try export to one of those formats. See here. Also if you look at the “External Tools” section here, you’ll see a couple of tutorial videos on creating and exporting from 3D modelling tools.

Thank you for the fast replay and the hints :))

As far as it goes i can load only OBJ files and i load them only in JME3 :slight_smile:
I tried to load the same obj in Eclipse but there was a not found exception. I tried to move the obj file everywhere in my eclipse project dir. (no success)

About the Ogre XML file format I cant do much … Maya exports .mesh files (with ogre’s plug-in) but it seems that i need them in .mesh.xml format (right?) :persecutioncomplex: I export binary, not ASCII mesh files :confused:

I might do it wrong way … dunno :expressionless: but I wont give up till I make it how it needs to be :slight_smile:

JME3 are making a book,manual for it but there is no release date. I may wait for it ( :smiley: ). I will make the tutorials here and I’ll replay if I find solution.

Thank you again! :slight_smile: