The truth about unbiased rendering
Over the years, there have been many debates about whether biased or unbiased rendering is better. The term unbiased has been used by many to imply that it is more accurate. The truth is that nearly every renderer out there is actually biased to some extent, even those that claim to be unbiased. Because biased solutions are actually faster, smarter, and not necessarily inaccurate. In order to understand this, it will help to break it down a bit more.
What is unbiased?
Basically an unbiased rendering means that it has taken absolutely no shortcuts in its calculations. Every ray is treated equality and there is no bias in terms of any importance whatsoever. Because of this, an enormous amounts of rays are needed to get a clean result. One of the best descriptions of the effects of unbiased that I have found is from Vlado, who originally posted this on the Chaos Group forums.
“In theory, an unbiased method for computing an integral (in this case the rendering equation) is a method that, if you run it multiple times on the same input data (3D scene), will give you, on average, the correct result (final image), even though each individual result may be quite wrong by itself (f.e. noisy). This means that if you run the algorithm sufficiently many times and average the result, you will get a correct final image. You can imagine this as the multiple passes that the progressive sampler of V-Ray makes through the image to clean up the noise. Each individual pass is quite noisy, but when a sufficiently large number of them are averaged together, you get a final clean result.”
As such, you would think that progressive rendering itself is unbiased. That is actually not true. There are many biased shortcuts that renderers can take to speed up rendering and still be a progressive path tracer. These optimizations can be user controllable in the settings, or can be hidden from the users.
If your raytracer is fast, it is more than likely biased. The degree that it is biased is dependent on developers of the raytracer as well as the settings of the user. If your raytracer exposes many of the biased settings to give the user the choice or ability to turn them off, then the user needs to be aware of the effects of his or her choices.
Common misconceptions about unbiased
If you follow the debates, there are a lot of misconceptions about what unbiased actually is. Here are some of the most common ones that I see.
Unbiased is physically accurate – Unbiased rendering does NOT imply this or conversely that biased rendering is physically inaccurate. Both are inaccurate. Just the idea of using a BRDF such as Blinn or GGX is in itself an approximation of a real world material. The question is which will achieve the physically plausible solution faster. This is explained more below.
Unbiased means less settings – Just because a rendering has very few settings does not make it unbiased. Many settings that make the rendering biased can be hard coded into the renderer and not exposed to the users.
Brute Force GI = Unbiased – Many people think if you calculate Global Illumination a certain way and use cached data then the renderer is biased. While it’s true that cached GI data is biased, brute force GI can also be biased.
Path tracing is unbiased – Many biased shortcuts can be introduced even if it is path traced, so this is also untrue.
What makes a renderer biased?
At this point you may be wondering, so how does a rendering go from unbiased to biased? And what are the shortcuts that get it there? There are many common tricks. Some of these tricks are exposed to the user, as they are in V-Ray to give him or her the choice of what shortcuts they want to take and to what extent. Other rendering engines don’t always expose them. This could be to simplify the interface, or to make the user believe that no shortcuts are taken and that their rendering engine is unbiased. Nonetheless, here are a few examples of settings or shortcuts that make the rendering engine biased:
Defining the amount of bounces of light – Unbiased would not limit the ray bounce until it leaves the scene or is completely absorbed.
Using a cache – This can be interpolated for complex raytracing problems such as Global Illumination with 100s of bounces, or caustics are biased solutions that help accelerate those solutions and/or allow significantly more bounces of light.
Adaptive Sampling – This is the act of favoring rays in areas that are more likely to be important. For example, you can favor rays around areas where you know there are lights, or where your GI cache indicates there is a great deal of GI contribution.
Suppressing or removing caustics rays – This is common in many renders as caustics are computationally expensive.
Truncating (clamping) or reducing ray intensity of certain rays to reduce fireflies – This is a common trick for things like glossy reflection rays that can often randomly catch very bright sources. By clamping secondary rays, you reduce the chance that these spikes in intensity (also known as fireflies) are achieved.
Actually, any clamping of any sort or using any kind of tolerance or threshold to determine whether or not to continue a path – Again these techniques can reduce calculations and accelerate your rendering.
What is correct? Biased or unbiased?
It should be noted that all of these tricks, don’t necessarily mean that biased solutions are not as accurate, precise, or physically accurate. Here is another quote from Vlado on the Chaos Group forums:
“I was recently dismayed to learn that many people assume that the term ‘unbiased’ means ‘physically correct’, and ‘biased’ – somehow physically inaccurate; while in fact, the relationship between the two terms is similar to the one between ‘precision’ and ‘accuracy’ as used in a scientific context. Unbiased calculations have great precision, but that does not imply anything about their accuracy (how close they are to the actual correct results). The reverse is also true – biased calculations can be quite correct (e.g. very close to the actual result), but typically somewhat imprecise.”
So biased rendering can in fact be physically accurate, and in most cases is, and can achieve the correct result. If the goal is to get an images to looks as close to the correct physical result as fast as possible, then you need a biased solution. If you need to make sure that all possible rays are account for, even those with no perceptible difference, then you need an unbiased solution.
What is better? Biased or unbiased?
As we have determined, most renderers use solutions that make their render biased, even if they call it unbiased. If they didn’t, the process would be extremely slow. Biased engines are very intelligent; in that they are the most efficient way of getting a correct image. In fact, you can almost call unbiased inefficient.
On paper, the term unbiased sounds superior to biased, since un- suggests no limitations or constraints. But the funny thing is, if people switched unbiased to dumb and biased to smart – which is just as valid – the reverse would probably happen as well.
Long story short: if you are doing true scientific physical calculations and have a ton of computational power and time, unbiased may serve you well. If you are interested in rendering physically plausible images in a reasonable amount of time, biased solutions will get you there faster. Chances are you are already doing this no matter what rendering engine you are using.
Fine… everything is actually biased. But I want less settings.
You can either expose the settings that determine how biased your solution is or hide them. The reason V-Ray has more settings is because different users have different needs. Over the last few versions we have been making strides to reduce the settings you see initially. That’s a big reason why a lot of V-Ray settings are only exposed once you select “advanced” or “expert.” We’ve also been working to making V-Ray less hands-on, so if a user just wants to load up their scene and push a button or two, then they can.
In recent releases of V-Ray, the settings are set up to ignore most of the user’s setting (such as adjusting subdivisions on lights or materials) which can in fact slow down the rendering. Many users simply opened their older scenes and saw massive speed increases in their rendering. While it is true that the V-Ray core has been massively sped up over the last few versions, ignore legacy settings has a big effect on the speed of the rendering.
The good thing is that in many cases V-Ray can be controlled with just 3 settings. This video from Vlado explains his general process for helping users to speed up their scenes by limiting their choices to a few variables.
In fact, the recommended settings that Vlado points out are actually the new defaults, so most users can simply render the scene with the defaults and get great result without tweaking a thing.
V-Ray can actually be truly unbiased.
Another fact that most people don’t know is that since V-Ray exposes all our settings, it is technically possible to be unbiased with V-Ray. In doing so, it is possible for us to truly see the difference between biased and unbiased. Besides being significantly slower, you will notice that the user will not have any substantial differences between the two renderers.
Conclusion: biased solutions work, which is why everyone uses them.
Again, we’ll go to John Carmack since he is wise, and has already said what I want to say. Just replace the word “optimize” with “bias”.
“There is tons of work going on to this today, this is where the state of the art of graphics rendering is, how you optimize this path tracing to be more efficient in different cases. But you are always making your approximations on what you want to do. (…) But this approach, it pretty much works.”