Faster rendering using Cycles Adaptive Sampling (with tips)

Now that the adaptive sampling feature has being added to the master. This allows for a modern workflow that I use in GPU rendering in V-Ray. That consist of using noise level and max samples to adjust the quality versus performance on a scene to render.

Previously I used E-Cycles pattern/Scrambling distance to improve rendering times. The way AS(adaptive sampling) works it is not possible to combing both methods they are exclusive of each other. I suggest that AS method is better than using scrambling distance. Specially when combine with the improve quality of the denoiser. Of course specific use cases for certain scenes may be different were this workflow may not be needed.

Adaptive sampling allows to control the time of rendering by the noise threshold. AS equalizes or evenly distributes the noise level of the image by expending more time in areas with higher noise. This is important because it allows higher quality denoising for the same amount of render samples compared with out AS. AS performance also depends on the scene content in scenes with large flat backgrounds like the BWM scene AS will perform better than the Classroom scene with busier content.

To use AS effectively need high enough samples, determining the noise threshold level required and a good denoiser.

  1. Minimum good starting rendering samples would be at least 800-1000. Can increase for final image 2000 or greater if required.
  2. Set the appropriate “Noise Threshold” when combining with a denoiser use 0.1-Good, 0.01-Great and 0.001-Super. See below for times and image samples.
  3. Denoiser use the “OptiX AI Accelerated” with input passes for “Color+Albedo+Normal”. From my test it maintains better texture detail and is faster than the Cycles denoiser (See below).
  4. AS also works with “Viewport Denoising”, so have it enable in the viewport render.

Crop from “Barcelone” scene using OptiX Ai Accelarted denoiser with AS threshold of 0.1:
Barcelone_AS_1_Wall

Crop from “Barcelone” scene using Cycles denoiser with AS threshold of 0.1:
Barcelone_AS_1_CyclesD_Wall
Notice the texture blurriness on the wall using the Cycles denoiser.

For testing AS I have used that standard sample scenes “bmw27”, “Classroom” and “Pavillon Barcelone” from Blender.org. Cycles was set to Optix. Use Nvidia 2x2070 graphics cards. All times include AI denoiser and no compositing.

The BWM scene modified by increasing the image output from 50% to 100%, since the render time was too fast at the default of 50% it is 4 times larger the amount of data compare to the original.

BMW Scene at 100% (1225AA samples, 256x256 tiles and AI denoiser). All times include denoiser time of 2-4 sec.
AS with Noise Threshold of 0.1: 07.18 sec.
AS with Noise Threshold of 0.01: 11.09 sec.
AS with Noise Threshold of 0.001: 37.95 sec.
No AS: 1:01.63 sec.

BWM render at 100% AS Noise Threshold 0.1:

BWM render at 100% AS Noise Threshold 0.01:

BWM render at 100% AS Noise Threshold 0.001:

Pavillon Barcelone Scene (1000AA samples, 256x256 tiles and AI denoiser). All times include denoiser time of 1-3 sec.
AS with Noise Threshold of 0.1: 09.75 sec.
AS with Noise Threshold of 0.01: 15.82 sec.
AS with Noise Threshold of 0.001: 1:23.39 sec.
No AS: 1:36.76 sec.

Pavillon Barcelone render at 100% AS Noise Threshold 0.1:

Pavillon Barcelone render at 100% AS Noise Threshold 0.01:

Pavillon Barcelone render at 100% AS Noise Threshold 0.001:

Classroom Scene (Increase samples from 300AA to 1000AA, 256x256 tiles and AI denoiser). All times include denoiser time of 4-8 sec.
AS with Noise Threshold of 0.1: 24.20 sec.
AS with Noise Threshold of 0.01: 1:17.22 sec.
AS with Noise Threshold of 0.001: 4:26.95 sec.
No AS: 4:27.36 sec.

Classroom render at 100% AS Noise Threshold 0.1:

Classroom render at 100% AS Noise Threshold 0.01:

Classroom render at 100% AS Noise Threshold 0.001:

14 Likes

I am very interested in these settings. Thank you for benchmarking them. I appreciate this a lot. Please screen capture the panel settings (where do we tune this in Blender). Thanks.

When you say “Cycles denoiser”, are you meaning the original one or the Intel one?

Ever since the Intel denoiser came on the scene in the form of a composite node, you will be hard pressed to find anyone who still uses the original one. Even Lukas Stockner (the author of the original one) has more or less abandoned all work on it in favor of improving the quality of passes for use with the new ones.

2 Likes

