SMU Guildhall
Home
Individual Work
Team Work
MIT Project
Resume
Contact
  ||  Back to List
Variance Shadow Mapping

In the real world as well as the artificially created one, shadows provide important depth cues to the user. In computer-generated scenes, they add much needed "scene complexity," i.e. realism. However, most shadow methods create so-called "hard" shadows. Real world always has "soft" shadows since no light source is a perfect point light source as in computer graphics. Shadow maps render the scene first to texture from the light’s point of view and then compare it with each pixel to determine whether it is in shadow. However, the scene from the light’s perspective is usually too big for the depth buffer, which produces minification and magnification artifacts. Aliasing—jagged edges on the hard border between lit and shadowed areas, as well as light bleeding, acne, etc.—are other common shadow mapping problems.

Normal shadow maps (stored depth value) cannot be hardware filtered. Variance shadow maps, instead of storing simple depth values, store the depth and depth squared in two (or four) channels on the texture. This allows for hardware filtering of the shadow map, e.g. with a simple Gaussian filter. From the blurred shadow map we compute first and second moments of the saved depth and using Chebyshiev’s (in)equality we determine whether a point in the scene is in shadow or not.

For this project, I implemented simple shadow maps, percentage-closer filtered shadow maps, and finally Variance Shadow Maps. I was also researching summed-area variance shadow maps, however, due to time constraints was unable to finish the implementation.

Download: .zip (source code)

Interpreted Scripting Language

In the fourth term, we were required to design and implement an Interpreted Scripting Language. The language had to support functions, recursion, dynamically and weakly typed variables, and arrays. I implemented a parser, lexical analyzer, abstract syntax tree, compiler, as well as the virtual machine that allows the programs to run. Since I am a big fan of Ruby I designed my language's syntax to be similar to that of Ruby—i.e. no braces and as few parentheses as possible.

Download: .zip (source code)

Patch-Based Terrain Levels of Detail

During my fourth term, I implemented Patch-Based Terrain Levels of Detail. My engine reads in a height-map file (up to 4096x4096 values), converts it into patches, and subdivides these into seven levels of detail based on the intrinsic complexity of the terrain and the camera distance from the patch. The algorithm also compensates for so-called "T-junctions" by selecting one of 16 unique index buffers based on the neighboring patch's LOD. For this to work the rendering engine implements a separate pass after the logic defined LODs for all patches and makes sure the difference between any two LODs is one at most (if it is more, the lower one gets "upgraded"). A fill rate of above 100 million triangles per frame was achieved in release mode with a frame rate of around 80 fps.

Download: (unfortunately the source code is too big for download - contact me if you wish to have it sent on DVD-ROM)

3D Studio Max Exporter and Character Animation

In the third term, I developed an exporter plugin for Autodesk's 3D Studio Max 9. The 3D Studio Max Exporter exports character and animation data into my custom, chunk-based data format, which then can be imported by my engine. The engine is then capable of playing the Character Animation by reading the data and passing it to the GPU where a character animation shader takes care of all bone transformations. The exporter supports up to four bones per vertex, 70 bones, and character textures.

One of the assignments challenges was to produce the lowest file size. My optimizations included using quaternions instead of matrices for bone transformations, storing the quaternions as three floats + one bit, quantizing all non-essential values from floats to shorts, etc. Another assignment in the fifth term improved the exporter and importer by enabling streaming and lossy compression.

Download: (unfortunately the source code is too big for download - contact me if you wish to have it sent on DVD-ROM)

3D API-Agnostic Rendering Engine

Starting in the second term and all the way into the fifth term, I was working on a 3D API-Agnostic Rendering Engine. The idea was to unify OpenGL and Direct3D 9 APIs beneath a single interface. That meant that both APIs had to render the exact same results (system handedness, vertex winding order, etc.). The engine now includes:

  • vector and matrix math library,
  • vertex and index buffer objects,
  • multi-texturing,
  • view frustum culling,
  • billboards,
  • 3DS model loading,
  • BSP level loading, and
  • HLSL and OpenGL Assembly shader support
    • Phong lighting,
    • DOT3 bump mapping, and
    • parallax mapping.

The engine was the basis for all complex assignments such as character animation, terrain rendering, and streaming.

Download: (unfortunately the source code is too big for download - contact me if you wish to have it sent on DVD-ROM)

Physics, Threading

The first three semesters at Guildhall featured a math course that branched heavily into Physics. In that course, we implemented several particle systems, mass-spring-damper systems, cloth, and attempted rigid body dynamics.

In the fifth term, I took a special topics course in Threading. This was probably the hardest programming course I ever took and some of the assignments (lock-free queues, multi-threading profilers, spinlocks, reader-writer locks, deques with dependencies) were extremely advanced.

