Search found 115 matches

by alpistinho
Fri Apr 19, 2019 6:51 pm
Forum: Development
Topic: Adaptive sampling improvements
Replies: 110
Views: 2421

Re: Adaptive sampling improvements

So, I've first seen the issue with this scene (100 samples in both case, warmup and test step is 5 with adaptivity): Would you be able to redo this test? Besides, keep in mind that the tonemap you choose is considered during the noise estimation, so rendering with some given tonemap settings and ch...
by alpistinho
Fri Apr 19, 2019 5:33 pm
Forum: Development
Topic: Adaptive sampling improvements
Replies: 110
Views: 2421

Re: Adaptive sampling improvements

Comparing with the initial results, it seems this was an issue all along:

Fixed distribution:
RGB_IMAGEPIPELINE_0.png
Wrong distribution:
RGB_IMAGEPIPELINE_0_old_adaptive.png
Uniform sampling:
RGB_IMAGEPIPELINE_0_uniform.png
by alpistinho
Fri Apr 19, 2019 4:22 pm
Forum: Development
Topic: Adaptive sampling improvements
Replies: 110
Views: 2421

Re: Adaptive sampling improvements

Ok, so you have just draw the random numbers even if you are skipping the pixel :idea: This should be fix the problem at a trivial cost of generating just 3 more random numbers. Thanks for the suggestion! I just implemented and I think it is working as expected now. I will send the PR. This probabl...
by alpistinho
Fri Apr 19, 2019 4:08 pm
Forum: Development
Topic: Adaptive sampling improvements
Replies: 110
Views: 2421

Re: Adaptive sampling improvements

Hello, I think I've found the issue. Currently, the seed for the RNG is based on the seedBase, that is a fixed value, and on the pixelIndex inside SobolSharedSampler. The pixelIndex is incremented by SOBOL_THREAD_WORK_SIZE every time the GetNewPixelIndex is called. This means that several seeds are ...
by alpistinho
Thu Apr 18, 2019 2:11 am
Forum: Development
Topic: Adaptive sampling improvements
Replies: 110
Views: 2421

Re: Adaptive sampling improvements

In theory, a sequence of (pseudo)random numbers is the same of a sequence of random numbers but I would be very suprised if the problem is really in the correlation of the sequence (pseudo)random. I am not saying it is this necessarily, but somehow initializing rngGenerator using different values c...
by alpistinho
Thu Apr 18, 2019 1:42 am
Forum: Development
Topic: Adaptive sampling improvements
Replies: 110
Views: 2421

Re: Adaptive sampling improvements

The other option is that there is something going wrong with the value "seedBase", have you tried to use this code ? // Initialize rng0, rng1 and rngPass rngGenerator.init(seedBase + pixelIndex % (0xFFFFFFFFu - 1u) + 1u); sobolSequence.rng0 = rngGenerator.floatValue(); sobolSequence.rng1 = rngGener...
by alpistinho
Wed Apr 17, 2019 9:41 am
Forum: Development
Topic: Adaptive sampling improvements
Replies: 110
Views: 2421

Re: Adaptive sampling improvements

Sure, I was not proposing leaving the code like that. I am still investigating the cause and hope to find a better solution.

I am not 100% sure about what is causing the issue, but as you can see on the samples distributions I've posted, the current solution is making Sobol more like Random.
by alpistinho
Wed Apr 17, 2019 1:28 am
Forum: Development
Topic: Adaptive sampling improvements
Replies: 110
Views: 2421

Re: Adaptive sampling improvements

I have absolutely no idea how mathematically sound this is but using the pixelIndex as the seed for the RNG seems to work... // Initialize rng0, rng1 and rngPass rngGenerator.init(pixelIndex % (0xFFFFFFFFu - 1u) + 1u); sobolSequence.rng0 = rngGenerator.floatValue(); sobolSequence.rng1 = rngGenerator...
by alpistinho
Wed Apr 17, 2019 12:34 am
Forum: Development
Topic: Adaptive sampling improvements
Replies: 110
Views: 2421

Re: Adaptive sampling improvements

It has to do with the scrambling pass. When I hardcode these values, the distribution returns to look like Sobol. sobolSequence.rng0 = 0.2;//rngGenerator. sobolSequence.rng1 = 0.7;//rngGenerator.floatValue(); sobolSequence.rngPass = 0.55;//rngGenerator.uintValue(); Using the same seed for every pixe...
by alpistinho
Wed Apr 17, 2019 12:06 am
Forum: Development
Topic: Adaptive sampling improvements
Replies: 110
Views: 2421

Re: Adaptive sampling improvements

There is one aspect of Random/Sobol samplers you could look into: the adaptive aspect. For instance, one part to improve is that they are currently skipping samples instead of just progressing slower on some (already converged) pixel. The current advantage is that there is one single global "pass" ...