Tuesday, January 12, 2010

Beginner's Guide to SF4 Normal Map Editing

Street Fighter 4 uses relatively simple, low-poly models but adds detail using a special kind of image file known as a bump map or normal map. This normal map is rendered as small variations in depth of the model, either raised or recessed into/out of the overall model. Editing the normal map attached to a model will make any mods look much more complete.

To get started, download the normal map filter plugin for GIMP from this link. To install it, place the normalmap.exe file into your Program Files > GIMP-2.0 > lib > gimp > 2.0 > plug-ins directory. You will also need to install GIMP's DDS plugin (available here) if you haven't already done so.

Next, download Piecemontee's Asset Explorer from this link. You may have to install DirectX 9.0c (available from Microsoft) to get it to display properly.

Now, open the Asset Explorer and open both the *.cos.emz file you want to edit (notice the black and white lines representing raised/lowered areas; this is the normal map):
and the *.col.emz file for the color/mod you'll be using:
Next, navigate within the cos file until you find one or more DDS files. When you select one, it should look weird and purple. This is your normal map, which will correspond to the DDS files within the col file. Export it and name it something descriptive, such as 'chest normal map.dds' that you can use to identify it later:
Do the same thing with your col file so that you have a pair of DDS files, which will open in GIMP. First off, we should notice that the normal map DDS is higher resolution than the color DDS:
We need to change that, so we'll scale up the color DDS to match the resolution of the normal map DDS:
>
Next, if your color file is a little grainy, that will show up as texture, which we may or may not want (depends on the mod, really). To get rid of this grain, we'll use a Gaussian Blur filter:
>
Now, we're ready to create the normal map, so go into your filters menu and select Map > Normal Map:
At default, the normal map filter's scale is way too low, so we want to crank it up. I usually put it around 15, but this might be too much for some mods:
You'll just have to play around with it, checking your results in the 3D preview window, until you find a setting you like:
Once you're satisfied with the results, click OK to apply the filter:
Now, save your file using the same DDS characteristics as the unmodified normal map:
Go back into the Asset Explorer, navigate to the old normal map DDS file, and replace it with your newly created one:
Now, your model file should refresh and reflect your new normal map (notice the sunburst pattern on her stomach that wasn't there with the standard normal map):
Just follow these steps with each of the DDS files and normal maps and you should be all set.