LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Uli on July 23, 2003, 21:41:30

Title: loader for model files?
Post by: Uli on July 23, 2003, 21:41:30
Hi,

before I start working myself, has anyone created a loader for model files (3D studio,  anim8or, ...) yet?

Uli
Title: loader for model files?
Post by: pixel on July 24, 2003, 07:49:24
I have a DirectX mesh loader in progress but I am waiting for the version release with no pointers before I share it.

Actually, I have been working on an XML definition for a common model file format, while XML is a bit heavy for games, since the parsers are in jdk 1.4, it makes the file format easy to read and debug and it compresses well.

If I define a common file format, writing converters for other file formats should be no problems...

pixel    :?
Title: loader for model files?
Post by: mac on July 24, 2003, 08:31:55
Hi,

i found some good small .3ds Loader.

http://www.multi.fi/~mbc/v3ds/Decode3dsApplet.html

It tested it a bit, and found it usefull, any easy to use.

- Jens
Title: loader for model files?
Post by: princec on July 24, 2003, 09:13:32
Chaz has got a 3dsmax XML exporter he was working on for quite a while. Much more useful than .3ds format.

The trick with XML is to use it only as a development tool - like Java source code. Export to XML, slurp it in using your own reader tool, and save out a serialized Java object which is what you deploy. Much more sensible; much faster; much more compact.

Cas :)
Title: loader for model files?
Post by: mac on July 24, 2003, 10:23:13
If i understand it right :  He was written a 3dsmax plugin ?
If found the MRI solution quite usefull , you can access easy all kind of stuff like Cameras or Meshes Smothgroups

- Jens

Quote from: "princec"Chaz has got a 3dsmax XML exporter he was working on for quite a while. Much more useful than .3ds format.

The trick with XML is to use it only as a development tool - like Java source code. Export to XML, slurp it in using your own reader tool, and save out a serialized Java object which is what you deploy. Much more sensible; much faster; much more compact.

Cas :)
Title: loader for model files?
Post by: princec on July 24, 2003, 10:59:38
It was just a bit of maxscript which he made into a plugin. Can't remember the details but it's kicking around somewhere... we need to resurrect it to see if we want to use it in the next game.

Cas :)
Title: loader for model files?
Post by: mac on July 24, 2003, 11:31:05
hmm,

but whats about the loading XML into 3Dmax ? u allways need the .max file. Or is there also some Importer avaible for XML ?

- Jens
Title: loader for model files?
Post by: cfmdobbie on July 24, 2003, 13:27:15
I believe he's talking about an output routine - you work with the .max files as usual, and export to XML for the game to play with.  Like rendering an image for use elsewhere, but rendering the geometry instead. :wink:
Title: Milkshape Importer
Post by: Fuseboy2 on July 24, 2003, 21:39:40
I have a basic importer for Milkshape ASCII exports, if it will help.

Fuseboy
Title: loader for model files?
Post by: Uli on July 25, 2003, 07:24:42
I had a first look on the mri stuff now, seems to be quite useful. Unfortunately there's no source code available. I agree with Cas that loading serialized java objects is a lot faster than parsing xml or .3ds files. If I had the sources I could make the mri classes serializable. What I'm thinking of now is bulding some serializable classes on top of the mri classes, which use the mri classes for loading the information out of the 3ds file and then write themselves to disk. Later in my game I would'n need the mri classes any more, only my selfmade classes which load the serialized information from disk. What do you think?
Title: loader for model files?
Post by: mac on July 25, 2003, 07:29:00
Good Morning  :D

MRI wrote that he wants to public the Source...
The Serialization is not that hard i think, coz
he only uses simple Classes.

- Jens


Quote from: "Uli"I had a first look on the mri stuff now, seems to be quite useful. Unfortunately there's no source code available. I agree with Cas that loading serialized java objects is a lot faster than parsing xml or .3ds files. If I had the sources I could make the mri classes serializable. What I'm thinking of now is bulding some serializable classes on top of the mri classes, which use the mri classes for loading the information out of the 3ds file and then write themselves to disk. Later in my game I would'n need the mri classes any more, only my selfmade classes which load the serialized information from disk. What do you think?
Title: loader for model files?
Post by: nala-naj on August 08, 2003, 04:38:41
Can someone give me a quick, or thorough  :wink:, or even a useful link, run through of what to do with a model file that you import into lwjgl?

Here is my situation:

- I have an xml model converted from a .blend (Blender3D) model
- I want to write a program, or use an existing one, to read the xml, create java a object(s), and serialize it for future use in my games.

My problem is that I dont know what kind of objects I need to be creating for lwjgl to use?  Is there some opengl object that represents a model or animation?  Or do I have to create my own "GameModelObject" that stores a bunch of glVertices and so forth that opengl can render for me?

If there is not something like this already in lwjgl I would love to contribute it back to the project if people think it would be useful.  Of course mine will be working with Blender files, but it should be fairly easy to take in all kinds of formats.

Thanks so much!

-nn
Title: loader for model files?
Post by: Matzon on August 08, 2003, 05:40:11
QuoteOr do I have to create my own "GameModelObject" that stores a bunch of glVertices and so forth that opengl can render for me?
This is exactly what you have to do, AFAIK.

QuoteIf there is not something like this already in lwjgl I would love to contribute it back to the project if people think it would be useful. Of course mine will be working with Blender files, but it should be fairly easy to take in all kinds of formats.
We'd love any contributions. However, model loading and other non critical stuff will be placed in somekind of optional support library. The LWJGL distribution will always be bareboned and small. Then people can add support  libraries to their hearts content.
Title: loader for model files?
Post by: nala-naj on August 08, 2003, 12:20:49
Quote from: "Matzon"
Quote
We'd love any contributions. However, model loading and other non critical stuff will be placed in somekind of optional support library. The LWJGL distribution will always be bareboned and small. Then people can add support  libraries to their hearts content.

Sure... if it were part of lwjgl it would probably go in a util package, but I think it would make the most sense to be a separate download that is useful for build lwjgl games.  No reason to bloat the core lib with something like this.

Thanks!
Title: 3ds loader available
Post by: ap_kelly on August 19, 2003, 03:27:31
Hi there,

I've managed to get hold of the source code for the mri-v3ds.jar library that has been mentioned here. The author considers the project dead, and hasn't worked on the code since 2001, I'll be maintaining the code from now on as much as humanly possible.

I'm currently using the library with lwjgl to render some models, and I will be making the library available on my website within the next week.

http://games.swizel-studios.com

The library will be updated soon (as soon as I get CVS working at home), to handle some more chunks that I require which are currently unsupported by the library. If you have any bug reports or requests for improvements regarding mri-v3ds.jar, please email me.

My website should be going live this week, you can find the lib along with my contact details there.

Regards,

Andy.
Title: loader for model files?
Post by: Matzon on August 19, 2003, 05:02:36
Nice. I tried your site, jnlp files aren't available.
Title: loader for model files?
Post by: mac on August 22, 2003, 14:35:56
Fine to hear that you maintain the mri loader code :)

- Jens