February 1, 2017, 04:00 (GMT) |
Cycles Denoising: Use squared samples for denoising-after-rendering when they're enabled Previously, the setting would be ignored, which lead to extremely overblurred results. |
February 1, 2017, 04:00 (GMT) |
Cycles Denoising: Correct buffer variance calculation |
February 1, 2017, 04:00 (GMT) |
Cycles Denoising: Change memory layout of noisy color and variance information |
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. |
February 1, 2017, 04:00 (GMT) |
Cycles Denoising: Also write NLM-filtered version of the color input when debugging is enabled |
February 1, 2017, 04:00 (GMT) |
Cycles Denoising: Remove useless if() in the kernel code |
February 1, 2017, 04:00 (GMT) |
Cycles Denoising: Fix compilation of GTests |
February 1, 2017, 04:00 (GMT) |
Cycles Denoising: Redesign debug EXR writing code for a cleaner integration Also, remove the denoising passes from CUDA - just adds to much clutter and the results are the same as on the CPU anyways. |
January 31, 2017, 01:11 (GMT) |
Cycles Denoising: Cleanup by renaming a variable |
January 20, 2017, 04:46 (GMT) |
Cycles/Render API: Get rid of Render Pass flags and port Denoising passes to the new system This also means that the temporary uint64_t passflag hack is removed now. |
January 13, 2017, 15:45 (GMT) |
Cycles: Implement new NLM reconstruction kernels |
January 12, 2017, 23:09 (GMT) |
Cycles: Implement new NLM kernels for CUDA |
January 12, 2017, 03:56 (GMT) |
Merge remote-tracking branch 'origin/master' into soc-2016-cycles_denoising |
January 12, 2017, 03:56 (GMT) |
Cycles: Clean up passing of int4 to CPU kernels Since the type of int4 depends on whether SSE is enabled, the SSE kernels expect a different type than the device code. Therefore, the content must be passed as a pointer... |
January 12, 2017, 03:56 (GMT) |
Cycles Denoising: Remove now-useless feature utilities |
January 12, 2017, 03:56 (GMT) |
Cycles Denoising: Use better and faster NLM implementation for feature pass prefiltering Previously, the prefiltering NLM kernel was implemented just as it's described in the paper: For every pixel P, loop over every pixel Q in the search window. Then, loop over the small patches around them, calculate the average difference, and use that to compute the weight of Q for the denoised result at P. However, that gives you a time complexity of O(N^2 * R^2 * F^2), where N is the image size, R the search window and F the patch size... So, this patch implements the clever idea from "A Simple Trick to Speed Up and Improve the Non-Local Means" - by reformulating the loop, it's actually possible to skip a lot of computation and replace it with a separable box filter convolution. This reduces complexity to O(N^2 * R^2 * F), and the amount of pixel differences calculated even to O(N^2 * R^2)! Furthermore, by applying a second box-filter pass after calculating the weights, we get the "patchwise NLM" improvement basically for free! This is CPU-only so far, but that will change soon. |
January 11, 2017, 06:37 (GMT) |
Cycles Denoising: Remove WLR and experimental NFOR modes The denoising code started out as an implementation of WLR, but the NLM mode is working so much better that I decided to remove the WLR mode completely. This allows to get rid of a significant amount of complexity and code. Also, the NFOR mode is removed - the name is misleading, most of the ideas behind the NFOR paper are actually what powers the NLM mode. NFOR mode was just an experiment with removing the T-SVD feature space reduction, and it turned out that the experiment had failed. |
January 11, 2017, 05:28 (GMT) |
Cycles Denoising: Remove hidden NLM-only option |
December 21, 2016, 04:09 (GMT) |
Cycles: Rename and add new matrix math helper functions to clean up the actual filter code |
December 21, 2016, 01:29 (GMT) |
Cycles: Deduplicate numerical code in the WLR bandwidth estimation Also includes some documentation about what this code actually does. |
|