Thank you for doing these benchmarks. I got really curious to see how much speed improvement I would get on my slightly worse GPU, a single GTX 1050ti.

Both renders are using the default settings of 1225AA samples, 100% size, and with the Intel denoiser applied in compositing using the normal and albedo passes.

AS: on, 0.005 adaptive threshold.
Render time: 4:10.59

AS: off.
Render time: 16:19.13

About 4x speed improvement in this scene, could’ve been even more with a bigger threshold!

Will non-Optix GPUs be able to use adapative sampling? Looks and sounds pretty sweet. :partying_face:

Sure, I used CUDA in my render.

1 Like

Thanks for the info & benchmarks, very helpful. When you mention 1000 samples , do you mean 1000 square (AA) samples ?

Ace_Dragon,

The Cycles denoiser I compare with was the original one. I suspect that the Intel denoiser could be just as good. I did no tested with it. I good feature with the Optix denoiser is that can also be used in viewport rendering with AS.

Binke,

The samples quantity of 1000 is regular not square samples.

The Intel denoiser gets even better when combined with compositing to denoise the individual lighting passes separately.

As for the benchmark render, it’s about at the point where if you turn off the caustics, limit your feature use to what Eevee has, and purposely leave a little noise for denoising to remove, then Eevee itself isn’t looking so hot anymore as far as any performance advantage goes (especially if you use Irridiance grids that need to be updated for object movement).

David,

The settings are quite basic. See below for screen capture for the settings I used for bmw scene.

3 Likes

I just sat down and tried Adaptive Sampling. It seems like it has made rendering far less hardware intensive than before. Was able to render at 2-3k samples with 512x512 tiles, which I was never able to do before on my Nvidia GTX 980 card. 256x256 was about the best my GPU could achieve without crashing during rendering. I even tried 1000x1000 and it seemed to do all right until it crashed after 2k samples had been rendered out of 3k.

The vastly reduced odds of crashes is the best part, but the speed improvements I very much appreciate as well. Overall a very nice feature. To think that Cycles will continue getting more improvements along the lines of Adaptive Sampling is very much welcome. :partying_face:

3 Likes

We just need light trees to round out the main optimization subjects. Someone on the dev. site posted a link to this paper.

Compared to the solutions seen in commercial engines today, the lighting and the highlights resolve well no matter how hard of a lighting situation you throw at it. The code is even on github so it might be possible for this to be in Cycles by Summer.

The only big thing after that would be Pixar’s manifold exploration algorithm which is supposed to boost the rendering of caustics. That would not mean the end of optimization though as there’s a lot of smaller things that will steadily lead to the engine being able to render nearly anything in hours rather than days.

4 Likes

There is absolutely no point in comparing adaptive sampling if you smudge it with the denoiser on top. That’s just ridiculous. It’s not comparison of adaptivity settings, just comparison of how denoiser behaves with different noise level. If you want to show how/if adaptive sampling works, turn off denoiser completely and then compare.

4 Likes

Here’s my test without the denoiser, same settings as above.

AS off, time 16:19.13

AS on, time 4:10.59

As you can see, the AS have slightly more noise overall, but with 4x faster rendering speed with the settings I used.

2 Likes

Yes, AS will not actually speed up rendering. I wrote more about it here:

2 Likes

Thanks a lot for your useful elucidation and rendering comparisons, @eklein, much appreciated. This is very inviting to have a go at AS.

1 Like

rawalanche,

Technically I don’t disagree with you and I have describe how adaptive sampling works and similar way, and your link goes into more detail.

In practice you get a more evenly distribute noise convergence faster with AS. So for example in the “BMW” scene using AS threshold the render is not wasting time and samples in relative clean background areas and focuses more in the specular highlight noisy areas.

Having noise scene distribute faster will cut your render times for getting an acceptable clean image. Second point is that having scene noise equalize using AS will give the denoiser better results.

I have included denoise images because that is the workflow I use. Denoiser technology has improve so much in the last couple years that their is no reason not to use it and save render time and with AS it works better.

As I said before adaptive sampling benefits are scene dependent, scenes that already have more evenly noise will benefit much less from AS.

Last note is for a feature just introduce to the master the Cycles performance for adaptive sampling is quite good.

5 Likes

1225 AA samples. But I don’t know where they are coming from. I was referring to the “advanced” sub tab from the Sampling tab for the “details” :slight_smile:

This example you posted, do you have the details “samples advanced” settings? I would like to know how many bounces the volume, diffuse, etc… have. Thanks!