Path tracer with fast SH image-based relighting

Cp717oaXYAAjIl-.jpg

This is an archive of my Twitter posts from last year recording the development of the path tracer I wrote for my Masters project.

Ray tracing a red sphere. OK, it doesn’t look much like a sphere yet, but over the next few days we’ll get there!

ClfQ4_hWQAAJ2rh

Directly visualising normal vectors with “shading normals”.

ClfVT4IWAAAsLg6

Anti-aliasing vs no antialiasing. (AA with 50 samples per pixel and random jittering).

ClomrXkXIAAEOM1ClomsscWEAAPx2f

Amazingly enough, all it takes is a few lines of code to get diffuse global illumination using the sky as the light.

Clo0O5nWgAAqH6v

Diffuse and perfect mirror spheres. 1000 samples per pixel path tracing with full global illumination.

ClpxbrcWMAA2_r6

Adding coloured transparency with Fresnel reflection:

CmNkOQRWIAAAonc

Added depth of field:

CmSgpHAWYAAKxKC

A (gratuitously path-traced) visualisation of the first three bands of spherical harmonics.

CnHdxHNWYAAT9RO

After a whole day of debugging spherical coordinates, my path-tracer now has image-based lighting.

CnRf7tYWEAA3RNk

More playing around with image based lighting – the square light is actually a single pixel of a 4×4 pixel env map.

CnRjGUwXgAE5jOO

Reconstruction of an environment map from spherical harmonics using higher and higher bands of coefficients.

This slideshow requires JavaScript.

Constructing a final render from intermediates renders of an environment map projected into spherical harmonics.

QmOFSoy

Demo video:

Leave a comment