Download (5kb)

Forum at

2nd at Evoke 2006

Made in coop with TBC

Main code and direction: Mentor/TBC & Blueberry
Synth code (kklangzeug): Gargaj & tsw / ümlaüt design
Model, keyframing, scripting: Cheesy/TBC
Music: Puryx

Benitoite is the result of several months of loose experimentation with lighting, mesh compression, shading and texture generation, along with a desire to use as many features of the D3DX library as possible.

The lighting in Benitoite is pre-calculated per-vertex lighting using a photon mapping-like technique. From each light source, a large number of photons are shot out in random directions, and a counter is increased at the vertex hit by each ray. The fast ray/mesh intersection routine in D3DX's PRTEngine is used to trace the rays.

The object mesh is not procedurally generated, as is the case for the geometry in most 4k intros. Rather, it is modelled in the form of a low-polygon mesh, which is compressed using the EdgeBreaker mesh compression technique. This mesh is then subdivided and smoothed to obtain the high-polygon mesh used in then intro. D3DX's various mesh handling functions come in very handy here.

The shader simulates an uneven rock surface by tracing the viewing ray into a 3D texture for each pixel. The glossy crystals embedded into the rock surface use a form of normal mapping where the surface normals are generated from gradient vectors in another 3D texture.

In the process of making the intro, we had developed a specialized, compact language for generating textures and a small interpreter for this language, using the SSE instructions. However, in the end it turned out that with only two textures needed for the intro (rock and crystals), we were much better off coding them directly in x86 assembly, so the nice texture generation code was scrapped completely shortly before the release.


Graphics card with VS & PS 2.0 or better
DirectX 9.0c December 2005 or newer (d3dx9_28.dll)