Blender Git Loki

Git Commits -> Revision 462adab

July 24, 2016, 00:29 (GMT)
Cycles: Generate and fill the Shadow feature passes

This commit makes the path tracing kernel generate the needed data for the shadow passes and fill them.

The approach used here is quite similar to a shadowcatcher:
The R channel of the passes records the total energy of direct light queries, no matter whether they were shadowed or not.
The G channel records the amount of energy that actually was unoccluded. Therefore, dividing G by R produces a accurate pass containing the amount of shadowing (between zero and one, since G can never be larger than R).
The B channel contains an approximation of the variance of the shadow info.
However, since Var[E[Unoccluded]/E[Full]] (which is what would be needed) is impossible to compute analytically from the samples, Var[Unoccluded/Full] is used instead (Variance of the individual ratios at each sample, instead of the variance of the ratio of the mean values after sampling).
That's both biased and actually might not even be close, it still is of use in prefiltering: The correct variance can be estimated (with a lot of noise) from the difference of the A and B passes, and the approximation in the B channel can be used for the weights used to prefilter the noisy, but correct variance.

Commit Details:

Full Hash: 462adab15d44b8a6da83ff958ec845358e8d3b32
Parent Commit: 98b7447
Lines Changed: +56, -9

5 Modified Paths:

/intern/cycles/kernel/kernel_accumulate.h (+12, -0) (Diff)
/intern/cycles/kernel/kernel_bake.h (+1, -1) (Diff)
/intern/cycles/kernel/kernel_passes.h (+29, -4) (Diff)
/intern/cycles/kernel/kernel_path.h (+6, -3) (Diff)
/intern/cycles/kernel/kernel_path_surface.h (+8, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021