Quote: "...and, who knows, that might be the problem. And you don't know that for a fact, there might be another coloring system."
(COL_UNK actually, but it hasn't actually been used in any 3DS files so far. Give me a 3DS file from the anim8or exporter, and I will be happy to sift through it with a hex editor, to prove the complete lack of COL_UNK.)
(Sorry to everyone else, but how the colours are stored could actually help prove whether it's anim8or's fault or DBC's fault the colours aren't working.)
Three colour types used in 3DS files - COL_RGB, COL_TRU, COL_UNK.
No traces of COL_UNK have been found in any files exported by programs, so that *has* to be swept of the list.
(Note: The 3DS documentation article I looked up had references to a 3DS file loader written in C++.)
http://www.wotsit.org << Data source: The Wotsit File Format database, search for '3DS' and look in the second reference file, '3D Studio File Format v0.93 (RTF) [Martin van Velsen/Robin Fercoq/Jim Pitts]'.
COL_RGB is (obviously) the RGB colour type, and COL_TRU is a 'true colour', 24-bit number that can be split into normal Char (8-bit) R,G,B.
Excerpt of code showing that ReadRGBColor() is used to read COL_RGB chunks, and that ReadTrueColor() is used to read COL_TRU chunks:
switch (temp_int)
{
case COL_RGB :
#ifdef __DEBUG__
printf (" Found Color def (RGB) chunk id of %0Xn",
temp_int);
#endif
tellertje+=ReadRGBColor ();
break;
case COL_TRU :
#ifdef __DEBUG__
printf (" Found Color def (24bit) chunk id of %0Xn",
temp_int);
#endif
tellertje+=ReadTrueColor ();
break;
default: break;
}
ReadRGBColor() code:
unsigned long ReadRGBColor (void)
{
float rgb_val [3];
for (int i=0;i<3;i++)
fread (&(rgb_val [i]),sizeof (float),1,bin3ds);
#ifdef __DEBUG__
printf (" Found Color (RGB) def of: R:%5.2f,G:%5.2f,B:%5.2fn",
rgb_val [0],
rgb_val [1],
rgb_val [2]);
#endif
return (12L);
}
ReadTrueColor() code:
unsigned long ReadTrueColor (void)
{
unsigned char true_c_val [3];
for (int i=0;i<3;i++)
true_c_val [i]=ReadChar ();
#ifdef __DEBUG__
printf (" Found Color (24bit) def of: R:%d,G:%d,B:%dn",
true_c_val [0],
true_c_val [1],
true_c_val [2]);
#endif
return (3L);
}
(If you need any help translating the C++ excerpts ('PrintF' syntax, etc.), I can help.)
[Insert extremely witty comment here] :: Add me to MSN if you like, but don't expect any big favours [unless you like VB6]. ... IDK!!