How to load and render a model

I am trying to make a game (http://toywars.wordpress.com) using LWJGL and I want to put some models(obj, 3ds or anything) in it. Instead of trying to make my own model loader, I was advised to check if this could be done with jME.

I know nothing about jME and I couldn’t find an easy way to do this. Could someone please tell me if there is a specific model loader that could load a model from a file and render it? Thank you.

You can load various formats in jme, md2 md3 obj ms3d and others.



The com.jmex.model.util.ModelLoader class contains a main method to easily load any model.

Could you elaborate a liitle bit more on this please? Thinking in terms of OpenGL, is possible to use this class and then render the model on the spot, or should I study jME first and understand how it works?

Hi Manji,


manji said:

Could you elaborate a liitle bit more on this please? Thinking in terms of OpenGL, is possible to use this class and then render the model on the spot, or should I study jME first and understand how it works?


I think if you are going to use jme to load your object, then you have to use jme api and its scenegraph (returned object from jme loaders is a jme Node object...).
If you are making a game, jme provides a LOT of stuff for you (well, it's a game engine, after all  :P) ... so I suggest you to try to spend some time to investigate its features...

Else, try to give a look at the 3D Model loader by Jerome Jouvie:
http://jerome.jouvie.free.fr/OpenGl/Projects/ModelLoader.php

it seems Jerome provides the archive with compiled classes, I don't know if sources are avaiable, too.