Hello Guest

Milkshape Model Loader

  • 1 Replies
  • 3236 Views
Milkshape Model Loader
« on: January 09, 2012, 15:47:36 »
Hello out there,

I have just finished my Milkshape Model Loader that is based on naj's work ( http://lwjgl.org/forum/index.php?topic=211.0 ).

Just use the cmdl.jar to get a .cmdl file from a ascii Milkshape Format.
This is done via console (e.g. java -jar cmdl.jar TestFile.txt, this will create you a TestFile.cmdl)
Then you can use this .cmdl file in your games via ModelLoader.loadModel(filename).
Model model = ModelLoader.loadModel(TestFile.cmdl);
model.setFPS(int) for animation speed
model.setAnimated(true/false)
model.draw().

The model uses VBO and is quite fast so far. I am pretty happy with it at this point of time.

You can get my jar from the attachments of this topic. The sourcecode is added too.


Have Fun with it

Chris




Re: Milkshape Model Loader
« Reply #1 on: February 22, 2012, 16:04:21 »
I see that there is an ms3d package in your source code. Can this also load ms3d files directly in the way you specified above?

Thank you

Very helpful by the way

EDIT: Sorry I'm still very new to this. It seems to me now that the ms3d IS the ASCII milkshape format... Is this true? I'll carry on looking.

EDIT2:
Ok thanks, I successfully converted the file with the added jar file.

EDIT3:
I can't get this working. Can anyone point me in the right direction? I copied the code to my project, and called these lines:
Model model = ModelLoader.loadModel(TestFile.cmdl);
model.setFps(int) for animation speed
model.setAnimated(true/false)

as above in my initialization code, and then call model.draw() in my main loop in a general render function. There are no errors, however nothing happens at all. Any ideas?
« Last Edit: February 22, 2012, 17:01:33 by Denzil »