Physics-based photorealistic rendering using ray tracing techniques.
How I started
This was the final project of a Computer Graphics course I took at school.
It demonstrates the rendering effects of ray tracing techniques.
Cone and Cylinder
Left cylinder is solid while the right one is hollow but cones are all solid

Reflection
Reflective ground and mirror.

A mesh cylinder and a reflective sphere.

Refraction
Except the left ball which is reflective

Anti-aliasing
with stochastic sampling of primary rays.
Edge detection

An edge of a cone rendered without anti-aliasing (left) and one with it (right)

A sphere rendered without anti-aliasing (left) and one with it (right)

Anti-aliasing was not performed on reflection ray.
Texture Mapping
Sphere textured with earth surface

Bump Mapping
Texture mapping without bump mapping

Bump mapping with light cast from left

Bump mapping with light cast from right

Blinn-Phong Model
A piece of DNA modeled by 317099 triangles with 17148 vertices in total, rendered with Phong shading.

Without Phong shading, the (left) image presents rigid rendition of highlight.

With Phong shading, the (right) image presents a smooth rendition of surface

Soft Shadow
Hard shadows

An area light is actually modeled by multiple point light sources.
Sampling of shadow rays is stochastic.

Soft shadows with simulated area light

Perlin Noise
Textures with increasing frequency of Perlin noise.

Textures with even higher frequency of Perlin noise.

Glossy Reflection
with 8 randomly perturbed reflection rays sampled at each reflection point.
Non-glossy Reflection

Blur index = 0.05

Blur index = 0.1

Blur index = 0.5

Sky Sphere
Eh well, it’s actually a big sphere that encloses the scene. No more dark background but constellation on reflective surfaces.

Multi-threading
Some simple performance test were done on my laptop, which has a dual-core CPU that supports 4 logical cores.
It makes sense for its performance to peak at 4 threads (1 thread / logical core). As the number of threads increases, the overhead of context switch simply compromises the power of parallel computing.

Final Scene
