A curious incident of a ray in the night-time

by Yong Son

features i have implemented:


figure 1 (antialiasing off, beers law on)

figure 2 (antialiasing on, beers law off)


For antialiasing i decided to take a uniform sampling on 4 points and then average them. However, this did not result in the grass texture looking smooth enough. So then i added a small amount of jitter to the ray and took 4 more sample points that way. The result was 8 sample points, 4 uniform and 4 random being averaged out to make smooth lines.

beer's law

So this is an effect who's omission bothered me in the previous assignment. Why would light travel throughout a medium without loosing power? It doesn't. So i tracked the distance that the ray was passed through the medium and saturated colors according to the distance and the medium saturation values.

hair texture

So i decided early on that i wanted to have weird textures in my scene so i decided to implement a hair-like texture. I first attempted this by creating triangle geometries on the object according to the normal plane. This resulted in objects that looked fuzzy:

This isn't quite the effect i wanted because i wanted the hair to "swing" naturally. so i sampled random UV coordinates and mapped them to the object i wanted to render. The tip of the hair would be influenced by these UV coordinates. The anti-aliasing effect shown above was done as a result of these hair-like projections being so thin.


depth of focus

one rendering technique that i ended up not using for the final scene was depth of focus.

This was because that the scene itself just didn't have that much depth and blurring 1 object would result in an unwanted blur in the other objects.

Film grain

I added a filter across the rendered image to give an extra film grain texture to the scene using perlin noise.


Here is a cool scene i rendered along the way with no computational merit.

this was a result from the phong highlight being way too large.