Here’s the basic node layout of this technique.
Don’t worry, you won’t need to manually enter this. The “Aux” input is for forwards compatibility, to make it easier to add another determinant to the bilateral filter.
Speaking of which, the best way to determine the proper settings for that filter is: crank the color sigma up as high as it goes, increase the space sigma until you can’t see any more splotchiness, then decrease the color sigma until juuust before an unacceptable amount of noise creeps back in. The iterations parameter is pretty useless, so far as I can see, so just leave it at 1. Unfortunately, Blender doesn’t allow you to script those settings, so you’ll have to crack open the nodegroup to tweak it.
You might want to add a denoise filter to the output, as sharp edges in the colour inputs can result in something that looks like fireflies. There’s no need to use every input, either, skip the ones that are superfluous to your scene or take advantage of that to blur different passes differently.
I also tossed in a quick nodegroup that shows how to consolidate all that pass data into a finished image. You’ll probably break it apart and just use the subset you need, rather than tweak the innards. I’ve also shared copies of Mike Pan’s infamous benchmark and Olivier Vandecasteele’s caustics test (CC-BY-SA) with this technique in play, so you can quickly see it in action
In this era of cheap render farms, I don’t see the technique being very useful for single images, but with some care it should be a life-saver for animators. It works better than temporal noise reduction because it has access to the scene geometry, though there’s no harm in chaining these techniques together to smooth over their respective weaknesses.
Pingback: Denoising Cycles Renders in Blender: Theory | SINMANTYX
Didier said:
Thanks a lot for this very nice trick, I found that a hight iteration value give more smoothness and is longer to compute than a low value which give more noise.
hjhornbeck said:
I’ve tried using multiple iterations, and wasn’t impressed with the results. In theory it’s the better way to go: the bilateral filter is very boxy in Cycle’s implementation, a problem which goes away as you crank up the iteration count. Do you have a good recipe for finding good settings with multiple iterations?
Zauber Paracelsus said:
I tried this out, and while it works pretty well, I found two cases that it does not handle: mirror reflections and world/environment background.
hjhornbeck said:
I mention that in the theory side of things. Fixing the environment is easiest, since it probably lacks sample noise; look at the caustics scene I linked to for how to handle that. As for the reflection, you can try pulling the indirect glossy channel out of the blur, then adding it back in, though this probably adds quite a bit of noise back in; alternatively, you can mask off the mirrored parts, use this technique on everything else, then do a high-quality render of just the missing areas.
Didier said:
No recipe 😦 . a value of 1 give a result wich look like a poor sample irradiance cache in modo or maya, and a value between 5 and 10 give a good result. above 10 i can’t really see a difference.
dufloch said:
works really great in many scenarios, but not when 2 faces with same normal are projected near each other. Put 2 cubes with same rotation above another one, the second one casting a bit of shadow on the first, the edge will be blurred (see here http://www.pasteall.org/pic/96213). Maybe preventing bluring between directlight/1st bounce, 2 bounce, etc… would prevent this?
hjhornbeck said:
That’s to be expected: the cubes have the same normal and colour, so they’re treated as nearby surfaces. Pick your fix:
dufloch said:
thanks for the quick answer, the mist pass is good 🙂
hjhornbeck said:
I’d be careful of using either the mist or Z-buffer pass. Walls which are perpendicular to the imaging plane will have a gradient of values when you visually travel left or right, while bands going up and down will all have the same value. This will give an ansitropic blur; the round glass bowl caustics demo scene is a good demo of this, even though the problem there is the normal pass. If these walls are a solid colour, this effect won’t show; introduce some slight caustics or reflections, though, and you might wonder why the blur looks warped.
Pingback: Dự án cuối cùng của năm, và XIN CHÀO 2016! | Bill Nguyen
Pingback: Last project of the year and HELLO 2016! | Bill Nguyen