Sign in to follow this  
Android07

3ds file reader

Recommended Posts

Android07    122
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
Tenac    124
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
Android07    122
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
steven katic    275
(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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this