Jump to content
  • Advertisement

Archived

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

linne

3D Studio MAX Material

This topic is 6187 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!