Jump to content
  • Advertisement

Archived

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

gimp

OpenGL [OPENGL] How do Light and materials interact?

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

I''ve been reading the Redbook and something that i havent picked up on is the interaction between light and materials. For example just say I have a light with specular of X, how does that relate to a surface with a material specular of Y. Actually I don''t even ''get'' how a light can be specular... Is the specular component of a light source the portion that ''lights up'' the specular portion of the material, eg if a light with no specular component shines on a shiny glass the glass remain dull? Many thanks for any direction Chris

Share this post


Link to post
Share on other sites
Advertisement
check the ''specular term'' section section of the red book (pg208 2edit)is very well explained there how the specular adds to the colour.also computer graphics principles and practice have quite a lot of info on it as well

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites
Thats again Zed. I took your advice and... as a result reread almost the entire chapter ... From what i understand the surfaces material properties sort of specify the maximum properties that the material is capably of being lit to.

The light components then individually add to the ''black'' components on the surface material to produce the relative lighting levels for each component.

Did I get it right?

Chris

Share this post


Link to post
Share on other sites
>>The light components then individually add to the ''black'' components on the surface material to produce the relative lighting levels for each component<<

they add to the current colour

eg for diffuse lighting other forms are simular

how much diffuse light point recieves * colour of diffuse light * colour of diffuse material
1 (totally lit) * red * 1.0 (white diffuse material) = bright red
1 (totally lit) * red * 0.5 (grey diffuse material) = crimson
1 (totally lit) * red * 0.0 (white diffuse material) = black





http://members.xoom.com/myBollux

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!