Thursday, August 16, 2012

To infinity and beyond

I finally got around to implementing image based Infinite Area Lights, which also meant introducing the concept of a world space. It's a relatively naive implementation, but does the job as a first version: Reads a latlong exr from disk, computes a pdf table and works like any other importance sampled light source, but with the added benefit of the visual complexity of an environment map.

The obligatory bunnies, various number of pixel samples (I just let each of them run for a couple of minutes on my old laptop), single infinite area light source:





And just for fun, I let this one run over night: 

360k polys, 2k samples per pixel, grey diffuse shader on everything. Model (courtesy of www.cgtalk.com lighting challenges) is water tight, and the only lightsource is a huge area light outside of the windows, with a boatload of light bounces.

The noisiness even at 2k samples shows I need to decide on what to implement to help indirect-based scenes like this. The next logical step is a bi directional path tracer, which helps in a lot of indirectly lit cases, but for a scene like this one I believe I'd also need metropolis sampling in order to see real improvements, since so many of the light samples would end up just hitting the wall outside without anything to guide them through the window. There's also some aliasing around the window frames due to the massively intense light source, which comes from the fact that I have a pretty naive pixel filter at the moment (box 1x1).

Other than stress testing the image importance sampling I think the final thing on the feature list before diving back in to clean up some code and working on efficiency is shading normals.

-Espen

No comments:

Post a Comment