Tags: Feature Focus | Xbox | Halo 2
And a ho, ho, ho to you, too.
This is the first article in the "Feature Focus" series - a collection of articles that will highlight various Prometheus features or HaloDev research - and what better day to start it than Christmas day? Well, alright, better days did exist ... like a day or two a few months ago when this new site was first opened up, but that's not the point. This is not a Prometheus progress update - that series of articles is quite separate - but we will hopefully be bringing you one of those soon as well.
The contents of this post were actually researched, finalized, and the corresponding scene created about 6 months ago. We did intend to roll the information into an update when we had Halo 2 rendering perfected in Prometheus, but we've decided to get some content up on the site for the holiday season. With that said, the rest of this article is by Talin, who has since moved on to pursue some personal projects on his own.
Normal Mapping in Halo
Introduction
As some of you may not be familiar with the concept of normal mapping, so a quick introduction is in order. Typically, artists want to create beautiful, high-poly models that look very realistic and use them in-game. However, if artist had their way, games would run at a few frames per second. In order to save space and to keep the graphics engine from having to render extremely high-poly models, a technique known as bump mapping was developed. The technique involves creating a low-poly model and wrapping it with a texture that gives it the appearance of a high-poly model.
Height Mapping vs. Normal Mapping
Traditional bump mapping (height mapping) uses a texture that stores a height field to gives the distance from the low poly model and the high poly model. Normal mapping is slightly more complicated spin on height mapping. Instead of using a height map, a 24bits-per–pixel (8bits for x, 8bits for y, and 8bits for z) format is used. This creates a vector that is normal to the high-poly model.
Normal vector lengths are always equal to 1 and the z-vector is always positive. The z-vector is always positive because the vector is defined in Tangent Space. Tangent Space is the space directly tangent to the low-poly triangle. The vector must always point outwards from triangle. In fact, in the Halo palette, the z values for all the predefined vectors range from 0.68 to 1.00. One might wonder why they didn’t use a more evenly distributed palette.
How Bungie Uses Normal Mapping
Bungie stores normal maps in three ways:
- Uncompressed 32bits–per-pixel images (Halo PC/ CE only).
- DXT3 compressed 32bits-per-pixel images.
- Palettized 8bits-per-pixel images (Halo 1 / 2 Xbox only).
The first two formats are fairly self-explanatory, so let’s look a bit more into the last format. Palettized 8bit textures, also called P8 for short, are textures in which, instead of storing the actual normal per–pixel, they store a byte that gives an index from 0 to 255 to a predefined palette of normals. As an example, a 256x256 P8 texture may give an 8bit value of 0 at 0,0 but that 0 value actually corresponds to 127, 127, 256 in the predefined palette which, when converted to floats, is the normal 0,0,1.
Normal Map Creation
There are two ways to create a normal map:
- Created a height map by hand and then convert it.
- Build a high-poly model and a low-poly model, then use an application to calculate the normal.
Bungie creates height maps in the first way, by hand. Bungie’s unique development process kicks in as soon as an artist edits a height map and saves the changes. A script will convert it to a normal map, sync it to an Xbox Development Kit, and within 5-10 seconds, you will see the edited the normal map in-game. This process holds true for most textures.
This process gives Bungie’s artist a lot of freedom to really polish their models. I am sure it is a constant headache to keep all this up and running for Mat Noguchi.
Normal Map Creation Tool vs. nVidia’s Normal Map plug-in
Since normal maps are vectors, they are very difficult to modify; to edit them, they must be converted to height maps. Veegie tested both Tool and nVidia’s normal map plug-in to convert height maps to normal maps. Can you tell the difference?
Bloody Sunday
Talin's research was put to use in a scene designed by Nick and executed by Veegie. The models and textures were extracted from Halo 2, and thus are wholly Bungie's property; many models were modified, custom rigged, and individually posted while many texture variants in the form of custom specular, illumination, and opacity maps were created.
The scene took about 35 hours of work and was much improved by the use of real, in-game normal maps. There is an easter egg for those who are interested in hunting down such things.
Click the image for a much larger version of the image.
Submitted by Nick on Mon, 12/25/2006 - 6:32pm.
Found the easter egg. Took me about ten seconds to find it, heres a clue... Jason Jones