My Precious
by
Jennifer Metzger
Rendering Competition WS 2007/2008
Computer Graphics I

For my scene I chose a winter landscape with lots of snow, because until now we only had so little of it in this winter. The rest shows a bit of my affection for fantasy. The crystal and the floor of the temple I created by myself without help of any tool. The pillars I got from a friend, where the larger ones are modified with the freely available package 'blender'. Additionally to the topics described below, I implemented several transformations for triangles. These are needed mainly for the motion of the crystal in the animation, but they also helped me to site the different objects in the right places. Finally, I introduced a 3D Perlin noise function to animate the 2D clouds in the scene.
Source Code: |
Triangle.hxx, SmoothTriangle.hxx, CloudShader.hxx, Noise.hxx |
Depth of Field

Description:
In real live only a limited range of depth can be focused by human eyes or a camera. That means, simulating a camera with a thin lense
(instead of a pinhole camera) contributes much to the realistic appearence of an image.
For that purpose, I create several rays per pixel, whose origins are randomly distributed on the virtual lens. To do so, the lens is
divided into two circles, a inner and a outer one, where for each part the same number of rays is generated. This separation was
inspired by the construction of the human eye.
Choosing the lens radius, one can control the size of the depth of field, the area which is focused. If the lens is large, the depth of field
is small and only few objects will be in focus and those nearer or farther will be blurred.
My implementation was motivated by the chapter 'Camera Models' in the book 'Principles of Digital Image Synthesis'.
Effect could be perceived:
In the end of the animation, where I increase the radius stepwise, so that at the end only the crystal appears sharp.
Source Code:
Tone Mapping
Description:
When attempting to fully reproduce the world luminance levels on e.g. a computer monitor, the results are usually disappointing. So, the adaptation luminance or light level to which the viewer is accustomed, is almost always different under the real-world and computer display viewing conditions. Tone mapping tries to improve this. The approach I used is described in 'Graphics Gems IV' by Greg Ward. First, the world adaptation luminance is approximated by the logarithmic average of the luminance at each pixel. Then, this value is used to compute the contrast-based scaling factor. This factor scales the color values of each pixel so that most of them can be distinguished.
Effect could be perceived:
During the whole animation overall in the scene. Look at the pictures below, the left is without tone mapping and the right is scaled.
Source Code:
![]() |
![]() |
Procedural Shading
Description:
Procedural shading is a method for creating fine, artful surface details (normally stored in textures), without the need of storing the data and matching it to possibly complex geometries. For example, this technique allows as to simulate many natural materials, like marble, wood, clouds, and so on. I implemented a procedural texture that is similar to marble. The basic idea is to distort a sinus or a cosinus pattern with noise turbulences. For that purpose, I used a improved Perlin noise function, which takes as parameter the intersection point of the ray with the object. As can be seen in the right picture, the marble can be composed of more then two colors, in fact there can be as much as the user likes. For further details see slides by Ken Perlin.
Effect could be perceived:
At the five pillars and the floor of the temple. Other examples could be found below.
Source Code:
![]() |
![]() |
Fractal Geometry
Description:
A procedural construction, that is similar to such for procedural shading, can also be used to create fractal geometries, like mountains.
The only difference is that, instead of interpreting the calculated value as a color, it is interpreted as an altitude.
For the given points p1, p2 and p3, my implementation builds mountains on the plane spanned by the vectors p1-p2 and p1-p3 growing in the
normal direction of this plane. Therefore, the plane is divided into a grid of definable resolution. Each grid point is then evaluated with the
Perlin noise-based method described on page 500 in the book 'Texturing & Modeling: A Procedural Approach'. To dyeing the mountains with their
white peaks and color mixed body, I modified the Phong shader a bit.
Effect could be perceived:
Look at the beautiful mountains in the background of my scene.
Source Code:
FractalMountains.hxx, MountPhongShader.hxx
Double Refraction Rendering in Crystals
Description:
Crystals can exhibit a number of interesting optical properties, such as double refraction, optical rotation or polarisation effects.
The effects a crystal shows depends on its crystal structure.
A diamond, for example, has a cubic structure and thus belongs to the isotropic materials. One can use Snell's law to determine the
propagation angle for the single refracted ray which occurs in such materials. The intensities of the reflected and transmitted ray
are given by the coefficients derived from Fresnel's equation. These calculations are realized in the diamond shader.
In Crystals with trigonal, tetragonal or hexagonal structures, like quartz, the refracted part of any incident light wave is splitted
into two rays. The first one, the so-called ordinary ray, obeys Snell's law and propagates in the same direction as if the material was
isotropic. The calculation for the second, the extraordinary ray, are slightly more difficult, because its refractive index depends on
the incident angle. Also the computations of the reflection and refraction Fresnel coefficients have to be modified. The formulas for
rendering this birefringency can be found in the paper 'Realistic Rendering of Birefringency in Uniaxial Crystals'. My implementation
of those can be found in the crystal shader.
Effect could be perceived:
Surprise, surprise, on the crystal. In addition, look at the right image in this section. Here, I placed a single marble plane behind the crystal, so that the refraction can be better observed.
Source Code:
CrystalShader.hxx, DiamondShader.hxx
![]() |
![]() |