Boris Kuchin
unread,Jun 20, 2012, 3:26:34 PM6/20/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lib3ds
Hi.
I need to save 3d-model data in 3DS format. I have one simple object:
bunch of vertices, triangles and texture coordinates. Also I have
single texture for all faces, only texture coordinates are changing.
So, I basically understand how to store vertices and faces data. But
I've looked through code and I have no idea how to store texture in
3DS file. There is "texture map" chunk but it is just a bunch of flags
with no bitmap data storage available. I think that for "texture"
materials you need to store texture bitmaps somewhere.
So, I have these questions at the moment:
1. Where bitmap data should be stored, what format should it be in and
how it should be referenced from material description?
2. Are texture coordinates normalized to (1, 1) as it is by default in
OpenGL or should they be set directly in pixels?
3. How should I set flags for ambient and other types of reflection
(first three chunks in material group I believe) to get some "general"
material appearance? No gloss or other special material effects. Just
texture.
Thanks in advance for your replies.