Rendering Competition WS07/08

Around the Eiffeltour

by Achim Schwender


Animation | Depth of Field | Procedural Shader | Fractal Geometry | SAH KD-Tree

 

Around the Eiffeltour

Click on the image to download the animation.
back to top

Depth of Field

A camera with a thin lens and an aperture is simulated. Everything which is not in the focus of the camera gets blurred. The intensity of the blurring is determined by the size of the aperture. A larger aperturesize means a more intense blurring.
To achieve this effect, not only one primary ray is traced per pixel, but several rays which are randomly distributed on a disc and which all meet at the focus. To determine the actual color of a pixel the average over the results of all rays is computed.

This effect is visible in almost every frame of the animation.


DepthCamera.hxx

back to top

Procedural Shader

The Procedural Shader generates realistic looking textures for natural materials like granite or marble. This is achieved by the use of fractal noise and turbulence functions. The implementation uses a 3d version of perlin noise.
More information about perlin noise can be found here .

Both the teapot and the dragon are rendered with a marble like texture which is generated by the Procedural Shader.

ThreeDPerlinShader.hxx

back to top

Fractal Geometry

The mountains in the background of the animation are an example for fractal geometry. The computation begins with a rectangular base area. A pseudo random height is assigned to the centerpoint CP of this rectangle. Then the rectangle is subdivided into 4 smaller rectangles, each with CP as a corner. This procedure is repeated several times. Then triangles are build using the just computed points as vertices. Finally the vertex normals are computed by summation over all the triangle normals that belong to a certain vertex.

FractalGeometry.hxx

back to top

SAH KD-Tree

To speed up the rendering process a KD-Tree with a Surface Area Heuristic (SAH) is used.
This is done as described in the paper by Ingo Wald and Vlastimil Havran: "On building fast kd-Trees for Ray Tracing and on doing that in O(N log N)" .

Here a small benchmark to show to performance increase:
median splitting KD-Tree SAH KD-Tree speedup factor
frame00200 7min 10sec 4min 30sec 1.6

The Computer used for this test was a Pentium-M @ 1500Mhz.

KDTree.hxx KDTree.cxx

back to top