Sign in to follow this  
As-12

Attenuation

Recommended Posts

The attenuation .. I really dont know what is it.. From factor doesn't make sense to me and what is CONSTANT,LINEAR,QUADRATIC? I cant imagine without example. I tried seach but they is no example just text for read.. And.. about light terms Ambient , Diffuse , Sepcular and Emissive. Also cant make it.

Share this post


Link to post
Share on other sites
First, I've created a program that shows attenuation, and some other things about OpenGL lighting. Download it from
Here
and the source from
Here.

Now for the explanation.

From the Red Book,(you can find V1.1 of the red book here) chapter 6, you can find a section entitled Position and Attenuation. Read through these and see if it helps.

About Ambient, Diffuse, Specular, and Emissive:(you can also find probably better explanations of them from the red book)
Ambient lighting is the kind of light that has been scattered by bouncing off objects so much, you can't really tell where it came from. For example, when you turn on a lamp, the light doesn't just come straight from the lamp, some of it bounces off walls/furniture, and gives the whole room some illumination.

Diffuse is the kind of light that comes straight from a source.

The specular component of lighting controls how much light bounces off the object without being in all directions. It's like the reflection of the sun off of a ball. For example, a metal ball would have a large specular reflection, while rubber would have less, and wood almost none.

Emissive lighting is the kind of light that comes from a source. For example, in a program, a light bulb would have an emissive component. An object with an emissive component is not affected by other lights, just like it doesn't matter whether there is other lights shining on a light bulb, when it's on, you can see it. Also, emissive objects do not add additional light to the scene.

Well, I did my best. I would definitely read through the chapter on lighting in the red book. It explains all of this so much better than I could. As for example code, look at my program.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this