3DS file structure

Started by
7 comments, last by rm2000 18 years, 5 months ago
Hello, I am wondering, is there a way to read the contents of a 3DS file unencrypted? Not sure if it is stored in BINARY or what, but I want to be able to read the vertex info and cluster info directly. Thanks!!
Advertisement
3DS is a binary format built out of a heirarchy of chunks. To read vertex info, just search for the appropriate chunks and read their data. Here's the file format spec I used for my loader:
http://www.wotsit.org/download.asp?f=3ds
I was able to get 3DS files loaded in my 3D Demo, but I want a quick way to view the file in a text editor without having to write a program for it. Is that possible?
You could use a hex editor to view the binary data directly. But if you want it in text format, you'll probably have to parse the file and print out the info yourself.
Quote:Original post by rm2000
I was able to get 3DS files loaded in my 3D Demo, but I want a quick way to view the file in a text editor without having to write a program for it. Is that possible?


The best thing to do would to be to write a small program to do this for you...
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"
Or use Max's ASE format. It contains the same info, but in text format.
Quote:Original post by dbzprogrammer
Quote:Original post by rm2000
I was able to get 3DS files loaded in my 3D Demo, but I want a quick way to view the file in a text editor without having to write a program for it. Is that possible?


The best thing to do would to be to write a small program to do this for you...


Yeah I did play around for 10 min with a VB loader reading AS BINARY. I did start to see the info I was looking for but there were still A LOT of strange characters. I guess I would have to do quite a bit of parsing for my data.

Binary files are typically not human-reable, thus the name, binary, and not text. So the simplest thing to do would be to use the loader that loads the files for your 3D demo, and output a text file instead of rendering. If you already have the code to load it, it should be no problem to make the output.
Free speech for the living, dead men tell no tales,Your laughing finger will never point again...Omerta!Sing for me now!
I suppose that would be a solution. What I am looking to do is add some info to the 3DS file, so I just have to think about how I want to do it. It might be easier just to breed a structure that I need and export the 3DS information via MAXSCRIPT. Thanks.

This topic is closed to new replies.

Advertisement