Archived

This topic is now archived and is closed to further replies.

linne

3D Studio MAX Material

Recommended Posts

Hallo everyone, i recently coded a library that reads in a 3DS file into a Direct X (7.0) programm. But i am faced to a (hopefully little) problem: i don''t know how to convert the 3ds max material data (R G B values in the range from 0 - 256) to Direct X 7.0 RGB values in the range from (0-1). Just Dividing By 256 doesn''t lead to any good result! thanks in advance Christian Linnemann c-linnemann@gmx.de

Share this post


Link to post
Share on other sites
How are you doing the divide? Are you just doing
DXMatColor = iRgbVal /256; // This would be an integer op, prone to rounding  


Or are you doing

DXMatColor = (float(iRgbVal) / 256.0f); // floating point op


?

Share this post


Link to post
Share on other sites