problem reading 3ds files
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
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.
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.
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.
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.
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 Madhedi'll take a look into it, thanks.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement