Sign in to follow this  
WWakerFAN

problem reading 3ds files

Recommended Posts

WWakerFAN    108
i'm currently trying to read in a 3ds file, and i'm having a little trouble with materials, once i've read the chunk id and length for the diffuse part i create a struct (struct whatever {unsigned byte r,g,b};) to store the values in, however after i've read those it doesn't seem to work properly, i have a feeling that their might be data i might be missing since the entire length for that chunk is like 14

Share this post


Link to post
Share on other sites
_goat    804
I would suggest the error is beforehand:

3DS files have generic colour chunks, whose usage is denoted in the preceding chunk. Thus they are comprised of the chunk header and four bytes. This leads to a length of 10, not 14.

Edit: Grammar.

Share this post


Link to post
Share on other sites
Madhed    4095
Hi WWakerFan:

There is a free 3ds loading library available at http://www.levp.de/3d/3ds.html.
I used it once in my project and it was pretty clean and read everything from a 3ds file.

I would suggest using this library if you're not doing this for learning reasons.

Share this post


Link to post
Share on other sites
WWakerFAN    108
Quote:
Original post by _goat
I would suggest the error is beforehand:

3DS files have generic colour chunks, whose usage is denoted in the preceding chunk. Thus they are comprised of the chunk header and four bytes. This leads to a length of 10, not 14.

Edit: Grammar.


i'm pretty sure that isn't the issue, if it was i wouldn't have been able to go to the next chunk

Quote:
Original post by Madhed
Hi WWakerFan:

There is a free 3ds loading library available at http://www.levp.de/3d/3ds.html.
I used it once in my project and it was pretty clean and read everything from a 3ds file.

I would suggest using this library if you're not doing this for learning reasons.
i'll take a look into it, thanks.

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