|
![](/i/fill.gif) |
No, this is exactly how "nature works". If you have a pure
red ball (1,0,0) and pure green light (0,1,0) shining upon
it the ball will look black.
-Hans-
EliasH wrote:
>
> Hello,
> I am trying to figure out, the way POV handles ambient light. As far as
> I know, an oversimplified
> formula to compute the light in a surface, can be given by
>
> I = Ia + Id + Is + ...
>
> where Ia = ambient light, Id = diffuse light, Is = specular light etc.
>
> The problem is that POV does not seem to use that formula. Specifically,
> instead of just adding the
> ambient term to the total, it multiplies each R,G,B coefficient with the
> color pigment. The code is in
> lighting.c, #2504, in function compute_lighted_texture
>
> /* Add ambient contribution. */
> TmpCol[0] += Att * LayCol[0] * Layer->Finish->Ambient[0] *
> Frame.Ambient_Light[0] * AmbCol[0]);
> TmpCol[1] += Att * LayCol[1] * Layer->Finish->Ambient[1] *
> Frame.Ambient_Light[1] * AmbCol[1]);
> TmpCol[2] += Att * LayCol[2] * Layer->Finish->Ambient[2] *
> Frame.Ambient_Light[2] * AmbCol[2]);
>
> Thus, there seems to be no way, to have for example a red colored shape,
> with green ambient light:
>
> // Sphere object
> sphere { <0, 3, 0>, 3
> pigment { color rgb<1,0,0> }
> finish {
> ambient <0,1,0>
> diffuse 0.7
> phong 1
> phong_size 80
> brilliance 2
> }
> }
>
> All that this does, is that it produces a red sphere with NO AMBIENT light!
>
> I would appreciate any suggestions. Thanks for your time!
>
> Regards,
> Elias Hatzigeorgiou.
Post a reply to this message
|
![](/i/fill.gif) |