Jump to content
  • Advertisement
Sign in to follow this  
K A Z E

Lighting doesn't work normal with color material

This topic is 4510 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 loaded a sword model into my program that I made in gmax. I set the normals and turned on lighting. It looks good. At least as good as an untextured model can. Well I want to use color material to make it shiny. Well, when I glEnable(GL_COLOR_MATERIAL), lighting doesn't work normally. It shines when the normals are facing towards the light (which is at my camera's position), but normals NOT facing towards the light don't get shaded darker. Why is this? I tried changing the color material's ambient and diffuse values but it doesn't really do anything that I can tell. The only things that seem to make a visible difference is the material's specular value and shininess. Can I get it to shade faces not facing towards the light darker and to make faces facing directly at the light really shiny? Also I noticed that it seems color material doesn't work with textures. Is there another way to get the really shiny effect that color materials gives WITH textures? Thanks in advance. EDIT: Nevermind. I changed the color of the light's ambient, diffuse, and specular values from white to gray and now it looks right. [Edited by - K A Z E on June 13, 2006 8:07:55 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • 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!