Sign in to follow this  

Texture mapping modulation

This topic is 4783 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

What exactly is meant by modulation when mapping textures to a triangle? I have an assignment where I have to map a texture to a triangle using modulation to give the triangle a shaded or lit appearance. The only information I have is that you must multiply the colors of the two pixels (the triangle and the texture) together to get the resulting color. How would this work if the colors range from 0-255? Am I supposed to map those values to between 0-1 and multiply those? Any help would be appreciated.

Share this post


Link to post
Share on other sites
Yes, you divide the values by 255, yielding 0..1. Think of these values as a percentage of Red, Green and Blue light reflected. 0.0 means no light of that color is reflected ( all absorbed ), whereas 1.0 means all light of that color is reflected from the surface.

Share this post


Link to post
Share on other sites
Just to be sure I have this right, am I supposed to only divide the texture color values by 255 then multiply those values with underlying triangle colors, which are still between 0-255?

Share this post


Link to post
Share on other sites

This topic is 4783 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this