airseb
03-11-2005, 12:10 PM
Hi,
I don't manage to read colors'meshes in my .3ds files. I read in the 0xa010 then in 0x0011 but when i display the red, green and blue values by doing a cast to an integer i have for example a white color instead of a brown one (for the color of skin of a character)under 3d studio max.
Can you help me ?
case 0x0011: unsigned char red, green, blue ;
file.read((char*)&red, sizeof (unsigned char));
file.read((char*)&green, sizeof (unsigned char));
file.read((char*)&blue, sizeof (unsigned char));
cout<<dec<<"rouge "<<(int)red<<" vert "<<(int)green<<" bleu "
<<(int)blue<<endl ;
break ;
I don't manage to read colors'meshes in my .3ds files. I read in the 0xa010 then in 0x0011 but when i display the red, green and blue values by doing a cast to an integer i have for example a white color instead of a brown one (for the color of skin of a character)under 3d studio max.
Can you help me ?
case 0x0011: unsigned char red, green, blue ;
file.read((char*)&red, sizeof (unsigned char));
file.read((char*)&green, sizeof (unsigned char));
file.read((char*)&blue, sizeof (unsigned char));
cout<<dec<<"rouge "<<(int)red<<" vert "<<(int)green<<" bleu "
<<(int)blue<<endl ;
break ;