Page 2 of 2

Re: LuxCoreRender v2.0alpha4 released

Posted: Sat Feb 10, 2018 1:57 pm
by Sharlybg
ok, thanks for the clarification. Did you measure how much faster it renders with adaptive sampling? At least in my test using CPU, render time and result where the same using adaptive at 0.0 and 0.7.
I did it in my nakaging test and it is really faster (btw i use adaptive value of 0.95).

Re: LuxCoreRender v2.0alpha4 released

Posted: Sun Feb 11, 2018 6:55 am
by blibli
@Dade ok, I managed to get it working. It looks really good.
When do you start to check convergence (like after 16 samples?) to decide to sample another time or not?
Do you do it then on every sample?
If I understand correctly, you use the convergence pass and a probability based on the adaptive strength value to decide to sample or not?

Re: LuxCoreRender v2.0alpha4 released

Posted: Sun Feb 11, 2018 10:13 am
by Dade
blibli wrote: Sun Feb 11, 2018 6:55 am @Dade ok, I managed to get it working. It looks really good.
When do you start to check convergence (like after 16 samples?) to decide to sample another time or not?
Do you do it then on every sample?
It is controlled by 2 parameters and the default values are:

Code: Select all

# Default values
batch.haltthreshold.warmup = 64
batch.haltthreshold.step = 64
So there is a warm up phase of 64 (avg.) samples/pixel than the test is run every 64 (avg.) samples/pixel.
blibli wrote: Sun Feb 11, 2018 6:55 am If I understand correctly, you use the convergence pass and a probability based on the adaptive strength value to decide to sample or not?
Correct.

Re: LuxCoreRender v2.0alpha4 released

Posted: Sun Feb 11, 2018 10:20 am
by B.Y.O.B.
Dade wrote: Sun Feb 11, 2018 10:13 am It is controlled by 2 parameters and the default values are:
Note that these parameters are not yet exposed in the Blender addon, but it's on my todo list.

Re: LuxCoreRender v2.0alpha4 released

Posted: Sun Feb 11, 2018 5:08 pm
by blibli
Dade wrote: Sun Feb 11, 2018 10:13 am
blibli wrote: Sun Feb 11, 2018 6:55 am @Dade ok, I managed to get it working. It looks really good.
When do you start to check convergence (like after 16 samples?) to decide to sample another time or not?
Do you do it then on every sample?
It is controlled by 2 parameters and the default values are:

Code: Select all

# Default values
batch.haltthreshold.warmup = 64
batch.haltthreshold.step = 64
So there is a warm up phase of 64 (avg.) samples/pixel than the test is run every 64 (avg.) samples/pixel.
blibli wrote: Sun Feb 11, 2018 6:55 am If I understand correctly, you use the convergence pass and a probability based on the adaptive strength value to decide to sample or not?
Correct.
Thanks for the clarification. I tried to implement adaptive sampling on Cycles, but the overhead counterbalanced the gain most of the time. I was checking every 16 samples though, used no buffer and only spend like 2 hours on it. You did it right.

@B.Y.O.B.
ok, good to know :)

Re: LuxCoreRender v2.0alpha4 released

Posted: Sun Feb 11, 2018 7:42 pm
by Dade
blibli wrote: Sun Feb 11, 2018 5:08 pm Thanks for the clarification. I tried to implement adaptive sampling on Cycles, but the overhead counterbalanced the gain most of the time. I was checking every 16 samples though, used no buffer and only spend like 2 hours on it. You did it right.
Cycles does tile rendering (like TILEPATHOCL/CPU) and it would require a different approach. TILEPATH has a possibile solution however has its fair share of problems due to false positives (i.e. considering a tile done when it is not).
The new solution has 3 winning points compared the old one in TILEPATH:

1) it works over all the image so it is statistically very unlikely to have a false positive over all the pixels of the complete image.

2) it never stops sampling all pixels, just reduces the probability to sample them so even a false positive does no harm.

3) it works at pixel level instead of tile level so it is a more fine grained/optimized solution.

Re: LuxCoreRender v2.0alpha4 released

Posted: Mon Feb 12, 2018 8:44 am
by blibli
Dade wrote: Sun Feb 11, 2018 7:42 pm
1) it works over all the image so it is statistically very unlikely to have a false positive over all the pixels of the complete image.

2) it never stops sampling all pixels, just reduces the probability to sample them so even a false positive does no harm.

3) it works at pixel level instead of tile level so it is a more fine grained/optimized solution.
Very helpful summary. Cycles is very slow with progressive rendering, so it would be a pretty big undertaking to make it faster, even with adaptive sampling. The biggest problem with tiled rendering is that when you switch to the next tile, you stop definitely to sample some pixels.
A workaround would be to have many passes like you did in Luxcore. Or use bigger tiles and a pretty low probability like 0.5 or 0.4, but then the overhead will be bigger of course.
Maybe a neural network could also help to predict how much samples a pixel will need, maybe with one re-evaluation before terminating. Or letting the NN define a better probability per pixel (instead of a probability per image). It could be based on albedo, normal and convergence buffer after x samples for example. Of course, it would have to be trained on lots of high quality scenes.

Re: LuxCoreRender v2.0alpha4 released

Posted: Wed Feb 14, 2018 7:16 pm
by Asticles
You're really great, guys!