The right model for shading in Ray tracing

Мне интересно, как наиболее точно рассчитать тень, создаваемую несколькими разными источниками света и окружающим светом. Ambient light is light that exists in the entire 'world' with the same intensity and no particular direction, and diffused lighting is the lighting that occurs due a direct lighting from a point light source.

Given that Ka is the coefficient for the surface ambient reflectivity, Ia is the intensity of the ambient light, Kd is the surface diffuse reflectivity, Ip1 is intensity of the the first (accordingly) point light source, N is the surface normal, and L1 is the light (of the first source accordingly) direction.

According to my reference material the intensity of the color at the spot should be:

I=Ka.Ia+Kd(Ip1(N.L1)+Ip2(N.L2)) where '.' is the dot product.

But according to my understanding the real light intensity should do some sort of average between the light sources and not just add them up, so that if there are only two light sources the equation should look like:

I=Ka.Ia+Kd(Ip1(N.L1)+Ip2(N.L2))/2

and if there are 3 light sources, but the third is blocked and doesn't light the surface directly then:

I=Ka.Ia+Kd(Ip1(N.L1)+Ip2(N.L2))/3 (so that if there is a place where all 3 lights contribute it would be lighten brighter.

Am I right at my assumption?

6
задан SIMEL 3 January 2011 в 16:05
поделиться