LuxCore: Variance clamping

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: Dade, jromang, tomb, zcott, coordinators

LuxCore: Variance clamping

Postby Dade » Mon Aug 31, 2015 10:55 am

Variance clamping

var-clamp.png


Introduction

Variance clamping is an evolution of old radiance clamping. It is available on "adaptive_radiance_clamping" branch and it will be included in LuxRender v1.6.

Scaling Vs Clamping

The first and most obvious improvement over old radiance clamping is in scaling values instead of clamping them. For instance, a sample value of (10.0, 5.0, 5.0) with a radiance threshold of 1.0 was clamped in (1.0, 1.0, 1.0). It is now scaled to (1.0, 0.5, 0.5) with the obvious advantage of preserving the color information (i.e red-ish Vs white).

If you check the above picture, in the right column renderings, the fireflies are grey-ish with the old radiance clamping while are now blu-ish (i.e. reducing the bias introduced and increasing the accuracy of the rendering at no cost).

From Radiance clamping to Variance clamping

I have evolved the concept of radiance clamping into variance clamping: instead of just clamping samples, I place an upper bound to the amount of variance introduced by each single sample. As everyone know, the amount of noise is related to variance. This has several advantages:

1) provide a theoretical background to something that was just an heuristic to avoid fireflies;
2) place an upper abound to the variance (i.e. noise) of a rendering;
3) effectively transform variance clamping in an anti-noise tools (while radiance clamping was only an anti-fireflies tool).

If you check the above picture, in the right column renderings, it is noticiable as the background plane has more noise (i.e. variance, spikes, etc.) with old radiance clamping than new variance clamping.

LuxCore properties

Variance clamping is a replacement for old radiance clamping. The property to control the cap is:

Code: Select all
path.clamping.variance.maxvalue = 0.0 (default value, disabled)
biaspath.clamping.variance.maxvalue = 10.0 (default value)


The old properties:

Code: Select all
path.clamping.radiance.maxvalue
biaspath.clamping.radiance.maxvalue


Are still accepted and used as an alias of new properties for compatibility with the past.

Bias

Variance Clamping is still a biasing tool (like old Radiance Clamping) to reduce noise/fireflies/rendering time in exchange of accuracy.

BiDir+MTL Vs Path with Variance Clamping

I assume I don't need to explain that while the BiDir+MTL rendering looks gorgeous, it requires about 20 minutes for the rendering on the CPU while Path with Variance Clamping runs about in real-time on the GPUs.
User avatar
Dade
Developer
 
Posts: 8356
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxCore: Variance clamping

Postby pciccone » Mon Aug 31, 2015 11:03 am

Fantastic job David.
Thank you.
User avatar
pciccone
Developer
 
Posts: 1579
Joined: Wed Jan 13, 2010 11:02 am
Location: South Carolina

Re: LuxCore: Variance clamping

Postby SATtva » Mon Aug 31, 2015 11:31 am

!!!
Superb!
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 7162
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: LuxCore: Variance clamping

Postby B.Y.O.B. » Mon Aug 31, 2015 11:54 am

Very useful feature!
User avatar
B.Y.O.B.
Developer
 
Posts: 5135
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: LuxCore: Variance clamping

Postby Piita » Mon Aug 31, 2015 1:51 pm

Excellent!
User avatar
Piita
 
Posts: 610
Joined: Sat Aug 06, 2011 2:09 pm
Location: Finland

Re: LuxCore: Variance clamping

Postby spectral fusion » Sun Sep 13, 2015 10:53 pm

While all this pathtracing addons tricks look amazing i was wondering if the these things like adaptive tile rendering bringhness clamping etc would also work with vcm, i am also wondering if custom tile importance maps would be possible with path, bidir and vcm as it would be the most useful for vcm for example, imagine you could load a pre-rendered importance map based on an sspm render as it gives a very good result at 1/100 of the render time of using vcm but from the initial photon map never gains quite as much fine detail as vcm can offer.

