Archives

Ray Tracing Gallery

2017-07-13 | 2 minutes read

Tag: Ray Tracing

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

ConesAndCylinder

Reflection

Reflective ground and mirror.

Reflection

A mesh cylinder and a reflective sphere.

Reflection

Refraction

Except the left ball which is reflective

Refraction

Anti-aliasing

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.

Texture Mapping

Sphere textured with earth surface

Texture-Mapping

Bump 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

Blinn-Phong Model

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

Soft Shadow

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

Perlin Noise

Textures with increasing frequency of Perlin noise.

Perlin-Noise-1

Textures with even higher frequency of Perlin noise.

Perlin-Noise-2

Glossy Reflection

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

Non-glossy Reflection

Non-glossy

Blur index = 0.05

Glossy005

Blur index = 0.1

Glossy01

Blur index = 0.5

Glossy05

Sky Sphere

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

Sky-Sphere

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.

Multi-Threading

Final Scene

Final-Scene