Crazy Lighting
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.
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
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.
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.
When ever you call glRotatef and glTranslatef, the world get''s rotated and translated, however your lights don''t.
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.
thanks.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement