Crazy Lighting

Started by
6 comments, last by Emilio 22 years, 3 months ago
hi folks, im having a terrible time with lighting in OpenGL, how is it possible that the lighting process will produce different results for different positions of the camera? im using all possible commands, with little result. help will be really appreciated.
Advertisement
Maybe you don''t have define the normals...For good lighting you must define the normals calling glNormal3f function...
thanks,

im taking care of the normals thru glMormalPointer, and im sure the array hasnot been modified
Do you mean that the object or light source changes
color or specularity or whatnot when the position of the
camera changes relative to the object or light source?
That''s anisotropic lighting. Check MSDN.
i''m setting my lights up, which produces the desired ilumination effect im looking for, then i move the camera and seems like the light source moves with the camera. Im going to check the anisotropic lighting anyway... thanks a lot.
You need to rotate and translate the lights.

When ever you call glRotatef and glTranslatef, the world get''s rotated and translated, however your lights don''t.
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
thats more like it, so the idea is calling glLight(..., GL_POSITION, ... ) everytime the view matrix changes? with the orientation of the light transformed?

thanks.

for everyone who tried to help me, my problem was that i wasn''t calling glLight every frame, so, thats what you should do if you get a crazy lighting problem

thanks everyone.

This topic is closed to new replies.

Advertisement