pouët.net

AO and blue noise

category: general [glöplog]
 
Working in my AO-raytracer right now.

I started with true montecarlo sampling for the AO rays. It took too many samples to converge this way.

So, I've tested a jitter algorithm and the convergence is much better now.

Do you know if there is any big difference by using Poisson disc instead?

And, do you know any easy way to evaluate the noiseness on my results, so I can compare methods?

Thanks
added on the 2009-05-29 11:58:21 by texel texel
Quote:
And, do you know any easy way to evaluate the noiseness on my results, so I can compare methods?

Which ever looks the best to your eyes? :)
You can check something like the average difference in the values. Higher noise will make higher differences.
added on the 2009-05-29 13:10:52 by xernobyl xernobyl
random pt: eyes are a way, but, when two methods looks so similar, eye is not enough.

I'm trying the average differences now, with a reference image rendered in high quality for an hour... it should be enough.
added on the 2009-05-29 13:13:05 by texel texel
You may already know, but.
added on the 2009-05-29 14:37:41 by raer raer
texel, if you can't decide just post two screenies and let us vote :-)
added on the 2009-05-29 15:58:53 by torus torus
Quote:
And, do you know any easy way to evaluate the noiseness on my results, so I can compare methods?

If you have several samples per pixel, you can calculate the variance together with the color. The lower the variance, the less noisy.
added on the 2009-05-29 16:10:01 by ryg ryg
Thanks so much. Second question is answered now.

Now, where is iq to tell me about the poisson disk - or any other blue noise method?
added on the 2009-05-29 16:13:34 by texel texel
Poisson distributed samples are effectively just a fancier way of stratifying results. The biggest gain is in doing it at all - yes, better sampling patterns will give slightly better results, but you'll hit diminishing returns very soon.

The best way to get better results is by including importance sampling.
added on the 2009-05-29 16:51:41 by ryg ryg
But ryg, how do you suggest to do it?

added on the 2009-05-29 19:40:19 by texel texel
calculate the average, calculate the sum of (pixel - average)² for all pixels.

http://en.wikipedia.org/wiki/Variance
I think he means importance sampling...
added on the 2009-05-29 19:48:25 by raer raer
Graga fail.
added on the 2009-05-29 19:49:13 by xernobyl xernobyl
well, all you need for good importance sampling is to have a rough guess of where the geometry is.

pack each object (triangle, ...) into a bounding sphere or box. per object, determine the N closest other objects (by bounding volume, N is small). that gives you a pretty good idea what your primary occluders are going to be. per point you want to evaluate AO for, calculate the distance to those BVs, and the approximate projected solid angle of that BV. use a function that smoothly falls off based on the dot product between the current sampling direction and (bv_center-sample_point). should be a pretty good density estimate.

alternatively, just do a coarse pre-pass with few samples (but including bent normals), average things over a large area, then use that do drive importance sampling for a more accurate pass.
added on the 2009-05-29 20:39:54 by ryg ryg
no guarantees on these ideas, btw. i'm pretty certain they should work or i wouldn't have suggested them, but i haven't tried them myself.
added on the 2009-05-29 20:44:17 by ryg ryg
alternatively instead of placing the geometry and solving for "where does the ray hit the geometry" kind of a problem, you can approach it the way I (and iq) prefer: Say that "here is a geometry, the ray will hit this point". That way you can already know the hits for the primary rays and thus the primary occluders. So, making use of distance fields (yes even in raytracing) might be very possible.

Also I'd like to rip this beautiful statement:
Quote:
no guarantees on these ideas, btw. i'm pretty certain they should work or i wouldn't have suggested them, but i haven't tried them myself.
added on the 2009-05-29 21:04:43 by decipher decipher
oh and yeah, the way I suggested would bear a little more error and a way moronic approach to actually getting things done, but hey it might still work :)
added on the 2009-05-29 21:05:29 by decipher decipher
also, use cosine-distributed samples and remove the <normal,ray> term. But I think you are doing that already if I remember well.
added on the 2009-06-01 22:25:44 by iq iq
for the samples, also, a 2d sobol sequence works fine
added on the 2009-06-01 22:29:51 by iq iq

login