|
|
"Kenneth" <kdw### [at] gmailcom> writes:
> At first, I thought that the negative light_source would 'invert' the color of
> the wall object; but that's not the case.
If it were the only light shining on the wall, those pixels would get
overall negative color components (each—negative—component of the light
multiplied by the corresponding—positive—component of the wall’s pigment
and by its—positive—diffuse value, plus the highlights, which are
similarly negative, plus the ambient illumination, which is positive,
but too small to overcome the two previous summands), which would in
turn be clipped to zero—pure black—in the final image; but since there
is also a global light with the opposite—positive—intensity, it just
cancels it out.
Another option would be to leave out “no_shadow” for the gnomon, and
instead to fill in its shadow on the ground with another positive light
projected through the gnomon, in a light group with the ground.
However, I think it’d be easy to notice rounding errors around the edge
of the shadow, where it’s not exactly cancelled out, especially in an
animation. With the negative light projected through the gnomon onto
the wall, there’s no such problem, since the eye has no way to tell our
makeshift shadow is not exactly the same as the one it’d see if we let
the gnomon cast one normally. Only if there were no ambient light might
it notice the shadow is not perfectly black.
> (Note that the light_group requires global_lights ON).
Certainly.
Post a reply to this message
|
|
|
|
Le 2021-01-08 à 23:06, Subclick a écrit :
> "Kenneth" <kdw### [at] gmailcom> writes:
>> At first, I thought that the negative light_source would 'invert' the color of
>> the wall object; but that's not the case.
>
> If it were the only light shining on the wall, those pixels would get
> overall negative color components (each—negative—component of the light
> multiplied by the corresponding—positive—component of the wall’s pigment
> and by its—positive—diffuse value, plus the highlights, which are
> similarly negative, plus the ambient illumination, which is positive,
> but too small to overcome the two previous summands), which would in
> turn be clipped to zero—pure black—in the final image; but since there
> is also a global light with the opposite—positive—intensity, it just
> cancels it out.
>
> Another option would be to leave out “no_shadow” for the gnomon, and
> instead to fill in its shadow on the ground with another positive light
> projected through the gnomon, in a light group with the ground.
> However, I think it’d be easy to notice rounding errors around the edge
> of the shadow, where it’s not exactly cancelled out, especially in an
> animation. With the negative light projected through the gnomon onto
> the wall, there’s no such problem, since the eye has no way to tell our
> makeshift shadow is not exactly the same as the one it’d see if we let
> the gnomon cast one normally. Only if there were no ambient light might
> it notice the shadow is not perfectly black.
>
>> (Note that the light_group requires global_lights ON).
>
> Certainly.
>
The faked shadow using projected_through can match exactly. The only
thing needed is that the location of the light with projected_through
exactly match the general light : Same location, and eventually,
area_light parameters.
light_source{1000 rgb <0,1,1> area_light z x 17 17 adaptive 0 circular
orient} // A cyan light
light_group{
light_source{1000 rgb <1,-1,-1> // make the shadow red
area_light z x 17 17 adaptive 0 circular orient
projected_through object{Gnomon}}
object{Gnomon texture{Gnomon_Texture}}
global_lights on
}
Post a reply to this message
|
|