Hand Made Normal Map Creation - Tutorial
Edit: Along with other additions i've merged this tutorial with my stick topic.
I decided to do a quick tutorial on how to make your own normal map from scratch in Photoshop, only using the Nvidia normal map filter for "normalizing" our normal map.
Now, as i discussed before, a normal map is a texture/image which records lighting information. Lighting in 3d using per-pixel lighting is calculated using two vectors:
1.) The light source.
2.) The "normal", which is basically a vector accompanying a polygon.
Here, we have two vectors, the normal and the direction of the lighting source. Using these two points we can calculate the angle of the polygon in relation to the lighting source, and as such, the amount of light it should receive. When you model a high polygonal mesh, it looks nicer not only because the silhouette is more defined, but because the mesh itself contains more polygons and so more normals to calculate lighting, and as a result it looks more detailed. This is where normal mapping applies. Normal mapping, unlike the old bump mapping, actually adds normals to a model. So, where before one polygon= one normal, now with a normal map defining the normals, one polygon= theoretically as many normals as there are pixels in the map. In turn, this allows us low poly game modelers the ability to define very detailed lighting on our models, with our need only to have enough polygons (tris) to define the silhouette.
Generally the correct usage of a normal should be then to use it to hold the lighting detail, then to focus on modeling a correct silhouette for the mesh to hide as many signs that it is low poly as possible. What this will do is allow us to then trick the viewer into feeling the mesh they’re viewing is in fact high polygon. If they see the appropriate lighting detail that one would expect of a high polygon model, they will not question whether it is one or not, it is only the silhouette that then may give away the models true polygon count.
A few ways to generate a normal map:
1.) Image generated – type 1 – Here an artist may paint the normal map by hand as a grayscale heightmap. White representing the highest extrusion possible, black representing the lowest point of extrusion. Here various levels of gray then represent various levels of height. This map is then passed through a normal map filter, where this information is used to calculate lighting detail based on the raw extrusion information from the grayscale map. The most common image generated normal mapping applications are, Crazybump, and the Nvidia Photoshop normal mapping filter. Both have their uses, but I’d recommend Crazybump for most instances.
2.) Image generated – type 2 – Here, as we will be exploring later, an artist can hand make a normal map, only using a normal map filter to “normalize” the map.
3.) 3d generated – Here an artist will model a high or low polygon model, in an attempt to then generate a normal map from it, either for an unwrapped mesh or for a tillable texture. Generally speaking, 3d generated normal maps tend to look the best, as they are generated straight from the geometry they’re made to imitate. However, it will be a skill that must be gained by the artist to judge when to take the time to do a 3d generate normal map or simply use an image generated one. It is harmful to one’s workflow to rely too much on either. Sometimes an image generated normal map will look exactly the same as a 3d generated one, other times the difference will be glaringly obvious. To make the best use of your time, choose wisely.
Developing Your Model for Normal Mapping:
As I stated earlier, the silhouette is the key, to be able to effectively trick the viewer you must not allow the silhouette to give it away. A few rules to follow for this:
1.) As you model, rotate the mesh to view it from different angles, here you’ll want to look for any “chunkiness” or sharp edges/points that do not define the models true shape. Unless you poly budget is extremely tight, consider adding a cut or two to help smooth out the area. Remember, in this day and age of per-pixel lighting and shaders, Fill-Rate is a bigger performance enemy than a few extra polygons. Generally you can add a few extra polygons and get no decrease in rendering rate (within reason of course).
2.) Add trimming to almost everything! If your normal map is doing an excellent job of faking depth in your brick texture, why ruin it for the viewer/player by having that illusion dashed the second they get to the end of the wall and see it becomes harsh and flat. Trimming helps maintain this illusion by having the viewer feel that the brick has not abruptly ended.
Now, on to the point of this tutorial. With all of the methods for creating and using normal maps, it is imperative to truly understand them at a technical level and so be able to edit them at their technical level.
Some background on how a normal map works –
A normal map is composed on 3 color channels, the standard RGB, each of these channels in your standard 24 bit texture is then 8 bits (8x3=24). So, what does an 8 bit image give us? It allows us 256 levels of gray to use, per channel. So, each channel is only a grayscale image made up of 256 levels, but when pulled together they then define a full color image. Here, you have something similar to a heightmap, except instead of extrusion, different values bring forth different intensities of that particular channel color. Full white in a channel will be 100% of that color, black will be 100% absence of that color, and values in between are color intensities in between. This is important to know, because a normal map holds its information inside each channel.
Each color channel has its own purpose to a normal map. From the perspective of facing the normal map, your red channel holds the lighting information of left/right. The green channel holds the lighting information of up/down. And the blue channel holds the direct lighting information, that is, the lighting of the normal map at no angle, hence why a normal map is almost always largely made of blue. Or alternatively you can think of the red channel as holding the horizontal lighting information and the green holding the vertical lighting information.
-------------------------Only a fool claims himself an expert
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement