Hi Drake,
The choice of 3D file format is a hard question depending on your target
use (scientific, game, internet ?).
For exemple, the ASE file format is not very suited for scientific
applications because coordinates are stored as float values (or even
less precise (4 digits behind coma), while often scientific applications
require double precision data.
Going for an XML file format (such as X3D, you have already a completely
specified file format, why write a new proprietary one ?) are not well
suited for the internet, because of the multiplication of long tag names
everywhere in the source that will increase the size of your file by a
factor of 2 or 3 (and for the net, this matters a LOT).
Why would you go for :
<polygon name =3D "frontside" style=3D"strip">
<texture>front<\texture>
<vertex x =3D"10", y=3D"20", z=3D"30"\>
<vertex x =3D"20", y=3D"30", z=3D"30"\>
<vertex x =3D"30", y=3D"40", z=3D"30"\>
<\polygon>=20
When you can store your data like :
POLYGONS "frontside" STRIP
TEXTURE front
10,20,30
20,30,30
30,40,40
X3D seems to be a good scene graph format (though it is very heavy) and
it is able to store humanoid animations. The problem is, to my
knowledge, no popular 3D software has an exporter for it ! 3dsMax, Maya,
Lightwave...
So you'd have to code the exporter as well (twice the job) !
There is another file format that could be interesting : it is XGL. An
attempt to melt xml with data prepared to be used quickly with OpenGL,
without doing any numeric manipulations. It comes with converter from
3ds files.
But the problem is that the textures are converted to ascii text and
nested in the file. Textures get hard to read, and a file with a 512k
jpg texture can easyly grow up to 10 megs ! I personally prefer
externally linked jpg or png files. Compression is way more efficient !
I have personally made up my choice for the 3dsMAX ASE file format,
which is very easy to parse, but there are problems with coordinate
systems (global matrix vs local matrix), so it's probably not the best
format arround.
Still, it does store almost everything contained in a 3dsMAX scene,
including animations. But it is only for 3DsMax, and Autocad I think.
One other good ASCII candidate is the the wavefront object (.obj) file
format, which is supported by 3dsMAX, Maya and also lightwave I beleive.
To my opinion, the best ASCII file format arround is the shout3d .s3d
file format : ASCII and very compact, easy to parse, scene graph
structure, animation, morphing, complete textures...
The 3dsMax exporter is packaged with shout3D and can be freely
downloaded for educational use. But when I emailed the guys to ask if I
could import their file format, they wanted me to licence their
technology, and I know these guys don't make good prices on that kind of
things.
If you want to go for ASE, I can provide you some help and pieces of
code.
Wavefront .obj seems like a good choice too. I'd look at it closely if I
were you.
Regards,
Alban Cousini=E9
=20
|