Blender Git Commit Log

Git Commits -> Revision 5c9eaeb

February 1, 2017, 04:00 (GMT)
Cycles Denoising: Use different heuristic for feature space dimensionality reduction

Since the features that are used for denoising may be highly correlated (for example, with a greyscale texture the three albedo channels will be identical), using them directly for fitting would be rather unstable.
Therefore, before performing the actual fit a transformation into a reduced feature space is peformed using Principal Component Analysis by calculating the eigendecomposition of X^t*X, where X is the feature matrix.
After doing that, the eigenvectors are the basis vectors of the new feature space, and the eigenvalues specify their "importance". Therefore, by discarding eigenvectors whose eigenvalues are low, its possible to get rid of unneccessary dimensions.

Now, the question is which dimensions should be removed. The original WLR algorithm calculates a threshold based on the variance of the feature passes, with the goal of discarding noisy features. However, this implementation already prefilters the feature passes, so the (original) variance passes overestimate the actual variance a lot and discarding them isn't actually needed anymore.
Therefore, this commit replaces it with two simpler heuristics - either removing all eigenvalues below a certain threshold, or removing until a certain fraction of the energy in the eigenvalues is gone.
Which heuristic is used is chosen based on the sign of the filter strength, positive values choose the energy heuristic and negative values the absolute heuristic. In both cases, the threshold value is 10^(2*abs(filter strength)). If the default of zero is used, it uses the energy heuristic with a fraction of 10^-3.

Note that in some cases, especially motion blur and depth of field, this might cause new artifacts. These can be solved and I'll commit that soon. On the positive side, this change makes the denoiser handle hair/fur much better.

Commit Details:

Full Hash: 5c9eaeb6762b1760537962d29215583df9ae5f42
Parent Commit: 950b42b
Lines Changed: +91, -78

6 Modified Paths:

/intern/cycles/blender/blender_session.cpp (+2, -2) (Diff)
/intern/cycles/kernel/filter/filter_wlr.h (+28, -34) (Diff)
/intern/cycles/kernel/filter/filter_wlr_cuda.h (+29, -19) (Diff)
/intern/cycles/kernel/filter/filter_wlr_sse.h (+31, -20) (Diff)
/intern/cycles/kernel/kernel_types.h (+0, -2) (Diff)
/intern/cycles/render/integrator.cpp (+1, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021