Would adaptive tiles and some of the other new path tracing features be possible with vcm too?
spectral fusion
 
Posts: 457
Joined: Thu Mar 06, 2008 4:27 am

Re: LuxCore: Variance clamping

Postby jeanphi » Mon Sep 14, 2015 1:29 am

spectral fusion wrote:While all this pathtracing addons tricks look amazing i was wondering if the these things like adaptive tile rendering bringhness clamping etc would also work with vcm, i am also wondering if custom tile importance maps would be possible with path, bidir and vcm as it would be the most useful for vcm for example, imagine you could load a pre-rendered importance map based on an sspm render as it gives a very good result at 1/100 of the render time of using vcm but from the initial photon map never gains quite as much fine detail as vcm can offer.

Would adaptive tiles and some of the other new path tracing features be possible with vcm too?

The short answer is yes it can benefit to some extent. The longer one is that with bidirectional path tracing the whole picture is much more complex than with simple path tracing. With path tracing, when you start tracing a ray, you know exactly where it will contribute to the final image; on the contrary with bidirectional path tracing when you start tracing a light ray you never know what can happen to it. So even when you think a tile might be finished, a new light path that had been ignored up to now can start to contribute significantly to that tile. The real challenge with bidirectional path tracing is to efficiently trace light paths throughout the scene, and there VCM can help because you're working with a huge set of light paths so you can use the information from those paths to select better light paths to trace.

Jeanphi
jeanphi
Developer
 
Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

Re: LuxCore: Variance clamping

Postby spectral fusion » Tue Sep 15, 2015 9:16 am

jeanphi wrote:
spectral fusion wrote:While all this pathtracing addons tricks look amazing i was wondering if the these things like adaptive tile rendering bringhness clamping etc would also work with vcm, i am also wondering if custom tile importance maps would be possible with path, bidir and vcm as it would be the most useful for vcm for example, imagine you could load a pre-rendered importance map based on an sspm render as it gives a very good result at 1/100 of the render time of using vcm but from the initial photon map never gains quite as much fine detail as vcm can offer.

Would adaptive tiles and some of the other new path tracing features be possible with vcm too?

The short answer is yes it can benefit to some extent. The longer one is that with bidirectional path tracing the whole picture is much more complex than with simple path tracing. With path tracing, when you start tracing a ray, you know exactly where it will contribute to the final image; on the contrary with bidirectional path tracing when you start tracing a light ray you never know what can happen to it. So even when you think a tile might be finished, a new light path that had been ignored up to now can start to contribute significantly to that tile. The real challenge with bidirectional path tracing is to efficiently trace light paths throughout the scene, and there VCM can help because you're working with a huge set of light paths so you can use the information from those paths to select better light paths to trace.

Jeanphi


We are lucky i actually found someone who made adaptive sampling work with bdpt on a blog from this year, and just a day after i had the same idea funny how life works, now we just need the source code for it.

http://blog.yiningkarlli.com/2015/03/ad ... pling.html
http://jo.dreggn.org/home/2009_stopping.pdf
spectral fusion
 
Posts: 457
Joined: Thu Mar 06, 2008 4:27 am

Re: LuxCore: Variance clamping

Postby Dade » Sat Dec 12, 2015 5:34 am

I uploaded a small video of how (well) variance clamping work here: https://youtu.be/9KqzfxgMRuA

render.png
User avatar
Dade
Developer
 
Posts: 8356
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxCore: Variance clamping

Postby Abel » Sat Dec 12, 2015 6:29 am

Dade wrote:I uploaded a small video of how (well) variance clamping work here: https://youtu.be/9KqzfxgMRuA

Wow, that's a very convincing demonstration!
User avatar
Abel
Developer
 
Posts: 1847
Joined: Sat Oct 20, 2007 8:13 am
Location: Stuttgart, Germany

Next

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 1 guest