Sign in to follow this  

Lighting doesn't work normal with color material

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

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