|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In one of my scenes, I have constructed my own area light by placing
multiple point lights using spherical coordinates, so that a bulb or sun
is simulated and shadows are smoothed a bit.
////////////////////////////////////////////////////////////////////
#if (Toggle_Area_Light = true)
// my version of an area light, very slow
#local light_radius = RWorld_sun_radius;
#local light_theta = 0;
#local light_theta_num = 8;
#local light_theta_dif = 2 * pi/light_theta_num;
#local light_phi_num = 4;
#local light_phi_dif = pi/light_phi_num;
#declare light_lumens = 2/light_theta_num/light_phi_num; // float
#declare light_temp = Daylight(5800); // float
#declare light_color = Light_Color(light_temp,light_lumens); // vector
#for (i, 1, light_theta_num)
#local light_phi = 0;
#for (j, 1, light_phi_num)
#local light_x = light_radius * cos(light_theta) * sin(light_phi);
#local light_y = light_radius * cos(light_phi);
#local light_z = light_radius * sin(light_theta) * sin(light_phi);
light_source
{
<light_x, light_y, light_z>
light_color
}
#local light_phi = light_phi + light_phi_dif;
#end
#local light_theta = light_theta + light_theta_dif;
#end
#else
#declare light_lumens = 2; // float
#declare light_temp = Daylight(5800); // float
#declare light_color = Light_Color(light_temp,light_lumens); // vector
// #declare light_color = light_color * light_color;
light_source
{
0
light_color
}
#end
////////////////////////////////////////////////////////////////////
However, IIRC, POV-Ray's own area light syntax allows for similar
effects. What are the advantages of POV-Ray area lights over the method
I selected above?
Thanks.
Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 06.08.2018 um 07:57 schrieb Mike Horvath:
> In one of my scenes, I have constructed my own area light by placing
> multiple point lights using spherical coordinates, so that a bulb or sun
> is simulated and shadows are smoothed a bit.
...
> However, IIRC, POV-Ray's own area light syntax allows for similar
> effects. What are the advantages of POV-Ray area lights over the method
> I selected above?
Firs of all, from a quick glance at your code it seems to me that you're
actually constructing a (uniform) light dome, not an area light. At
present, POV-Ray doesn't do light domes (except indirectly via sky
spheres and radiosity).
The difference between a light dome and an area light is that a light
dome covers an entire hemisphere (or even an entire sphere), while an
area light is (or simulates) a localized array of light sources.
Now if we're talking about area lights, the advantages of genuine area
lights over a homebrew array of light sources is as follows:
- Easier to set up.
- Lower memory footprint (which may also improve render speed due to
better CPU cache utilization).
- [optional] Adaptive sampling of the shadow rays, tracing as few as 4
rays per area light if it is unobstructed or completely obstructed, but
as many rays as you like if it is partially obstructed (in a process
similar to adaptive anti-aliasning), for faster rendering at high quality.
- [optional] Jittering of the "lightlets" to break up pattern-like
artifacts caused by the regular arrangement of the lightlets, trading
them for less obvious noise-like artifacts.
- [optional] Substituting a single light source for the entire area
light in certain computations, most notably diffuse and specular
shading, for faster rendering at low cost in quality.
- [optional] Dynamic re-orientation of the area light to simulate a
spherical (as opposed to flat disc-like or rectangular) light source
without having to add more lights for same quality.
- Possibly one or two other optimizations that I may currently be
forgetting about.
There are, of course, also drawbacks:
- Less flexibility in the arrangement of "lightlets" (you're stuck with
lines, rectangles, discs, and quasi-spheres).
- Non-ideal "lightlet" pattern in the spherical case, potentially
leading to (usually subtle) directional artifacts.
As mentioned above, POV-Ray does not provide an area-light-like
mechanism for light domes. What you /can/ do however is create a light
dome out of area lights, probably allowing you to get away with fewer
light sources.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 8/6/2018 4:51 AM, clipka wrote:
> Am 06.08.2018 um 07:57 schrieb Mike Horvath:
>> In one of my scenes, I have constructed my own area light by placing
>> multiple point lights using spherical coordinates, so that a bulb or sun
>> is simulated and shadows are smoothed a bit.
> ...
>> However, IIRC, POV-Ray's own area light syntax allows for similar
>> effects. What are the advantages of POV-Ray area lights over the method
>> I selected above?
>
> Firs of all, from a quick glance at your code it seems to me that you're
> actually constructing a (uniform) light dome, not an area light. At
> present, POV-Ray doesn't do light domes (except indirectly via sky
> spheres and radiosity).
>
> The difference between a light dome and an area light is that a light
> dome covers an entire hemisphere (or even an entire sphere), while an
> area light is (or simulates) a localized array of light sources.
>
Ah, sorry. The lights I created are located at the center of a solar
system, so they cover a relatively small area of the much larger scene.
So I am wondering if it might not just be easier to replace the lights
(the sun) with one area light.
Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
When using the `circular` keyword, is there an ideal area light size one
should show preference to? Odd numbers? Some pattern of integers?
Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Horvath <mik### [at] gmailcom> wrote:
> In one of my scenes, I have constructed my own area light by placing
> multiple point lights using spherical coordinates, so that a bulb or sun
> is simulated and shadows are smoothed a bit.
snipped
> However, IIRC, POV-Ray's own area light syntax allows for similar
> effects. What are the advantages of POV-Ray area lights over the method
> I selected above?
>
> Thanks.
>
>
> Mike
a disadvantage of area lights is that it affects media as a point source.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 06.08.2018 um 13:34 schrieb Mike Horvath:
> When using the `circular` keyword, is there an ideal area light size one
> should show preference to? Odd numbers? Some pattern of integers?
If you intend to use `adaptive`, go for 2^N+1, e.g. 9, 17 or 33, just
like you would for a rectangular area light.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 06.08.2018 um 14:16 schrieb green:
> a disadvantage of area lights is that it affects media as a point source.
Which might be an advantage performance-wise, if the light is reasonably
far away from the media container.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 18-08-06 à 05:32, Mike Horvath a écrit :
> On 8/6/2018 4:51 AM, clipka wrote:
>> Am 06.08.2018 um 07:57 schrieb Mike Horvath:
>>> In one of my scenes, I have constructed my own area light by placing
>>> multiple point lights using spherical coordinates, so that a bulb or sun
>>> is simulated and shadows are smoothed a bit.
>> ...
>>> However, IIRC, POV-Ray's own area light syntax allows for similar
>>> effects. What are the advantages of POV-Ray area lights over the method
>>> I selected above?
>>
>> Firs of all, from a quick glance at your code it seems to me that you're
>> actually constructing a (uniform) light dome, not an area light. At
>> present, POV-Ray doesn't do light domes (except indirectly via sky
>> spheres and radiosity).
>>
>> The difference between a light dome and an area light is that a light
>> dome covers an entire hemisphere (or even an entire sphere), while an
>> area light is (or simulates) a localized array of light sources.
>>
>
> Ah, sorry. The lights I created are located at the center of a solar
> system, so they cover a relatively small area of the much larger scene.
> So I am wondering if it might not just be easier to replace the lights
> (the sun) with one area light.
>
>
> Mike
Yes
area_light RWorld_sun_radius*x RWorld_sun_radius*z 33 33 circular orient
adaptive 0
This will simulate a spherical light
circular squish the area_light into a circle.
orient always make that circle perpendicular to the point currently been
rendered.
adaptive 0 start the sampling with a 2*2 array and subdivide it as needed.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 18-08-06 à 09:53, clipka a écrit :
> Am 06.08.2018 um 13:34 schrieb Mike Horvath:
>> When using the `circular` keyword, is there an ideal area light size one
>> should show preference to? Odd numbers? Some pattern of integers?
>
> If you intend to use `adaptive`, go for 2^N+1, e.g. 9, 17 or 33, just
> like you would for a rectangular area light.
>
or 65, 129, 257,...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|