loader for model files?

Started by Uli, July 23, 2003, 21:41:30

Previous topic - Next topic

Uli

Hi,

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

Uli

pixel

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    :?
o understand recursion, one must first understand recursion

mac

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
he Network is the Music
www.mac-systems.de

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 :)

mac

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 :)
he Network is the Music
www.mac-systems.de

princec

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 :)

mac

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
he Network is the Music
www.mac-systems.de

cfmdobbie

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:
ellomynameis Charlie Dobbie.

Fuseboy2

I have a basic importer for Milkshape ASCII exports, if it will help.

Fuseboy

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?

mac

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?
he Network is the Music
www.mac-systems.de

nala-naj

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

Matzon

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.

nala-naj

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!

ap_kelly

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.