Limiting light area?
Im using the nehe code from lesson 7... but the light will go on forever. how can i limit the area of the light?
Reduce the intensity of the light source.
Also try to modify the attenuation function, value, etc.
Height Map Editor | Eternal Lands | Fast User Directory
[edited by - Raduprv on October 13, 2003 2:41:43 AM]
Also try to modify the attenuation function, value, etc.
Height Map Editor | Eternal Lands | Fast User Directory
[edited by - Raduprv on October 13, 2003 2:41:43 AM]
also, set it to a point light, from there you can set the light's radius and other things...
both nehe.gamedev.net and gametutorials.com fail to teach you lights in detail. there are three different types, spots, points, and directional. spots are spot lights, just like a spot light in a theater pointing at an actor on the stage. Point lights are like light bulbs in your house. According to position, radius, and some other values, the light will light things around it depending on these values. Directional lights are like a huge light such as the sun, and only the surfaces that are facing that direction will be lit.
Check out the open gl red/blue books to get some insight to what type of GLenum params you can use in the glLightfv (dont know what the other's ones are for.. (glLight,glLightv,etc..)) function
also dont forget that look at must happen before moving lights around
[edited by - fireking on October 13, 2003 3:54:22 PM]
both nehe.gamedev.net and gametutorials.com fail to teach you lights in detail. there are three different types, spots, points, and directional. spots are spot lights, just like a spot light in a theater pointing at an actor on the stage. Point lights are like light bulbs in your house. According to position, radius, and some other values, the light will light things around it depending on these values. Directional lights are like a huge light such as the sun, and only the surfaces that are facing that direction will be lit.
Check out the open gl red/blue books to get some insight to what type of GLenum params you can use in the glLightfv (dont know what the other's ones are for.. (glLight,glLightv,etc..)) function
also dont forget that look at must happen before moving lights around
[edited by - fireking on October 13, 2003 3:54:22 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement