[Bf-cycles] CMJ causing an infinite loop

Brecht Van Lommel brechtvanlommel at pandora.be
Tue Apr 15 15:04:46 CEST 2014

On Mon, Apr 14, 2014 at 5:37 PM, Lukas Stockner
<lukas.stockner at freenet.de> wrote:
> The new backtrace is below, p0 is the p passed to the cmj_sample_1/2D
> routines since p was already used in the cmj_sample arguments.
> I just tried the exact same scene, just with 2000000 samples instead of
> 2000000000, and it worked perfectly. I set the sample number so high so
> that it would only stop from the adaptive stopping, but 2000000000 is
> just ridiculously high, so this issue probably won't ever affect a
> regular user.

Ok, this looks like an integer overflow, 2000000000 is very close to
2147483648. I'll add some limit on the number of samples.

If you use that many samples though CMJ will be no better than a
pseudorandom number generator or the hash in cmj_randfloat. The small
random subset of samples that you actually use will not be stratified.
So I would expect Sobol to work significantly better than CMJ here.


More information about the Bf-cycles mailing list