About low-discrepancy sequence and image filters in ray trac

Practical and theoretical implementation discussion.
Post Reply
shiqiu1105
Posts: 138
Joined: Sun May 27, 2012 4:42 pm

About low-discrepancy sequence and image filters in ray trac

Post by shiqiu1105 » Thu Jul 05, 2012 8:37 am

Hi guys,


I have been reading pbrt and writing my own ray tracer. But I have bumped into a question though.


In pbrt, it implements a low-discrepancy sampler which use the 0-2 sequence to generate high quality samples.

It also states that when low-discrepancy pattern is used, the best image result comes with box filter(or no filter at all).


Does this mean that, if I want to use low-discrepancy samples, then it's not necessary to add any filter to my ray tracer at all?

And pbrt seems to say that the low-discrepancy sampler is the best, so in a filter will not be necessary to get the best image quality.


I also noticed that it's written in pbrt that quasi monte carlo techniques such as low discrepancy sequence cannot be used together with russian roulette?


And, is it really necessary to further shuffle the generated low-discrepancy sequence given that they are already scrambled??

The author of pbrt says it's necessary, other there will be unexpected artifacts. But I have tried otherwise, and the images look just fine for me.


Can someone explain these to me, I am quite confused with all these knowledge.

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: About low-discrepancy sequence and image filters in ray

Post by spectral » Fri Jul 06, 2012 8:34 am

Hi,

First you can use your 0-2 sequence for a lot of 'sampling' purposes... for sampling BRDF, RR, light, pixels etc...

Now, if you sample your pixel, 0-2 sequence allow you to have a good distribution of the samples over one pixel.
It is important to have "in average" the right color of the pixel.

Where the filter will "smooth" your image to avoid aliasing between pixels.
Spectral
OMPF 2 global moderator

shiqiu1105
Posts: 138
Joined: Sun May 27, 2012 4:42 pm

Re: About low-discrepancy sequence and image filters in ray

Post by shiqiu1105 » Sat Jul 07, 2012 4:55 pm

spectral wrote:Hi,

First you can use your 0-2 sequence for a lot of 'sampling' purposes... for sampling BRDF, RR, light, pixels etc...

Now, if you sample your pixel, 0-2 sequence allow you to have a good distribution of the samples over one pixel.
It is important to have "in average" the right color of the pixel.

Where the filter will "smooth" your image to avoid aliasing between pixels.
So, is filter still necessary when using 0-2 sequence to sample pixels?

graphicsMan
Posts: 167
Joined: Mon Nov 28, 2011 7:28 pm

Re: About low-discrepancy sequence and image filters in ray

Post by graphicsMan » Sat Jul 07, 2012 9:33 pm

Not really "necessary". Try it first with a box filter, since it is zero extra implementation. If you need better filtering, you should be able to use the sequence to pull samples from a b-spline filter without too much effort.

ingenious
Posts: 282
Joined: Mon Nov 28, 2011 11:11 pm
Location: London, UK
Contact:

Re: About low-discrepancy sequence and image filters in ray

Post by ingenious » Sat Jul 07, 2012 10:45 pm

I understand the argument that a constant filter introduces the least amount of variance, because the camera rays are usually uniformly sampled through the pixel. But this is visually the worst possible filter, regardless of what sampling is used. I like the view that rendering is the process of sampling and reconstructing a continuous 2D function (in case of a pinhole camera), which is the incoming radiance on the image plane. Producing an image means simply to sample this function on a regular grid. And everybody knows that a piece-wise constant reconstruction of a function, which the box filter effectively does, is the worst possible one. One can also importance sample the image reconstruction filter, there's a paper called "Filter Importance Sampling" by Manfred Ernst that investigates this.
Image Click here. You'll thank me later.

graphicsMan
Posts: 167
Joined: Mon Nov 28, 2011 7:28 pm

Re: About low-discrepancy sequence and image filters in ray

Post by graphicsMan » Sat Jul 07, 2012 10:59 pm

But won't you have to be more careful with your low-discrepancy sequences? Or does Manfred's paper cover LDSs? Seems like you'd need randomized QMC if you want to do importance sampling of filters?

ingenious
Posts: 282
Joined: Mon Nov 28, 2011 11:11 pm
Location: London, UK
Contact:

Re: About low-discrepancy sequence and image filters in ray

Post by ingenious » Sun Jul 08, 2012 8:00 pm

graphicsMan wrote:But won't you have to be more careful with your low-discrepancy sequences? Or does Manfred's paper cover LDSs? Seems like you'd need randomized QMC if you want to do importance sampling of filters?
Manfred's paper explicitly covers LDSs, but why does it matter what sample generator you use? The pixel filter is another multiplicative term in your (possibly high dimensional) integrand which, if not constant, introduces variance, and better be importance sampled. I think it's as simple as that.
Image Click here. You'll thank me later.

Post Reply