When you render Flame Fractals the pixels accumulate over time. As this process happens different areas accumulate at different rates. Areas that have high hit counts render smoothly while other areas that have lower hit counts render more noisy/speckled.
While I was recently revisiting the Fractal Flame mode in Visions of Chaos I experimented with some ideas I had to make a “smart blur” function. This was going to supposedly blur pixels by different amounts depending on their neighbors. So areas with more noise would be blurred more than areas with little difference between pixels. After some experimenting with various convolution kernels etc I gave up. My results were either too blurry, too dark or other issues.
Searching for other methods got me to “denoising”.
Note: all of the example images in this post need to be seen full 4K size to notice the differences.
NVIDIA OptiX
NVIDIA OptiX is a raytracing engine. Part of what it can do is denoising.
Denoising is a big deal in ray tracing areas. When raytracing images (depending on the method used) you need to make many passes of the image before the details are smoothed out.
Here is an example from Visions of Chaos (the “Pathtracing Global Illumination” example shader) after running for a few seconds.
You can see a lot of noise visible as the rendering was stopped way before the pathtracing converged to a smooth image.
Running the image through the OptiX denoiser gives the following result.
A much smoother result.
The alternative is to allow the pathtracer to run for much much longer until it smooths itself out. The next image took around 10 minutes to accumulate the smoothness that OptiX took a second to smooth. If you look closely the details are better in this image compared to the denoised image.
In some cases the noise may be desirable. If like me you prefer the film grain of a good 70’s movie to the smooth digital look of a modern film then a bit of noise may be more aesthetically pleasing to you, but in general less noise is desirable in rendered images.
Accumulation Fractals
For Visions of Chaos my interest in denoising was for modes like Buddhabrots, Flame Fractals, Iterated Function Systems, and Strange Attractor images. All the modes that have images that are built up by the accumulation of points. A side effect of this accumulation is that areas of the image less hit show up noisier than areas hit more frequently.
Denoising to the rescue!
When It Works
Here are some examples of how the denoiser can help. It seems to work best (at least from my initial experiments) with images that have whispy details.
Iterated Function System with noisy areas.
The same image processed with OptiX.
Flame Fractal with noisy areas.
The same image processed with OptiX.
Strange Attractor with noisy areas.
The same image processed with OptiX.
When It Doesn’t Work
Denoising is not a magic bullet to fix any pixelated image. It was specifically trained to denoise noisy raytraced images.
Here are a few example images that it did not help. When the denoising “fails” it tends to smear areas of the image rather than enhancing them.
Buddhabrot Fractal. Surprisingly Buddhabrots do not seem to be a good candidate for OptiX denoising. The noisy areas do get denoised, but areas with details tend to get smeared more.
Buddhabrot before.
Buddhabrot after OptiX denoising.
Multi-Scale Turing Pattern before.
Multi-Scale Turing Pattern after.
Magnetic Pendulum before. This is a good example of how denoising needs noise to work. This image has a lot of fine detail, but nothing that could be classified as noise.
Magnetic Pendulum after.
Availability
Denoising is now included with Visions of Chaos. I am including the excellent command line version from Declan Russell. Denoising any image created in Visions of Chaos is now just a click away. If you want to denoise other images outside Visions of Chaos I highly recommend Declan’s implementation.
Jason.