In this post we’ll have a look at some sampling technics that can dramatically speed up your render times without affecting image quality. Let’s explore the alSurface shader for Arnold, and the “magic” Russian Roulette check-box.
The alSurface is a general-purpose shader (similar to the default aiStandard) from the alShaders library, that can create any material type (apart from hair and skin that have their own shader). It has two specular layers, so you can easily create layered reflections with no effort, and it ensures energie conservation.
So basically it has either a diffuse or a refractive/transmissive layer in the base and then you can add one or two specular layers on top ( a common roughness map in the first specular layer and a clear coat on top for instance).
This should cover most of the materials you will need, but you can always combine two alSurface with the alLayer node, or even with a more complex network with a layered texture and an aiUtility to receive the shading result.
So diffuse, specular, refraction, IOR, we all know that from the aiStandard, and it works the same in the alSurface. So why would we use it instead of the “official” general-purpose Arnold shader?
Apart from the two specular layers, this shader has some optimizations that can dramatically decrease render times, specifically the Russian Roulette sampling, but how does it work?
Let’s look at an example, rendering glass. In a “normal” approach the render engine will calculate at each intersection a unique ray for refraction and other for reflection, and “filter” the result using the index of refraction.
With Russian Roulette there is a random function in between that will either calculate the refraction or the reflection ray, according to the Fresnel function.
But if we’re using some “hacks” in between, what does it means in terms of image quality against the “real thing”?
So, as you can see there is almost no difference between the aiStandard and the alSurface renders. In other hand, there is a big difference in render time, the alSurface is way faster for a given ray depth (10 in this example).
The render times are based on a 960×540 resolution with 5 AA samples, on a common desktop machine.
And if we populate the scene with some objects to reflect and refract we won’t notice much difference either, apart from the render times of course.
How do we turn it on?? Russian Roulette is on by default when you’re using the alSurface shader, see the image below.
So what else can this Russian Roulette thing do for us? In a typical interior scene we would need many bounces to fill the scene with light, and some of those bounces, while they “travel” through the scene, become so dark that they won’t contribute much to the final result of the rendered image. So here the RR function will randomly choose to stop or continue to calculate those rays, which will result again in a very similar image but a dramatic speed increase.
For this scene I am using only an hdri light, wich has only a door and a window to let the light to fill the interior, which makes it really hard for a brute force engine like Arnold.
So definitely a great shader, and we only used some test scenes, imagine scaling this to a production scene, it could dramatically impact your render times. Although it’s not integrated in Arnold by default, the author received full support from solidangle while developing the shaders, and Russian Roulette technics have been heavily used in production.
A lot of potential here, if you want to know more about this subject in future posts, let me know in the comments below. And if you like our articles you will probably enjoy our course, the CG Generalist Course.
Thanks for reading.