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 24, 2016, 00:07 (GMT) |
Curves: Offset operator Started the implementation of the offset operator. Added interface options for both the Trim and the Offset operator. |
July 23, 2016, 16:09 (GMT) |
Fix crash accessing array out of bounds. |
July 23, 2016, 16:07 (GMT) |
Fix crash dereferencing nullptr. |
July 23, 2016, 15:55 (GMT) |
Fix RNA property lookup failure. |
July 23, 2016, 15:48 (GMT) |
Merge branch 'master' into alembic_basic_io |
July 23, 2016, 15:24 (GMT) |
Depsgraph integration for hair strand nodes (horrible). The depsgraph now invalidates the strand shader when the nodes are changed. As mentioned in the previous commit, this happens through an operation in the object GEOMETRY component for each strand modifier. This is messy, only useful until we have truly granular modifier integration in the depsgraph. Invalidating the shader is currently done just by setting a flag. The actual freeing and subsequent lazy-rebuild of the shader is done in the drawing thread, because during the threaded depsgraph update we don't have a valid OpenGL context. This needs to be sorted out for future viewport recode. |
Revision c6f7f3b by Martin Felke (fracture_modifier, fracture_modifier-master, temp-fracture-modifier-2.8) July 23, 2016, 14:39 (GMT) |
memory optimization for smoke compressibility fix, dont use recursion but a queue to avoid potential stack overflows, thanks to angavrilov for this optimization |
July 23, 2016, 12:30 (GMT) |
Revert "Remove redundant dependency declaration from pynodes, which creates a circular dependency." This reverts commit ca85cb436db7dc9ff5e8df3172987b09f5a071c4. Reverting the commit will break depsgraph updates for regular bvm functions again, but is necessary for making shader updates working. The problem here is that the update operations for _dependent_ data (bvm functions, shaders, etc.) should not actually be part of the node tree, but of the respective dependent data components! So the previous method of invalidating shaders as part of the node tree operations is incorrect and the operation should be moved to some other place. Perhaps we need a dedicated depsnode for the bvm function cache, since there is no single "owner" of these functions that could take care of invalidation in the depsgraph. |
July 23, 2016, 10:04 (GMT) |
reorganized ui for flow behaviour field |
July 23, 2016, 07:03 (GMT) |
Implementation of basic math functions for GLSL code generation from nodes. |
July 22, 2016, 23:30 (GMT) |
Curves: Trim operator Concluded the implementation of the trim operator. |
|
|
|


Master Commits
MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021