• Advertisement
Sign in to follow this  

3ds file reader

This topic is 3566 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am writing a 3ds file reader that can support models with multiple objects in them and different textures on the objects. I have it reading the vertexes, facets and texture mapping coordinates for multiple different objects. I also have it reading the filenames of the textures. My problem is I can't work out where it stores which texture is on each object. None of the information I can find on the format tells me what is stored. Also does anyone know where I can find full information on what each chunk is for and what exactly it stores as all I have found is lists of chunk names and more specific information on some of the important ones. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
http://www.spacesimulator.net/tut4_3dsloader.html
And it has source code for a 3ds loader at the bottom

Share this post


Link to post
Share on other sites
I've been using that tutorial already. I have it reading the model's geometry ok. I also have it reading in the textures that are being using from the 3ds file. All I need to know is where it stores which texture is on which part of the model.
I have a model of a car that is in 6 object. The main chassis, the windows, and the 4 wheels. There is 3 textures for this as each of the wheels uses the same texture.
I want to know where is stores the data like
Object 1 uses texture 1
object 2 uses texture 2
objects 3,4,5,6 use texture 3

It should be stored somewhere in the file as when i import it into max it knows where each texture is and maps them correctly.

Thanks.

Share this post


Link to post
Share on other sites
(1)each (0xAFFF ) Material block has a (0xA000) Material name.
(2) each (0x4130)Faces material list has a (strz) Material name.
Use Material name as the key to link them.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement