Cycles sampling; Sobol vs. CMJ, times may be changing.

As a forward, let me say that the following is the result of some recent observations of the impact that a few years of periodic sampling and filtering improvements have made on which sampler is generally superior.

Over the years, I’ve been a strong proponent of exclusively using the CMJ sampler for pretty much everything related to Cycles, I argued that at the time, it produced superior sample distributions and allowed the image to converge faster with fewer samples. However, times seem to have changed.

In a sense, it appears that improvements over the years (from improved importance sampling of glossy materials to the Blackwell-Harris filter) has disproportionately benefited the convergence rate for the Sobol sampler to the point where it is now neck and neck with CMJ if not even slightly superior. On the superiority, I appeared to have verified that when noticing that it seemed to now have an edge when rendering an image with a very low min bounce value in terms of resolving more difficult lightpaths (such as caustic bounces and glass materials).

I can say for one thing, any edge is not due to preventing the allowance of proper stratification of the CMJ samples (in that all of the specified samples were applied to the render). That leaves the final question…

Amid the improvements in Cycles, is it still worth keeping the CMJ sampler with its expectation of power-of-2 numbers for optimal convergence and with its limitations with implications for the future (such as the inability to reroute samples for things like truly adaptive sampling)? Are the old arguments about CMJ possibly being superior in some cases still holding water after three years of Cycles development?

Still waiting to see what denoising will bring. Not gonna shave my beard just yet. :stuck_out_tongue:

Does it hurt you if we got both ?.
I think the best ways to reduce noise are not directly related to seed patterns, but more to noise filters; that is statistically speaking…
Its something that might improve in 1 day, that is if a GSOC student takes the posted idea to write a plugin to support Gimp plugins support.

Optimization in terms of convergence would be more than improving noise patterns, but it would also be in the vein of smarter sampling techniques in general. Sobol sampling allows for the implementation of those techniques because it doesn’t have to know the final sample count ahead of time like with CMJ.

Also, Sobol is definitely going to be invaluable once we get a proper and cleanly implemented metropolis sampler working on top of it, because when I used that build from Lukas Stockner back in the day, the combination of those techniques allowed for a fairly unbiased result with a low max rejections value (which brings about a massive speedup to the convergence rate and allows for the resolution of just about any lighting situation you can throw at it).

Sure, there’s the whole ‘safe for animation’ argument, but that would become a moot point if the final result was able to get to the point of not having any noise to begin with.

hm well today is as it is,
Metropolis… i got that one still too, but i dont use it anymore its in my blender version museum folder.
I still use Adaptive Blender which was a spin off of that version.
I’m wondering somewhere there is guy looking at the future of cycles i think :wink:

To illustrate my case which led to this thread, allow me to show a statistical analysis.

The final image at 32 SPP (it’s noisy on purpose and the power of 2 was chosen to avoid an unfair comparison with CMJ).

Sobol


CMJ


Now through use of the Blender compositor (using a texture-based pixelization trick), we can output these two images to show just where each sampler had an advantage in terms of luminosity (the values were also normalized for visualization purposes, but through ramps with the same settings to keep a good comparison).

Where CMJ had an advantage.


Where Sobol had an advantage.


Keep in mind that the scene in question was an interior with glass spheres and small(ish) lights, that combined with the undersampled nature of the image would mean the superior sampler would be the one that produced the highest luminosity values when averaging all of the pixels).

How does this trick work ? (the upper looked better to me indeed).
BTW i remind that there was also a nodepack with a denoise option
( https://bwide.wordpress.com/node-groups/bwide-nodepack-for-blender/ )

Essentially a denoiser could work better if it knew the denoise target isnt 2D.
That would handle corners/edges/texturs better (the way that previous filter works), but then still it is using blur nodes as there is no good denoise filter like Gimp has (selective gausian); ideally would be such a correlation factor based blur. combined inside that nodepacks denoiser
At the moment Blender doesnt have it, although some come close but they’re not the same.

Even better denoise would be to combine that with denoise over time, virtualdub has many filters in this category.
As we can assume that with 25fps the eye doesnt notice a single noise (in movies with noise pattern seed set to #frame)
Such a filter running over rendered frame .png stills would use color info from previous and future frames to perform its selective gausian blur, having more data to better find the optimal pixel color…

I hope someday that would get in Blender,
I’m convinced it would greatly reduce required sample rates
Would use less CPU power.
Faster completion of animations.
Reduce costs for any renderfarm like large projects, they would become cheaper.
And lower the minimal required GPU buying price.
In short rendering would become cheaper.

It’s rather simple actually, just create a colored clouds texture making use of cellnoise and plug it in as the determinator for the bilateral blur node (with enough iterations to create a single color in each cell).

could you put a blend file here with such a node setup ?.
i’m curious about blender noise, and have been trying some filters in c# in the past (i know blender is c++)
but a proof of concept in c# would be convertable to c++