bobtedbob
11-12-2011, 12:49 AM
Hi
I've had a search on the forum for this but I can't find the answer. I would like to create a light source that only lights items near by so it fades out really quickly. I thought this was possible. I have read this
http://glprogramming.com/red/chapter05.html
My plan was to have a 180 degree spot light, set it to be at a specific position then use attenuation.
The attenuation has a formula
1/ (GL_CONSTANT_ATTENUATION + (distance*GL_LINEAR_ATTENUATION) + (distance^2*GL_QUADRATIC_ATTENUATION))
Does anyone have any good values for these 3 such that you have a bright center and then a rapid tail off brightness (like what a candle would do in real life)
I've had a search on the forum for this but I can't find the answer. I would like to create a light source that only lights items near by so it fades out really quickly. I thought this was possible. I have read this
http://glprogramming.com/red/chapter05.html
My plan was to have a 180 degree spot light, set it to be at a specific position then use attenuation.
The attenuation has a formula
1/ (GL_CONSTANT_ATTENUATION + (distance*GL_LINEAR_ATTENUATION) + (distance^2*GL_QUADRATIC_ATTENUATION))
Does anyone have any good values for these 3 such that you have a bright center and then a rapid tail off brightness (like what a candle would do in real life)