LuxCore: New OpenCL Sobol sampler

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: Dade, jromang, tomb, zcott, coordinators

LuxCore: New OpenCL Sobol sampler

Postby Dade » Sat Feb 21, 2015 11:45 am

I was looking into this problem viewtopic.php?f=11&t=11559 and I ended to write a new implementation of the Sobol sampler in OpenCL.

The common way to have parallel implementation of samplers is just to have a local sampler for each thread: this isn't a big issue with CPUs where you have 6-12 samplers instead of 1. However it is a problem on modern GPUs where you can easily have half a million of threads.

The problem is in the speed of the exploration of the samples space, with 10 threads is 10 times slower (i.e. not a big deal) but with 500,000 threads is 500,000 slower ! I have a developed a new implementation of the Sobol sampler that will explore the samples space like if there was only a single sampler, making the exploration thousand of times faster on GPUs.

The result is a well noticeable reduction of the rendering noise. This is a rendering with the old Sobol sampler (64 samples per pixel):

old.png


and this is with the new Sobol sampler (64 samples per pixel):

new.png


P.S. the new implementation also address the original issue linked at the beginning.

P.S.S. if I only could find a way to obtain the same result with Metropolis sampler :!:
User avatar
Dade
Developer
 
Posts: 8363
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxCore: new OpenCL Sobol sampler

Postby B.Y.O.B. » Sat Feb 21, 2015 1:39 pm

Thank you so much :D
Great stuff!
User avatar
B.Y.O.B.
Developer
 
Posts: 5139
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: LuxCore: new OpenCL Sobol sampler

Postby jensverwiebe » Sat Feb 21, 2015 2:55 pm

wow :)

Jens
User avatar
jensverwiebe
Developer
 
Posts: 3407
Joined: Wed Apr 02, 2008 4:34 pm

Re: LuxCore: new OpenCL Sobol sampler

Postby jensverwiebe » Sun Feb 22, 2015 6:13 am

More observations on the new Sobol:

- it adds up devices much better ( again )
- it renders around 30% slower while given 100% better result in the same time
- "pattern artifacts" are gone

Example: the cycles bmw ( @200 samples ) was 14s best before ( but dirty ), now it's 21s but quite noisefree.

Perhaos this is the truth about the former "cold fusion" surprise ?

Anyway, stunning better right now, thx Dade.

Jens
User avatar
jensverwiebe
Developer
 
Posts: 3407
Joined: Wed Apr 02, 2008 4:34 pm

Re: LuxCore: new OpenCL Sobol sampler

Postby Dade » Sun Feb 22, 2015 7:19 am

jensverwiebe wrote:More observations on the new Sobol:

- it adds up devices much better ( again )
- it renders around 30% slower while given 100% better result in the same time
- "pattern artifacts" are gone

Example: the cycles bmw ( @200 samples ) was 14s best before ( but dirty ), now it's 21s but quite noisefree.

Perhaos this is the truth about the former "cold fusion" surprise ?

Anyway, stunning better right now, thx Dade.


Jens, check the average path length in term rays (it is a stat. available on latest SLG GUI) or check the rays/sec stat.: I have noticed also a slowdown in term of samples/sec but newer Sobol produced longer average paths and the same rays/sec. This seems to suggest a better path utilization (i.e. a path is truncated if can not deliver any more light to the eye so longer path seems to suggest a better utilization of the same amount of rays traced and, as result, far less noise).

I think that source of the "cold fusion" surprise was the result of having particularly short paths (i.e. a lot of samples for the same amount of rays/sec). I'm not sure why exactly the older Sobol was generating so many short paths, they may have been some strange interaction with Russian Roulette :?:
User avatar
Dade
Developer
 
Posts: 8363
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxCore: new OpenCL Sobol sampler

Postby Dade » Mon Aug 17, 2015 4:25 am

I have applied the same technique described in my first post to CPU Sobol sampler. It delivers a slightly better rendering speed (5%-10%) and and a slightly better convergence speed. More cores/threads you have and better the increased convergence speed will be (i.e. 4 cores not noticeable, 10+ slightly noticeable, etc.) .

The code is available in "new_cpu_sobol_sampler" branch and it will land in LuxRender v1.6.
User avatar
Dade
Developer
 
Posts: 8363
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxCore: new OpenCL Sobol sampler

Postby Piita » Wed Aug 19, 2015 9:47 pm

Awesome, Dade!
User avatar
Piita
 
Posts: 610
Joined: Sat Aug 06, 2011 2:09 pm
Location: Finland


Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 3 guests