Page 13 of 20
Re: Path Space Regularization (aka the solution to SDS paths)
Posted: Wed Sep 18, 2019 12:47 am
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 (8.57 KiB) Viewed 4455 times
This looks good because it does not go too small, but is not stuck in too large either.
Re: Path Space Regularization (aka the solution to SDS paths)
Posted: Wed Sep 18, 2019 8:30 am
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...
Re: Path Space Regularization (aka the solution to SDS paths)
Posted: Wed Sep 18, 2019 8:59 am
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
Re: Path Space Regularization (aka the solution to SDS paths)
Posted: Wed Sep 18, 2019 9:25 am
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.
Re: Path Space Regularization (aka the solution to SDS paths)
Posted: Wed Sep 18, 2019 9:54 am
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?
Re: Path Space Regularization (aka the solution to SDS paths)
Posted: Wed Sep 18, 2019 10:32 am
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

Re: Path Space Regularization (aka the solution to SDS paths)
Posted: Wed Sep 18, 2019 11:32 am
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?
Re: Path Space Regularization (aka the solution to SDS paths)
Posted: Wed Sep 18, 2019 3:45 pm
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).
Re: Path Space Regularization (aka the solution to SDS paths)
Posted: Thu Sep 19, 2019 10:16 am
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

Re: Path Space Regularization (aka the solution to SDS paths)
Posted: Thu Sep 19, 2019 10:33 am
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?