This is my first shot at a raytracer that uses adaptive sampling on a multi-pixel level. I built this as a proof of concept. The scene uses blurry reflections and an area light source (hence the soft shadows). The one on the right was sampled in 126 seconds, and rendered in 4.9 seconds. The images on the top (blown up to show detail) are both rendered with approx. 1,000,000 samples. The bottom images show the sample distributions for each version. The ones on the left use random sampling, and the ones on the right use adaptive sampling.
Using pure adaptive sampling caused some interesting effects. Some regions were sample hogs, and didn't allow the raytracer to explore other areas that may need further sampling. I had to add a few samples randomly whether the region thought it needed it or not. At first I thought it was a bug with the way I was storing my samples, but it turned out that I needed to make the algorithm more fair. Unfortunately, this added a tuning variable. Too many extra samples, and it would start to look like the image on the left, too few, and it would start looking like the image below:
Right now I use gaussian blending to combine samples. This needs a bit of work because it's still too flat. I was hoping for a smooth transition, but the following image at 1000 samples shows the result:
|