From BlenderWiki

< Doc:Manual | Lighting | Shadows
Revision as of 13:22, 25 September 2009 by Smerch (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

If you want to document Blender 2.5 features please edit pages under Doc:2.5/Manual.
If a "2.5" page doesn't exist please copy the text from 2.4x Manual and edit the new page (i.e. you should paste the wikitext from this 2.4x page to this new 2.5x page and then update the latter with 2.5 features)


[edit] Lamps Raytraced Shadows

Shadow and Spot panel, raytraced shadows enabled, Adaptive QMC sample generator.

Most lamp types (Lamp, Spot and Sun) share the same options for the raytraced shadows generation, which are described bellow. Note that the Area lamp, even though using most of this options, have some specificities described in its own raytraced shadows page.

Ray Shadow
The Ray Shadow button enables the light source to generate Ray Traced Shadows.
When the Ray Shadow button is selected, another set of options is made available, those options being:
Shadow Sample Generator Type
This drop-down menu allows you to choose which algorithm is to be used to generate the samples that will serve to compute the raytraced shadows (for now, mainly two variants of Quasi-Monte Carlo, see bellow):
Constant QMC
The Constant QMC method is used to calculate shadow values in a very uniform, evenly distributed way. This method results in very good calculation of shadow value but it is not as fast as using the Adaptive QMC method, however Constant QMC is more accurate.
Adaptive QMC
The Adaptive QMC method is used to calculate shadow values in a slightly less uniform and distributed way. This method results in good calculation of shadow value but not as good as Constant QMC. The advantage of using Adaptive QMC is that it in general is much quicker while being not much worse than Constant QMC in terms of overall results.
Samples
This Numerical slider field set the maximum number of samples (per pixel?) that both Constant QMC and Adaptive QMC will use to do their shadow calculations. The maximum number of samples that can be taken is 16. According to the tooltip information that appears when over this field the sample value is squared so setting a sample value of 3 really means 32 samples will be taken.
Soft Size
The Soft Size numeric slider, determines the size of the fuzzy/diffuse/penumbra area around the edge of a shadow. Soft Size only determines the width of the soft shadow size not how graduated and smooth the shadow is. If you want a wide shadow which is also soft and finely graduated you must also set the number of samples in the Samples field higher than 1, otherwise this field has no visible effect and the shadows generated will not have a soft edge. The maximum value for Soft Size is 100 (Blender Units, or percents?).
Above is a table of renders with different Soft Size and Samples settings showing the effect of various values on the softness of shadow edges.
Below is an Animated version of the above table of images showing the effects:
You may need to click on the Image to see the Animation.
Threshold
The Threshold field is used with the Adaptive QMC shadow calculation method. The value in the Threshold field is used to determine if Adaptive QMC shadow sample calculation can skipped based on a threshold of how shadowed an area is already. The maximum Threshold value is 1.


[edit] What is Quasi-Monte Carlo?

The Monte Carlo method is a method of taking a series of samples/readings of values (any kind of values, such as light values, colour values, reflective states) in or around an area at random, so as to determine the correct actions to take in certain calculations which usually require multiple sample values to determine overall accuracy, of those calculations. The Monte Carlo methods tries to be as random as possible, this can often cause areas that are being sampled to have large irregular gaps in them (places that are not sampled/read), this in turn can cause problems for certain calculations (such as shadow calculation).

The solution to this was the Quasi-Monte Carlo method.

The Quasi-Monte Carlo method is also random, but tries to make sure that the samples/readings it takes are also better distributed (leaving less irregular gaps in its sample areas) and more evenly spread across an area. This has the advantage of sometimes leading to more accurate calculations based on samples/reading.