Work Log by Kevin Beason

Latest personal graphics developments

Multiple Importance Sampling

Fixed lots of bugs in my Ashikhmin & Shirley and Schlick BRDF’s. Schlick anisotropic is still not 100% correct. Added explicit BRDF calculation for both BRDF’s, allowing for light sampling in addition to BRDF importance sampling. This helped a great deal with small light sources like the sun. To incorporate the benefits of both sampling strategies (light and BRDF), I also added Multiple Importance Sampling (MIS) using the one-sample model and balance heuristic as described in section 9.2.4 of Eric Veach’s dissertation. This solves the glossy highlights problem (section 9.3.1).

The MIS is actually incredibly simple to do, once you can compute the BRDF for an arbitrary direction. Choose weights for two sampling strategies (light sampling or brdf sampling). I do .5 and .5. Then select one of the sampling techniques according to its weight. Trace the ray and compute the BRDF. Then divide by the PDF as done for regular importance sampling, but now the PDF is weight1*pdf1+weight2*pdf2 (regardless of technique chosen). Done. Well… actually, it took some refactoring and debugging in lots of places to add MIS everywhere.

I was hung up for a long time because I tried to be cheap and only compute the simplified BRDF/PDF ratio when importance sampling the BRDF. Pointless. Just compute both the BRDF and PDF, since you’ll need both for MIS.

Also added direct lighting computation for emissive spheres.

Times are about 42 minutes with 1024 samples per pixel (spp), on a Q6600 quad core cpu.


5 Comments so far

  1. phresnel June 5th, 2009 1:15 am

    Great results. Keep it coming! And also keep it come with blogging. Personally, it seems I fail with the latter D:

  2. beason June 6th, 2009 9:00 am

    phresnel: not at all, why do you say that?

  3. xiaoshun June 9th, 2009 9:27 am

    well, I’m a little puzzled. When you mentioned “Fixed lots of bugs”, Do you mean bugs of Ashikhmin & Shirley’s BRDF model, or bugs of your implementation of that?

  4. beason June 9th, 2009 11:46 am

    Bugs in my implementation. I updated my post to clarify that. Thanks!

    While we are on the subject… I think there is a “bug” in the Schlick BRDF. Rather, the importance sampling formulas do not match any given PDF perfectly, since I see different results between BRDF importance sampling and light sampling for the anisotropic cases. I was only able to make the isotropic cases match by scaling by ratio (…). I’m not sure though, and I suppose a little integration could determine what the problem is.

  5. phresnel June 12th, 2009 12:18 am

    “phresnel: not at all, why do you say that?”

    That was addressed to my lazy butt, which fails to compose a blog-entry on a regular basis :D

Leave a reply