Archives

Physics-based photorealistic rendering using ray tracing techniques.

This was the final project of a Computer Graphics course I took at school.

It demonstrates the rendering effects of ray tracing techniques.

Left cylinder is solid while the right one is hollow but cones are all solid

ConesAndCylinder

Reflective ground and mirror.

Reflection

A mesh cylinder and a reflective sphere.

Reflection

Except the left ball which is reflective

Refraction

with stochastic sampling of primary rays.

Edge detection

Edge detection

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

Smoother-Edge

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

Smoother-Edge-2

Anti-aliasing was not performed on reflection ray.

Sphere textured with earth surface

Texture-Mapping

Texture mapping without bump mapping

Texture-Mapping-Only

Bump mapping with light cast from left

Bump-Mapping-Left

Bump mapping with light cast from right

Bump-Mapping-Right

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

Phong-Shading

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

Phong-Shading-Detail

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

Phong-Shading-Detail-2

Hard shadows

Hard-Shadows

An area light is actually modeled by multiple point light sources.

Sampling of shadow rays is stochastic.

Soft-Shadows-1

Soft shadows with simulated area light

Soft-Shadows-2

Textures with increasing frequency of Perlin noise.

Perlin-Noise-1

Textures with even higher frequency of Perlin noise.

Perlin-Noise-2

with 8 randomly perturbed reflection rays sampled at each reflection point.

Non-glossy

Glossy005

Glossy01

Glossy05

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

Sky-Sphere

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.

Multi-Threading

Final-Scene