## LuxCore: new fast pixel filtering for PATH engine

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

Moderators: Dade, jromang, tomb, zcott, coordinators

### LuxCore: new fast pixel filtering for PATH engine

Introduction

LuxRender uses pixel filtering to reconstruct the rendered image out of samples (like PBRT). Each sample affects multiple pixels according the pixel filter radius. Larger is the radius and more pixels are affected. Indeed, more pixels are affected and slower the rendering is. With the default filter radius value, about 5x5 pixels are affected by each sample. This is clearly very expansive.

BIASPATH pixel filtering

BIASPATH has introduced a new way to reconstruct the image from samples: it uses the samples distribution to implicitly weight the samples. On the long run, it produces exactly the same result. However one sample affects one and only one pixel and this is clearly a lot faster than affecting 5x5 pixels.

Blurred Vs sharp at the begin of the rendering

Both methods produce exactly the same result on the long run however there is a difference: classic method will produce a blurred image at the beginning of the rendering while new method produces sharper images. But it doesn't matter on the long run.

New pixel filtering now available for PATH(CPU/OCL) too

I have implemented the same BIASPATH pixel filtering technique in PATH too. It is also the new default method used. you can switch between one method and the other by using this property:

Code: Select all
path.fastpixelfilter.enable = 1

Constant (small) performance cost

The new method is clearly faster than the old one, This is a CPU rendering with the old method:

and this with the new method:

12% faster. Larger is the filter radius and larger is the benefit. Also higher is the samples/sec and more pixel filtering become a bottleneck and more the new method is useful. Indeed, GPUs like this stuff. This is a rendering with the old method on a GPU:

and this with the new method:

17% faster. you can obtain some crazy speedup by using larger filter radius (i.e. constant cost Vs NxN cost) however very large pixel filter radii are not particularly useful.

BIDIR

BIDIR is a low throughput (i.e. samples/sec) rendering method. I'm still wondering if it is worth to implement the new technique for BIDIR too.

Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

### Re: LuxCore: new fast pixel filtering for PATH engine

Cool!

Is it like the "Filter Importance Sampling" used in Cycles?
(lgdv.cs.fau.de/get/785)

Thank you for all your work

Alpistinho

Posts: 264
Joined: Sat Sep 27, 2014 10:57 am
Location: Rio de Janeiro, Brazil

### Re: LuxCore: new fast pixel filtering for PATH engine

You keep shattering the old "LuxRender is slow" prejudice until it is no longer recognizable... 3.85 MS/s on a CPU rendering, holy cow!

B.Y.O.B.

Posts: 5181
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

### Re: LuxCore: new fast pixel filtering for PATH engine

B.Y.O.B. wrote:You keep shattering the old "LuxRender is slow" prejudice until it is no longer recognizable... 3.85 MS/s on a CPU rendering, holy cow!

+1, and people still believe it is -- stereotypes are so stupid.
Linux builds packager

SATtva

Posts: 7164
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

### Re: LuxCore: new fast pixel filtering for PATH engine

Maybe LuxCore should have been named "FastLux"

B.Y.O.B.

Posts: 5181
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

### Re: LuxCore: new fast pixel filtering for PATH engine

Alpistinho wrote:Is it like the "Filter Importance Sampling" used in Cycles?
(lgdv.cs.fau.de/get/785)

Yes, exactly, it was invented for tile rendering mainly but works well with full-image samplers too (like the one used in PATH engine).

Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

### Re: LuxCore: new fast pixel filtering for PATH engine

This is fantastic news. Not only for the speed but for the quality of the image. I found that BIASPATH images end up being sharper then when user PATHCPU. So, can we assume that this will bring the same final sharpness to the PATHCPU renderer?

Thank you.

pciccone

Posts: 1579
Joined: Wed Jan 13, 2010 11:02 am
Location: South Carolina

### Re: LuxCore: new fast pixel filtering for PATH engine

pciccone wrote:This is fantastic news. Not only for the speed but for the quality of the image. I found that BIASPATH images end up being sharper then when user PATHCPU. So, can we assume that this will bring the same final sharpness to the PATHCPU renderer?

Yes. Keep in mind that filter radius has also a huge impact on image sharpness so just reduce the radius if you like more sharp images.

Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

### Re: LuxCore: new fast pixel filtering for PATH engine

I did set the filter radius to 1.5, maybe I should set it to 1.0?

pciccone

Posts: 1579
Joined: Wed Jan 13, 2010 11:02 am
Location: South Carolina

### Re: LuxCore: new fast pixel filtering for PATH engine

pciccone wrote:I did set the filter radius to 1.5, maybe I should set it to 1.0?

1.0 sounds a bit too small to me, 2.0 is the default for the default pixel filter so 1.5 should already quite sharp.