Chaos

What are you looking for?

image product-bar
labs-generic-lead.jpg
labs-generic-lead.jpg

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. Nearly every renderer out there is 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?

 

Unbiased basically means that no shortcuts are taken when calculating a render. Every ray is treated equally and there is no bias in terms of any importance whatsoever. Because of this, an enormous amount 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 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 noisy, but when a large number of them are averaged together, you get a final clean result.”

You would think 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 to which it is biased depends on the 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 ability to turn them off, then the user needs to know of the effects of their choices.

 

Common misconceptions about unbiased

 

Here are some of the most common misconceptions about what unbiased is:

Unbiased is physically accurate – Unbiased rendering does NOT imply this or 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 few settings does not make it unbiased. Many settings that make the render biased are 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 in V-Ray to give users a choice of what shortcuts they can to take and to what extent. Other rendering engines don’t always expose those options. This could be to simplify the interface, or to make the user believe no shortcuts are taken and that their rendering engine is unbiased.

 

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 hundreds 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. Any clamping or using any kind of tolerance or threshold to determine whether or not to continue a path make the rendering engine biased. These techniques can reduce calculations and accelerate rendering.

 

What is correct? Biased or unbiased?

 

Use of these tricks doesn’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’ is somehow physically inaccurate. In fact, the relationship between the two terms is similar to the terms ‘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 image to look 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 accounted for, even those with no perceptible difference, then you need an unbiased solution.

 

What is better? Biased or unbiased?

 

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 to get 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 to 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.”

IMG_h96auu.jpg
About the author

Christopher Nichols

Chris is a CG industry veteran and Director of Chaos Labs. He can also be heard regularly as the host of the CG Garage podcast which attracts 20,000 weekly listeners. With a background in both VFX and Design, Chris has worked for Gensler, Digital Domain, Imageworks and Method Studios. His credits include Maleficent, Oblivion and Tron: Legacy.

Originally published: September 29, 2016.
© Škoda Design

Subscribe to our blog.

Get the latest news, artist spotlight stories, tips and tricks delivered to your inbox.

By submitting your information you are agreeing to receive marketing messages from Chaos. You can opt-out at any time. Privacy Policy.

Chaos
© 2024 Chaos Software EOOD. All Rights reserved. Chaos®, V-Ray® and Phoenix FD® are registered trademarks of Chaos Software EOOD in Bulgaria and/or other countries.