Advertisement

3ds File Format

Started by March 10, 2002 11:24 PM
2 comments, last by Darkan_Fireblade 22 years, 11 months ago
um can some one give me some gidence on coding a 3ds file loader please reply Sir Darkan Fireblade
Sir Darkan Fireblade
3DS file loading goes something like this:

File is build from chunks, and a chunk can have a subchunk, and the subchunk can have more subchunks etc.

Each chunk holds information: ID_number, chunk_length, and it''s own information (vertex data, texturemaps, faces etc. depending of the chunk)

Now what you do is this:

-open the file
-check if its a valid 3ds (by checking the main-chunk ID)
-if file was valid then start reading the chunks
-read until you have read the whole file.

-When reading chunks if you find an unknown chunk or a chunk that you don''t need then you simply skip it (still remember to adjust the file pointer by the lenght of the skipped chunk) otherwise you read the data in the chunk

-Remember that some chunks (subchunks) can''t be found if you don''t find the chunk above it first (quite clear, right?) That is: You can''t find the vertex data if you haven''t find the right chunk (tri-mesh!? [can''t really remember ] ) first.

The chunk IDs can be found anywhere from the net, I don''t remember them now


Vulture / Traction & NoID
Vulture / Traction & NoID
Advertisement
Here is some basic 3DS Info: right here !




_____________________
Yoshy - From The Bobs
_____________________
You can also try here.

"To err is human, to really mess up requires a computer"
"To err is human, to really mess up requires a computer"

This topic is closed to new replies.

Advertisement