Doric column
David Pittman
HomePersonal ProjectsTeam ProjectsResume
Doric column

3D Rendering Engine

Engine image



Quick facts:
Development time: 6 months
Engine: Original

During my second and third terms at The Guildhall at SMU, I developed an original 3D rendering engine. It runs synonymously in Direct3D and OpenGL.

My engine includes a performance-tested math library with vectors, matrices, quaternions, frustums, parametric lines, and collision tests. Direct3D and OpenGL data classes (vertex buffers, index buffers, and textures) each share an abstract base class so that all higher-level code can be written just once. I developed uniform HLSL and GL assembly shaders for per-pixel diffuse and specular lighting and parallax mapping.

Skeletal animation was an important component of my engine. I first wrote a custom 3ds Max exporter. Among the challenges I faced was the need to reduce Max's multiple index buffers to one. This was accomplished using a hash function to cull redundant data. The exporter also accessed Physique data to output a set of bones and blending weights for each vertex. Loading this data from a custom file format, my engine interpolated the animation (using the quaternion SLERP function). The resulting matrices were sent to the GPU, and the actual transformations were done in the vertex shader for efficiency.

Another piece of my engine was a Quake BSP map loader. I wrote code to load the geometry and textures from the file (applying the Quake palette to the 8-bit indexed textures) and pack the lightmaps into one large texture map. I also implemented a recursive BSP node search which I used in doing collision tests against the world. Finally, I utilized the precomputed visibility set to cull unseen BSP nodes and improve rendering performance.



Engine image Engine image
Engine image Engine image Engine image