Ok, after trying to get animation working with this loader I can almost taste victory, however… it’s still not finished. BUT, I’ve decided to just release it anyway because it loads models well enough and even supports real shared copies. Fixing the animation should be a sinch, and as soon as I get an important email it should be finished quickly–all the pieces for animation are basically there… Also, I’m not sure if it can load models from jar files, but you can give it a shot.
Anyways, this is a port (with permission) of an excellent 3DS loader for Java3D by Josh DeFord that can be found here:
http://www.j3d.org/utilities/loaders/3ds/deford.html
I would also like to thank Kevin Glass for his 3ds loader in xith because it greatly helped with the animation part of the loader (which still isn’t finished unfortunetly).
Look at the Example.java file and read the README for instrucitons on how to use it. Since the original loader used a SceneBase/LoaderBase paradigm, I decided to stick to it but subclassed SceneBase into a TDSModel. However, this means that you’ll have to cast the load() method on Loader3DS all the time like so:
TDSModel model = (TDSModel)(new Loader3DS().load("file.3ds"));
The only classes you need to use are Loader3DS and TDSModel (really just TDSModel).
Everything you need is here.
It’s fairly well javadoc’d, I’ll try to javadoc everything later. You can find it online here. Or you can compile it yourself with:
‘ant javadoc’
Enjoy, I will get animation working soon hopefully.
Features:
-
Get individual named Groups in models.
-
Real shared copies that work with animation
-
Loading using a URL (means jars will load too, see javadoc of Loader3DS)
-
Loading using a file name
-
Loads models using java.nio (so it’s fast!)
-
Animation (Semi-working)
Edit (4/27/05): I’m not longer really working on this, anyone is free to take over it. However if you have any questions about it (such as what all the unorganized comments mean), feel free to ask me any questions. My email is: greg -at- kinostudios -dot- com