3DS Loader available

Hi there,

Some of you may be aware or may have used the mri-v3ds.jar library available at this website http://www.multi.fi/~mbc/v3ds/Decode3dsApplet.html.

Well the original author Mats Byggmästar does not maintain the code for this anymore, and he has kindly donated the source to me. So I’m taking requests for updates and bug fixes.

The latest version of the library (same as the original) is on my website http://games.swizel-studios.com but will be updated soon with better support for materials (for a project I’m working on).

Enjoy,

Andy.

?

It loads from 3DS - but where does it load TO? Java3D?

It loads from .3ds into a data structure in memory. I’ve written a basic wireframe renderer using lwjgl, and will be adding this to my site shortly along with the code.

The library just knows about the .3ds file format and nothing about OpenGL or any rendering process, thats upto the developer to write, so you could get it into a Java3D scene without too much trouble I think.

When I’ve got round to uploading the code, hopefully someone will be able to help me optimise it into a workable package that other can base their work upon.

Andy.

Great … will take a look into it later and try and make it useable for JOGL!

Cheers dude, that’s sweet!
Does it do animation and stuff like that?

Cas :slight_smile:

I wonder if this could be hosted on games.dev.java.net as a utility project - it’s the kind of thing that many people might want to use and having the source code worked on by the community seems like a good idea.

I’ve thought a lot about the creation of a standard .3ds parsing library for some time. The work originally done on this library is very good, but I don’t think it supports the latest version of the .3ds file format very well. I’ve been adding in the bits I need for my project as I go, I also have a suit of .3ds files I can use to test each successive build hasn’t broken anything.

I think a combination of this library and the work done over at http://lib3ds.sourceforge.net/ and http://c3ds.sourceforge.net/index.php?action=home would give the best results for a standard Java library for the parsing of .3ds files.

I’ll email the original author of the library I maintain to see if he has any objections to me placing the code on the java.net site and we can take it from there.

Andy.

That would be great.

I’ve loaded a 3ds file with library and I have lots of see-through polygons. Do 3ds files have polygons all winding the same way? And… 3ds models can have double sided polygons, can’t they? (just trying to track down what the issue is)

BTW thanks for making the library available - I didn’t want to write my own or port lib3ds :o)

[quote]That would be great.

I’ve loaded a 3ds file with library and I have lots of see-through polygons. Do 3ds files have polygons all winding the same way? And… 3ds models can have double sided polygons, can’t they? (just trying to track down what the issue is)

BTW thanks for making the library available - I didn’t want to write my own or port lib3ds :o)
[/quote]
Noone has any idea what the issue might be?

[quote]I’ll email the original author of the library I maintain to see if he has any objections to me placing the code on the java.net site and we can take it from there.
[/quote]
Any news on this. I really need the world to object space matrix.

I’ll upload the latest version of the codebase to my website this evening. Someone can then take the code and add it to games.java.net.

I’ll also upload the basic OpenGL renderer I wrote using lwjgl so you guys can get up to speed quickly. I warn you now, this code isn’t optimised in any way, shape or form.

Hopefully we’ll be able to come up with a single .3ds loader that works with the latest version of the file format, and have renderers for JOGL, Xith3D and LWJGL.

Andy.

http://games.swizel-studios.com/

The source is now available, so go forth and enjoy!

I’d like to keep up to date with any improvements made to the library, and if someone can do a better job of the rendering code I’d love to get hold of a copy.

Andy.