Project 11

Global Illumination

Ray Traced View

Ray tracer MK11. Indirect lighting ftw

Last week we discussed how only sampling incoming light was a terrible approximation of what we really see. In reality, anything that light touches can in turn become a light source. Unfortunately, light sources of light sources of light sources of light sources ... is impossible to compute.However, by weighting the total initial indirect light samples on the first bounce heaviest, and all subsequent samples lightly (1 sample), we can make things look a whole lot better.

The render above accounts for indirect lighting, at 512SPP and 100 indirect samples per ray. Time to complete: 03:32:46 (On i7 7500U)

Note: using gamma correction

Sample Buffer View

Somewhat interesting, the sample buffer here shows how global illumination is somewhat noisy, but mostly uniform when objects are purely diffuse. We can take advantage of this uniformity using irradiance caching. (Todo: implement irradiance caching...)

Example with caustics

To make caustics pop out a bit more, I implemented an r^2 falloff on my point light illumination. To compensate for the darkly lit scene, I bumped the intensity of the main point light up from .5 to 80.

Time to render: 04:13:26 (on i7 7700K)

Note: using gamma correction

GI Teapot

This is one of the provided scenes, which I used a lot to debug my GI implementation. I'm actually pretty happy with how it turned out. Might use it as a wallpaper somewhere.

Time: 0:08:24 (i7 7500U)

Note: using gamma correction

GI Teapot

I noticed if I only do one bounce, I get square tiles where the quads on the teapot are.

At first I thought my normals weren't interpolating correctly, but they are.

Then I thought the bug might be from how I'm generating samples on a hemisphere. I switched to cosine weighted samples. No luck.

Then I noticed that many students last year and the year before that has the same bug to some extent. Not sure what's going on.