
hi
I am running some numbers about the new adaptive sampling strategy proposed in Yafaray 2.0 and the performance is just impressive, geometrical progression of samples makes the adaptive passes to resample increasingly less pixels in every pass, during some passes even sustaining a 50% rate, then after a certain amount of adaptive passes (10) diminishing returns start to appear because of highlights sampling. Geometrical progression means that samples are multiplied for a certain rate in every new adaptive pass. In this particular case I am using a
base 2 progression for both AA samples and IBL background sampling. Sampling a notoriously difficult IBL backgroung with a respectable 0.008 thresold, I get this numbers:
pass 2 / 75600 pixels resampled
pass 4 / 75520 pixels resampled / 40 pixels x pass
pass 6 / 74357 pixels resampled / 580 pixels x pass
pass 8 / 44000 pixels resampled / 15200 pixels x pass
pass 10 / 8400 pixels resampled / 17800 pixels x pass
pass 11 / 7378 pixels resampled / 1022 pixels x pass

pass 2 / 75600 pixels resampled

pass 7

pass 11 / 7378 pixels resampled. Notice how sampling area is reduced in this pass, in fact it is only sampling object boundary and highlights. Somewhat we compensate very high samples with increasingly reduced sampling areas.
Now we are going to compare it with the traditional adaptive sampling strategy based on an arithmetic progression which means that a number of samples is
added to every pass (2 AA samplesx 16 IBL samples= 32 samples). The same scene after 1024 passes is still resampling 22500 pixels, but to halve that so we reach resampling levels as in the geometric progression, the number of passes needed will probably reach 2048 passes and beyond. The progression is as follows (0.008 thresold) :
pass 02/ 75542 pixels resampled
pass 16/ 74886 pixels resampled/ 46 pixels x pass
pass 32/ 72671 pixels resampled/ 138 pixels x pass
pass 64/ 67994 pixels resampled/ 146 pixels x pass
pass 128/ 60700 pixels resampled/ 113 pixels x pass
pass 256/ 46600 pixels resampled/ 110 pixels x pass
pass 512/ 32200 pixels resampled/ 56 pixels x pass
pass 1024/ 22500 pixels resampled/ 18 pixels x pass

pass 1024/ 22500 pixels resampled
The efficiency of the traditional adaptive algorithm is quickly decreasing in the final segments. In fact, in some of the the last passes YafaRay resamples a bit more pixels than in the previous pass, which is a crear performance issue. Obviously, geometric progressions comes at a hardware and render time cost but users can use softer geometrical progression than full base 2 steps, or concentrate acceleration in the secondary bounce (path tracing, final gather, IBL) for montecarlo noise sampling while keeping AA samples in arithmetic progression. Geometrical progression seems to be a better strategy to solve montecarlo integrations, it goes with the nature of the beast. Also this test shows that we probably need different thresold limits for highlights, midtones and dark shadows.