Using materials and lighting ???

Okay, I’ve got a weird problem. I’m loading in Milkshape models. I’ve got the materials of the model set so that diffuse is all the way up (255), and everything else (specular, ambient, emissive, shininess) are all the way down (0). Now, the problem is that my models wind up being lit as though my light source was (1,1,1) regardless of the actual color of the light. If I set the light to nothiing but one or two channels, (1,0,0) or (1,1,0) for example, then the light comes through as that color. But if I increase the other channel’s value much AT ALL (1, 0.1, 0.1), then the model is lit as though it was set to (1,1,1)!!! Is there something I’m doing wrong?

I mean, it’s weird because it’s acting almost like the color values are in the range 0 - 0.1 instead of 0 - 1 becaues the brightness also seems off. I can set the color to (0.01,0.01,0.01) and it’s still as bright looking as (1,1,1). What am I missing? Thanks!

Could you post the exact command you use to set the light color?

GLfloat Light2Diffuse[]={ 1.0f, 0.01f, 1.0f, 1.0f };

glLightfv(GL_LIGHT1, GL_DIFFUSE, Light2Diffuse);

Are you calculating your normals? I’ve been messing with lights a lot and I had a lot of weird problems like that when I wasn’t!

It sure sounds like your normals are too long, but it’s hard to know for sure. Try:

glEnable(GL_NORMALIZE);

THANK YOU HARSMAN!!! That did the trick! I wonder why Milkshape’s output models don’t already have normalized normals? That seems odd to me. Anyway, you guys are the best! Thanks again!