Feature Focus: Normal Mapping
Tags: | |

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:

  1. Uncompressed 32bits–per-pixel images (Halo PC/ CE only).
  2. DXT3 compressed 32bits-per-pixel images.
  3. 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:

  1. Created a height map by hand and then convert it.
  2. 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.

Bloody Sunday

Bloody Sunday (1.7MB)



Submitted by Grim_Reaper24 (not verified) on Wed, 12/27/2006 - 9:21am.

Found the easter egg. Took me about ten seconds to find it, heres a clue... Jason Jones 

Submitted by trepdimeflou (not verified) on Wed, 12/27/2006 - 11:35am.

This is the amazing render we've been waiting for?

Where is the focal point?
It's obvious that an attempt to draw the eye in was made with the camera position, but the extraneous side action ruins any positive effect it might have had.
Where are the detail maps on the bsp?
They are currently on medical leave?
The "glow" on the plasma weapons looks like...?
Photoshop.
Why is that Marine on the left motion blurred?
Is he standing still too fast?
What is wrong with the shaders on the wraith in the far background?
It's purple.
And what are those green and blue dots above the marine in the far left?
If those are supposed to be plasma shots....

---


Veegie: "The render idea is pretty cool. But the flaws in it are pretty dramatic."
Veegie: "I'm sorry if you put a lot of work into it."

Submitted by Talin64 (not verified) on Wed, 12/27/2006 - 2:42pm.

This is the amazing render we've been waiting for?I believe it is shall, we ask nick?



Where is the focal point?
It's obvious that an attempt to draw the eye in was made with the camera position, but the extraneous side action ruins any positive effect it might have had.

I am unsure to what you are referring, I do not believe it was an obvious attempt but more probably an attempt to shock the viewer at all the detail of the scene?


Where are the detail maps on the bsp?
They are currently on medical leave?

I would think the absence of detail maps is to show off the normal maps?


The "glow" on the plasma weapons looks like...?
Photoshop.

I think it is a useful tool, correct me if I am wrong?


Why is that Marine on the left motion blurred?
Is he standing still too fast?

He may  be but he is blurred out so it is hard to tell what you are referring too?


What is wrong with the shaders on the wraith in the far background?

It's purple.

What color should it be?


And what are those green and blue dots above the marine in the far left?
If those are supposed to be plasma shots....

It is possible or small needler shots?

Submitted by Grunt Minor (not verified) on Wed, 12/27/2006 - 9:06pm.

While I think Veegie is a d!ck and I would have normaly been like "hell yeah" I am going to have say that you are an ass in how you adressed the image. 

Submitted by SG (not verified) on Wed, 12/27/2006 - 8:40pm.

The rocket fired by the marine looks really nice. The easter egg was very disturbing.

Submitted by asbo (not verified) on Thu, 12/28/2006 - 9:25am.

Yeah, all I've got on this is the (naked?) guy in the top right window. Someone explain please?

Submitted by Bob Jacobson (not verified) on Sat, 01/20/2007 - 1:37pm.

The Naked DudeIs Probably Just Some Guy That Has A Picture Of You

When You Are Getting Dressed And So Natrally He Put It On The

Internet To Piss You Off!!!!

Submitted by shadowkhas (not verified) on Thu, 12/28/2006 - 3:30pm.

Nice job everyone! Can't wait for Prometheus...!

Submitted by Superfiver (not verified) on Tue, 01/02/2007 - 6:31pm.

I think the render was very nicly done for a few hours of work.