|
|
Le 16-02-15 05:21, Sven Littkowski a écrit :
> Hi,
>
> I never worked with area light and area illumination before. I tried to
> establish this kind of light based on your example, but I am not sure if
> I gave the correct numbers. And I also don't know the correct order.
>
>
> #declare MyLight = union
> {
> light_source
> {
> 5000.0*z // Location
Yes, location of <0, 0, 5000>
> 760.0*x*0.7 // Color?
That makes your light red. It evaluate to rgb <760*0.7, 0, 0>
> 257, 33 // ?
This WILL cause an error and stop parsing.
MUST folloow both area_light AND the two axis
> area_light // Type
> // The POV-Ray docu says vectors and sizes are required for area light
> < -1000.0, -1300.0, 0.0 > < 1000.0, -1300.0, 5000.0 > 3, 3 // OK?
That can be ok. This define a rectangle set -1300 unit down the y axis,
and set at an angle.
A 3 by 3 array is extremely croase. Barely ok for a test render. Could
be used simulate an actual array of 3 by 3 lights if used without jitter
and adaptive.
> adaptive 0 //
Good for test render. If good enough, may be kept for final render.
> area_illumination on //
OK
> }
You first define the location of the light, then it's colour.
After that, you add the area_light parameters and other light options.
It's as follow, after location and colour/intensity:
area_light
First size of the area light as an axis
Second size of the area light also as an axis
For both axis, the shortcut n*x, n*y and n*z are legal.
Number of samples along the first axis
Number of samples along the second axis
For the axis, it's usualy beter to define them along the reference axis.
After that, if needed, you can rotate the light as a whole to orient the
plane as needed. That's much easier than giguring the correct values for
the axis. Alternatively, it's possible to use some axis manipulation
macros to calculate the correct values.
It's followed by the other options in any order:
area_illumination will affect the illumination of objects that are close
to the light's location.
adaptive turn on the adaptive subsampling. The keyword is followed by an
integer value that set the minimal number of initial subsampling.
A value of 0 will start with only the 4 corners, and if they are not all
visible or invisible from a given point, then subdivision will occur.
A value of 1 will start with a 3 by 3 array, adaptive 2 will start with
a 5 by 5 array, subjected to the actual number of sublights in that
direction.
adaptive allow the use of large number of samples with minimal
performance hit.
circular moves the sublights inward so that they reside within a circle
or ellips.
orient will pivot the sublights array so that it's always facing any
point bein evaluated. It MUST be used with circular and the two axis
must be ov the same length and the number of samples must be the same in
both directions.
jitter will randomly move the sublights to reduce banding. If used with
antialiasing, each antialiasing samples will have a different jittering
of the sublights.
area_light is compatible with spotlight, cylinder, projected_through,
parallel.
It's pointless for a shadowless light.
Correctly writing your sample:
light_source{
Location
Colour
area_light // turn on the area_light feature
5000*z 760*0.7*x //surface covered be the area_light
257 33 //number of samples along the long and short axis
jitter // very small effect in this case, help reduce banding
}
This area_light is parallel with the X-Z plane, and it's longest extent
is alligned along the z axis.
If location is set for 500*y or <0, 500, 0>, the light will be located
within this square:
<-16.5, 500, -2500> <16.5, 500, 2500>
Alain
Post a reply to this message
|
|