Path Space Regularization (aka the solution to SDS paths)

Discussion related to the LuxCore functionality, implementations and API.
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Fox »

Dade wrote: Tue Sep 17, 2019 9:26 am #2 if you render for "too long", the angles will become too small (i.e. too much "sharpening") and samples will start to be all black and the image will start to be darker and darker.

I'm quite ok with #1 but #2 is a pain and must be solved. Some kind of lower cap could do the trick.
How are the angles reduced, like in SmallVCM
Formula.png
Formula.png (8.57 KiB) Viewed 3334 times
This looks good because it does not go too small, but is not stuck in too large either.
Radius Reduction.png
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Dade »

Fox wrote: Wed Sep 18, 2019 12:47 am How are the angles reduced
It is "scale_parameter * (speed_parameter ^ metropolis_large_mutation_count)" with:

scale_parameter = 0.3
speed_parameter = 0.9999999

BTW, they aknowledge the probleem I'm talking about in their paper:

Code: Select all

Special attention should be paid to the machine precision during the
integration. Since the mollification angle can become very narrow after
many iterations, it can run out of floating point precision.
They are also suggesting a solution:

Code: Select all

We suggest to avoid dividing by the connection distance in Alg. 1, but to work on a scaled
sphere, which contains the vertex to be connected to.
I'm trying to decipher what exactly it means...
Support LuxCoreRender project with salts and bounties
Vutshi
Posts: 16
Joined: Tue Jul 17, 2018 8:24 pm

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Vutshi »

Dade wrote: Wed Sep 18, 2019 8:30 am BTW, they aknowledge the probleem I'm talking about in their paper:

Code: Select all

Since the mollification angle can become very narrow after many
iterations, it can run out of floating point precision.
if the problem with machine precision appears in the angle r then it might be this place

Code: Select all

cosMax = 1.f / sqrtf(1.f + r * r);
I guess it might just collapse to 1 at some point what makes solidAngle=0
if one Taylor expands it for small r then

Code: Select all

solidAngle ~=  M_PI * r*r
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Dade »

Vutshi wrote: Wed Sep 18, 2019 8:59 am if the problem with machine precision appears in the angle r then it might be this place
My concern is more general: at some point the angle will be so narrow that the Sampler will never generate any contributing path so only black samples will be added to the film, more and more.

As end result of averaging the initial not black samples with more and more black samples, the image will become darker and darker.
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Path Space Regularization (aka the solution to SDS paths)

Post by B.Y.O.B. »

Can we compute the "minimum useful angle" for a given scene and film resolution and use it as lower cap?
marcatore
Donor
Donor
Posts: 463
Joined: Wed Jan 10, 2018 8:04 am

Re: Path Space Regularization (aka the solution to SDS paths)

Post by marcatore »

could I wrote something really wrong? :)
Sorry for this...

the problem, if I've understood is that when the angle becom too narrow, everything outside that angle become black. So I thought this:

subdivide the maximum search angle in N steps, for every steps, take the pixel brightness and divide by the N steps and then add every steps each others.

Something like a light accumulation of the caustic pixels.
If it's a shitty idea dont' worry... go on :)
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Path Space Regularization (aka the solution to SDS paths)

Post by lacilaci »

One thing I don't understand is, is this inability to hit round surfaces (or faces at an angle) a limitation of metropolis or is it a limitation imposed by PSR?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Dade »

lacilaci wrote: Wed Sep 18, 2019 11:32 am One thing I don't understand is, is this inability to hit round surfaces (or faces at an angle) a limitation of metropolis or is it a limitation imposed by PSR?
It should be more a Metropolis problem than PSR (may be accentuated by the very narrow angles used by PSR).
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Dade »

B.Y.O.B. wrote: Wed Sep 18, 2019 9:54 am Can we compute the "minimum useful angle" for a given scene and film resolution and use it as lower cap?
Yes, this was my initial idea however, if you use a cap, on the long run, any rendering done before the cap will fade out. For instance, let's say we spend 1,000 samples to reach the cap, and than we render for more 9,000 samples: the first 1,000 samples will weight only for 1/10 of the final render (and, on the long run, they will always weight 0, no matter how long is the initial phase before the cap).

So it just better to work at cap value from the start however this means that both PSR (on angles) and VM (on space) are just a theoretical exercise to use a trick: to replace a perfect specular glass with a slightly glossy glass.

Using the cap for the very beginning and removing any reduction process is exactly what I have done and works better:

1) not initial huge blur, from the very beginning you see the kind of sharpness you are getting.

2) not problems on the long run.

Try it.

P.S. WTF :!:
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Path Space Regularization (aka the solution to SDS paths)

Post by lacilaci »

Dade wrote: Thu Sep 19, 2019 10:16 am
B.Y.O.B. wrote: Wed Sep 18, 2019 9:54 am Can we compute the "minimum useful angle" for a given scene and film resolution and use it as lower cap?
Yes, this was my initial idea however, if you use a cap, on the long run, any rendering done before the cap will fade out. For instance, let's say we spend 1,000 samples to reach the cap, and than we render for more 9,000 samples: the first 1,000 samples will weight only for 1/10 of the final render (and, on the long run, they will always weight 0, no matter how long is the initial phase before the cap).

So it just better to work at cap value from the start however this means that both PSR (on angles) and VM (on space) are just a theoretical exercise to use a trick: to replace a perfect specular glass with a slightly glossy glass.

Using the cap for the very beginning and removing any reduction process is exactly what I have done and works better:

1) not initial huge blur, from the very beginning you see the kind of sharpness you are getting.

2) not problems on the long run.

Try it.

P.S. WTF :!:
Ok, but if you already start with small scale will metropolis be able to find the paths? Won't we still have the same problem with hard to find small samples and caustics on rounded smooth surfaces?
Post Reply