3Ds Loader

Well if I take a look at all the loaders available at j3d.org to load 3ds files I wonder which one is best. Any suggestions? Is there one that covers everything like anumations and stuff also ?

I found Starfires/John Wrights loader to be very good.
I don’t think it does handle animations, but I’m not sure about that.

You could do your own loader. If you need to use a loader then you probably know enough of java3d to do your own loader. Cinema4D v6 CE (community edition) is a free version of Cinema4D. It exports to xml so you can read all info and convert it into a scenegraph.
Besides Cinema4D will read 3ds do some cleaning up on old file formats that startfire cannot read.

Notice that Starfire is limited and you wont be able to read custom tags (parameters) or ik information. You wont be able to read shading and texturing info unless the most basic and useless data.

Sounds as you have that loader for the Cinema4D XML format?

I dont need a loader. A loader would impose a particular scene graph structure on every app i would made. Just read the xml doc with the sax driver and when you encounter the relevant sections insert java3d code to build the scene graph directly.

Here have a peek to part of the xml file from Cinema4D for a simple cube. Most of the uv mapping info contain default information and the editor, viewport and prefs info was ommited.

Im still reading the free documentation about Cinema4D so i cant interpret everything. But the docs are there, are free, and are pro documentantion so its just a matter of reading them.

I think its unavoidable that everyone who is interesting in programming for games and 3d apps needs to learn how to use a modeler app in some detail.

<?xml version="1.0"?>

<c4d_file id=‘C4D6’>
<v6_basedocument level=‘0’>
<v6_baselist2d level=‘0’>


</v6_baselist2d>
<v6_root_object level=‘0’>
<v6_rootlist2d level=‘0’>
<obj_polygon level=‘0’>
<v6_baselist2d level=‘0’>


</v6_baselist2d>
<v6_root_tag level=‘0’>
<v6_rootlist2d level=‘0’>
<tag_phong level=‘0’>
<v6_baselist2d level=‘0’>


</v6_baselist2d>
<v6_basetag level=‘0’>



</v6_basetag>
</tag_phong>
<tag_uvw level=‘0’>
<v6_baselist2d level=‘0’>


</v6_baselist2d>
<v6_basetag level=‘0’>


</v6_basetag>
<tag_uvw level=‘1’>


































</tag_uvw>
</tag_uvw>
<tag_polygon level=‘0’>
<v6_baselist2d level=‘0’>


</v6_baselist2d>
<v6_basetag level=‘0’>


</v6_basetag>
<tag_polygon level=‘0’>








</tag_polygon>
</tag_polygon>
<tag_point level=‘0’>
<v6_baselist2d level=‘0’>


</v6_baselist2d>
<v6_basetag level=‘0’>


</v6_basetag>
<tag_point level=‘0’>






</tag_point>
</tag_point>
</v6_rootlist2d>
</v6_root_tag>

[quote]I dont need a loader. A loader would impose a particular scene graph structure on every app i would made. Just read the xml doc with the sax driver and when you encounter the relevant sections insert java3d code to build the scene graph directly.
[/quote]
Erm, i don’t get what your saying, a loader will just return you a node when you ask it to load a model, what you do with it after that is up to you. Doing the java3d code yourself you are writing a loader, but then forcing it into the scene graph, a loader is probably more flexible than what you suggest (I’ve got some user providable node handlers for special circumstances in my ac3d loader).

Just my 2p worth.

Endolf

I was trying to do loader for 3dstudiomax ascii scene some months before after puting it away. Its a very flexible 3d data format in hu ascii and got some problems with the basic loader interface.

For one and if i remenber well it has a method that returns a node, a group node that contains all your scene. This was a problem because sometimes i wanted the loader to give me a different scene graph with the same data like when building an animation the loader would detect a certain association of bones, tags and ik values and associate them with custom made java3d node called humanoid for instance, but in a flexible way and not having allways the same java3d object associated with the same hierarchy.

OK so i could configure a loader with options but this got too close to creating a second language. I could also load the basic nodes into an array and then rebuild the hierarchy on the spots it varies most but that also negates the purpose of using an editor to do it.

Besides a loader main function is parsing a file format so when you have a xml api that has all the parsing code it makes a loader quite useless to me.

I dont agree with you 100% that my code is the loader.
It is a loader in one way that it translates form Cinema4D xml into java3d custom nodes but its part of an application and not a general purpose api. Besides the loader is also an interface well defined in the java3d utilities packages (more suited for vrml if you ask me) so you have to be stuck to that specific interface. Of course that you can add customizing options but if your loader is too specific for your own application is this worth the trouble ?

well seams like an interesting point to me … XML parsing is defently very handy and will take a look at the Cinema4D program later. For the moment I am just testing a few different loaders to see which one works fine and not for later … tried the Neverwinter Night file loader yesterday and this one seams to work pretty good for easy animation of animals and so …

Thanx for the tips.