As always, I’ve got problems. Today my problem is lighting.
Why are polygons getting dark when I am closing light-source to them? I think it is caused by method of calculating color, but how to make it works correctly?
I’ve got another problem too. But maybe it is the same as above. Distant objects are not lighted, even if I don’t use attenuation and light-source is placed correctly.
Thanks for all answers. Maybe you know some interesting pages about lighting (other than NeHe Page).
It sounds like an interpolation problem. Lighting is done at the vertices and interpolated so if you have a light source near the middle of a large polygon, it will be dark. The only solutions I’ve used are to subdevide the polygon or do do per-pixel lighting.
I missed that part of the question. It sounds like it would be a problem with normals somehow. How do they fade away as they become distant? Smoothly or do they dissapear all at once?