Download: .zip (source code)

Water3

My first term at The Guildhall required all programmers to develop a 2D engine using Win32 and GDI/GDI+ APIs and then test them by creating a 2D game in them. Since it would be too risky to stake a whole team of artists and level designers on the usefulness of just-developed engines, the programmers were in teams of one. Therefore be warned, most of what follows is programmer art. (Except for the main character that was designed by Isaac Rapport.)

The intergalactic kinetic energy (IKE) has to find its spaceship burrowed deep in the Earth's surface and overcome mostly structural hurdles by manipulating the water state of the puddle it was bound to and thus surviving it the hostile and alien environment of our planet.

Water3 is a side-scrolling game where the main character is H2O. The player can manipulate the water's three states (water, ice, and vapor) at will, which will help her to overcome obstacles in the game. The goal of the game is to survive on (and underneath) the planet's surface and find a way through the dungeons to IKE's spaceship.

However, each change of temperature (and subsequently of the state) drains IKE's energy reserves and the molecular loss suffered during each state modification hurts IKE's health. Using its newfound powers, IKE must now search the surrounding dungeons for its spaceship, for that is the only way to get off this wretched planet. Unfortunately, life isn't easy even for "walking" water and IKE must therefore overcome various structural problems before it can resume its flight home ...

Download: .zip (source code)

Modular Arbitrary Shader System

In order to graduate from the Upper Austria University of Applied Sciences in Hagenberg, each student had to complete a diploma project, write his/her diploma thesis about it and then present (actually defend) it in front of a jury, which would ask additional questions relevant to the student's two year education. Since the possibility of writing one's thesis in English existed, I decided to do so to make my thesis understood worldwide.

I described the development of The Modular Arbitrary Shader System, or short MASS. It was first conceived of at the Austrian game development company Sproing where I worked as an intern in the summer of 2006. From the internship project, it turned into my diploma project that was developed in the third and fourth graduate semesters and I managed to finish a first prototype, which I used as the applied part of my master thesis.

The thesis presents a prototypical, proof-of-concept implementation of a shader abstraction system. The system’s implementation enables the connection and combination of arbitrary Cg shader structures and serves as a feasibility study for multiple developed algorithms.

Download: (this website is an archive of my work at the Guildhall - all source code written prior to my coming to the Guildhall can be found here)

Computer Vision

During my studies at the Upper Austrian University of Applied Sciences, I took several courses in Digital Imaging and Computer Vision. I always enjoyed the multitude of interesting algorithms that particular field offered (orientation in space, convex hulls, image recognition, texture analysis, optical flow, etc.) and some of my best projects were done here. Unfortunately, most of the development was done in Java, which ultimately had to yield to my interest in C++.

One of the projects I did was a domino stone recognition application, which could find domino stone in a photograph, find their orientation, size, and position, and count the dots on each of the stone's halves.

Download: (this website is an archive of my work at the Guildhall - all source code written prior to my coming to the Guildhall can be found here)

GL Demo

The second term of my master education at the Upper Austria University of Applied Sciences featured an Advanced Computer Graphics course. In this course we had to develop a graphical application in teams of two using OpenGL that would contain model loading, a shadow algorithm, and a special effect.

My friend Jakob and I decided on a light post in a fountain during simulated sundown and sunrise. I implemented the model loading and math classes as well as the shadow algorithm, while Jakob did the particle effects. Since at that time I understood shadow volumes far better than shadow maps, I integrated them into the application. Unfortunately, I did not have time to study and implement Carmack's reverse (aka z-fail) technique. However, other than that the project was a great success.

Download: (this website is an archive of my work at the Guildhall - all source code written prior to my coming to the Guildhall can be found here)

P3nt3!

During my master program at the Upper Austria University of Applied Sciences, I created a game of Tic Tac Toe where 5-in-a-row wins. The game was played on a 2D grid with either two players locally, two players over the network, or against a computer (or two computers against each other over the network). P3nt3 uses wxWindows as its GUI library, renders everything with OpenGL, and features a very defensive artificial intelligence.

Download: (this website is an archive of my work at the Guildhall - all source code written prior to my coming to the Guildhall can be found here)

Animation and Modelling

I got my first Masters degree in Digital Media from the Upper Austria University of Applied Sciences. During my studies, I did a lot of 3D modeling and animation before I could fill my curriculum with programming and development. Here are some of my "artistic" works: a few short animations and a couple of modeling assignments I had to turn in.

Copyright © 2012 Southern Methodist University. All rights reserved. • Right to Know and Legal • Privacy Policy

For questions or problems with this site contact The Guildhall Webmaster.