July 27, 2016, 19:43 (GMT) |
Cycles: Fix another cause for NaN normals and a potential divide-by-zero in the background texture |
July 27, 2016, 19:43 (GMT) |
Cycles: Add Debug build option that enables floating point exceptions By enabling the new WITH_CYCLES_DEBUG_FPE, floating point exceptions are enabled in the CPU kernels. That way, the debugger stops as soon as an invalid calculation is performed, which makes it a lot easier to track these issues. Note that the option may cause problems in combination with the --debug-fpe runtime option. |
July 27, 2016, 18:18 (GMT) |
Cycles: Fix a rare divide-by-zero in a fallback sampling code The issue only appeared when the random number happens to be exactly one while a fallback sampling code for shallow paths was being executed. |
July 26, 2016, 01:37 (GMT) |
Merge remote-tracking branch 'origin/master' into soc-2016-cycles_denoising |
July 26, 2016, 01:36 (GMT) |
Render API/Cycles: Add separate "keep highlights" parameter to the end_result function to fix Save Buffers with Denoising |
July 24, 2016, 01:44 (GMT) |
Merge commit '3e05be953f619b78c8721631549f9babb0950f4c' into soc-2016-cycles_denoising |
July 24, 2016, 01:02 (GMT) |
Merge remote-tracking branch 'origin/master' into soc-2016-cycles_denoising Conflicts: intern/cycles/kernel/kernel_types.h |
July 24, 2016, 00:54 (GMT) |
Cycles: Also prefilter and use the shadow feature pass with CUDA |
July 24, 2016, 00:51 (GMT) |
Cycles: Use the prefiltered shadow feature for denoising This commit finally adds the prefiltered shadow feature to the main denoising algorithm. Doing so improves detail preservation a lot: Although the main focus are sharp shadow edges, it actually also helps for Ambient-Occlusion-like and geometric details. The only issue is that some geometric edges might be a bit noisier after denoising, but that will be fixed in the future by downweighting the shadow feature when the geometric changes (normals and depth features) are strong. |
July 24, 2016, 00:37 (GMT) |
Cycles: Prefilter the shadow feature passes The previous commit already generates the features, but they're quite noisy, which is unacceptable for a LWR feature since it leads to noise in the result. The filtering algorithm is: 1. filter_divide_shadow: - Divide the R and G channels of both passes to get two noisy shadow passes - Scale the B channels and combine them to get the approximate Sample Variance - Compute the squared difference of the A and B divided passes to get the correct, but also noisy, Buffer Variance - Compute the squared difference of the A and B Sample Variances to get the variance of the Sample Variance estimate 2. filter_non_local_means: - Smooth the Buffer Variance using Non-Local Means with weights derived from the Sample Variance pass 3. filter_non_local_means: - Smooth the A and B shadow passes using Non-Local Means with weights derived from the other pass (B to smooth A, A to smooth B) and from the smooth buffer variance. 4. filter_combine_halves: - Compute the squared difference of the A and B smoothed shadow passes to estimate the residual variance in the channels. 5. filter_non_local_means: - Smooth the two passes again using each other and the residual variance for weights. 6. filter_combine_halves: - Average the two double-smoothed passes to obtain the final shadow feature used for the LWR algorithm. Although the algorithm might sound rather slow, that's not the case. This can be seen by reducing the half window: Doing so reduces the time LWR takes, but the prefiltering stays the same. So, since the time used can be reduced drastically with the half window, prefiltering can't be the bottleneck. Also, the amount of repeated smoothing sounds like it destroys fine details. However, that is not the case: Due to taking variance into account and the remarkable quality of the NLM filter, details that only span a couple of pixels are still preserved without blurring. The final feature isn't used yet, that will be added in the next commit. |
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. |
July 24, 2016, 00:29 (GMT) |
Cycles: Add two shadow feature passes These two passes will both hold the same feature, but one will be filled with data from even samples and the other with data from odd samples. That allows to estimate buffer variance and prefilter it better later on. |
July 24, 2016, 00:26 (GMT) |
Cycles: Fix combined feature bandwidth calculation As explained in the code, the bandwidth variables actually store the inverse of the bandwidth to save a couple of divides. However, if the bandwidth is to be multiplied with a factor, that means that the variable must be divided by that factor, which was not done currently. |
July 24, 2016, 00:24 (GMT) |
Cycles: Tweak order of denoising feature vector to improve quality of results This commit reorders the denoising features: Instead of "Normals, Texture, Depth, Screen position" the order now is "Screen position, Depth, Normals, Texture" like in the old demo code, which significantly improves result quality. |
July 24, 2016, 00:21 (GMT) |
Cycles: Add temporary debugging environment variable, fix debug file extensions As explained previously, CPUs currently get the out-of-tile pixels for denoising from neighbor tiles, while GPUs just render bigger tiles internally. However, implementation differences can make the GPU version (aka "overscan" rendering) fail while the CPU code works. Therefore, this commit adds a environment variable check for whether CPU_OVERSCAN is defined, and enables the already-present CPU single-tile overscan mode for easier debugging. Note that this has no benefits at all for regular use and will be removed later! |
July 24, 2016, 00:20 (GMT) |
Cycles: Fix Denoising feature pass generation when using OSL |
July 24, 2016, 00:20 (GMT) |
Cycles: Fix border rendering once again with Denoising |
July 19, 2016, 11:29 (GMT) |
Fix playerstubs |
July 18, 2016, 18:37 (GMT) |
Merge remote-tracking branch 'origin/master' into soc-2016-cycles_denoising |
July 18, 2016, 17:48 (GMT) |
Cycles: Fix NaN smooth normals |
|