Looking for the lighting culprit

I have a scene in which I have a polygonal model. It is lit with a single directional light source which moves with the viewpoint. I have GL_NORMALIZE enabled (it’s GL 1.1). For rotations/translations, this works fine, but when I zoom in, the scene gets progressively “flatter” until it appears as a grey mass with no lighting at all. Any suggestions as to the reason for this? I suspected the normals, but they appear to be fine (plus GL_NORMALIZE is on, so how could they go wrong??).

Thanks,
Chris

I hope you dont apply the transformations to the projection matrix? this ****s it all up with the lighting/fogging.

Nope - modelview for all the transforms.

Chris

are you decreasing the fov in order to zoom in?

No- it’s an orthographic projection - I’m using glScale().

Chris

So then your problem is that opengl hw lighting is done per vertex. You need to either use per-pixel lighting in a pixel shader or subdivide the geometry.

Hmmm, you mean directional light or spotlight?

Directional (infinite viewer type). Pixel shaders aren’t really an option - I have to support pretty old hardware. I’m not clear on how GL’s per vertex lighting combined with my ortho projection is causing this. I thought I had a decent grasp of the math - could you give a more technical explanation?

Chris

Sorry, i guess i was wrong, because the directional lighting doesnt take distance into account, only direction. Maybe this is an issue with the clipping and bad interpolation. I could use some pics.

I can e-mail a set of images to anyone who wants to see - click on the e-mail symbol above to get my address and drop me a line.

Chris

Are you using non-unform scaling?

My scaling is uniform.

Thanks,
Chris

Perhaps your glScale is affecting the direction of the light.

I don’t think the direction of the light is the problem (although at this point I’m not ruling anything out!). If the light direction changed I would expect to be able to see that as I zoom in. Instead, I observe a continuous flattening of the surface as I get closer - the light position doesn’t appear to move, the lighting just gets crappier and crappier!!

Thanks,
Chris