Bump mapping is a great way to increase the visual complexity of your model without actually increasing the number of polygons or drawcalls. Most modern graphics cards will apply bump maps to a material almost for free. Actually adding a bump map to your model is quite easy – in Gmax you simply add the map into your material definition, and in FSDS you just need to add a one-line tweak with FSDSxTweak. The problem lies in actually generating a correct bump map (or more correctly, a normal map). The difficulty is that the normal map encodes information about the 3D surface of the material using the red, green and blue channels of the image. For example, this bump map:
Generates this relief texture when viewed in 3D:
As you can imagine, getting those subtle shades of purple right on the normal map is not something that you do by hand. Nvidia provides a free plugin for (not free) Photoshop, but if you don’t have Photoshop or the cash to burn, The Gimp, a free software image editor, can produce some excellent results without digging into your pocket. This post will show you how to set up The Gimp with all the correct plugins, and how to actually generate a bump map that you can use in your FSX models.
Phase One: Installing and configuring The Gimp with the correct plugins
1. Go to the Gimp download page, and download the latest stable version. The plugins we will be using need Gimp version 2.4 or later. Once the download is complete, install it (it uses a regular Windows style installer). VERY IMPORTANT: Make a note of the folder where the Gimp is installed, as we will need to copy the plugin files to this location (the default location is C:\Program Files\GIMP-2.0\). Finally, Run the Gimp to finalize the install and ensure that it is working correctly. Once you are satisfied that all went well, shut down the Gimp.
2. Download the DDS file reading/writing plugin from this site (more information on the plugin from the author’s page). Inside the ZIP archive you will find a file called DDS.exe. Copy this file to <your Gimp location>\lib\gimp\2.0\plug-ins\ (so if you installed the Gimp to the default location, this will be C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins\). Your Gimp can now read and write DDS textures (this is important, because FSX needs all bump maps to be in DDS format).
3. Download the normal map plugin from this site (more information on the plugin from the author’s page). Open the Zip archive – you will see a number of files that need to end up in different places:
- normalmap.exe and glew.dll must be placed in <your Gimp location>\lib\gimp\2.0\plug-ins\
- libgdkglext-win32-1.0-0.dll and libgtkglext-win32-1.0-0.dll must placed in <your Gimp location>\bin\
4. Start up the Gimp – you should not see any error messages. If you do, double check that you copied all the files to their correct destinations.
Phase Two: Creating bump maps with the Gimp
This post does not tell you how to use all the features of the Gimp (only the normal mapping feature). I myself make all my textures with my preferred editor, and only use the Gimp to convert the normal map, so I am not an expert on how to use it. If you want to learn how to use all the features of the gimp, a good place to start is the tutorials available on the Gimp site. Two important things to know: One: The undo key is the same as usual: Control-Z. Two: The Gimp can read multi-layer Photoshop PSD files directly. But be sure to flatten all the layers in the Gimp (In the image window hit these menus: Image->Flatten Image) before you create your normal map as described below (thanks Paco Sanchez for this hint!).
Essentially, a bump map is made by creating a greyscale texture that uses lighter greys for “hills” raised above the surface of the material (e.g. rivets), and darker greys for “valleys” which dip under the surface of the material (e.g. panel lines). For this example, I will use a typical layout of a fuselage panel held in place by rivets. In my favorite texture editor, I create a texture which is mid grey (RGB value 128,128,128), then I mark the panel like in black, and the rivets in white:
At this stage, don’t worry about whether white is for things sticking up or sunk down; you can easily reverse this in the Gimp plugin later if it comes out wrong. I save texture as a BMP (no need to worry about an alpha channel), and then open it in the Gimp. Then I start up the normal map plugin by clicking, on the image window, the following menu items: Filters->Map->Normalmap…
The plugin window will then open, showing all the various options:
Most of these you can leave on default, but you should play with them to get a feeling for what each one does. The most important ones to note are the Invert X and Invert Y check boxes. If the detail you expect to see raised appears sunken and vice versa, toggle both of these to on. The other important control to notice on this window is the 3D Preview button. This opens the preview window which you can use to check that everything is as you expect:
In order to get a good 3D preview like the one above, you need to change the Diffuse color (click on the long bar next to that phrase) to any dark color, and turn on the Specular lighting check box as in the image above. You can rotate the 3D object in the window by dragging it with your mouse to get a good view of your bumps. Close the preview window when you are done.
Once you are happy that everything is OK with your normal map, hit OK in the normal map plugin window and you should see that your texture has now changed to become the normal map. The final step before saving is to flip the image upside down (required by FSX). To do this, click on the image window the following menu items: Tools->Transform Tools->Flip
You will see that the mouse pointer changes into an arrow with a little left-to-right double headed arrow. Hold down the Control key, and the arrow changes to an up-and-down arrow – while holding control, click anywhere in your image, and you should see it flip upside down. Your normal map is ready to use in FSX – all we need to do is save it as a DDS.
To save it, select from the image window File->Save As…
You will then get a long window to set the location and name of the file. Important here is setting the file type to DDS (otherwise FSX will not apply the bump map). In the Save Image window, open up the Select File Type drop down, and select DDS image:
Hit Save, and the DDS file options window opens up:
You can safely leave all the options as they are, and hit OK to save. If you however want to change the DXT compression options, or save mipmaps for the normal map, this window is the place to do it.
And there you go! You now have a good normal map you can use in FSX. Happy bumping.