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.
[…] particular interest to Flight Simulator X aircraft designers is a terrific article over on the Dave Nunez Blog explaining how to use the Gimp (a free image editor) to create bump maps. As Dave explains: Bump […]
Im having a problem with this, when I click on the tab filters – map my normal map appears desabled, I cant click it.
If u have any ideas of what my problem is, please answer me, I really need this working.
Thanks
Matheus
here is a link of a screenshot
Matheus – not sure what is going on. There is a small chance that the plugin has a bug which only works with the English language of Gimp (3DS Max has this bug). Otherwise, I would suggest you ask for a solution at the Gimp support forum (http://www.gimptalk.com/forum/) – sorry 😦
Hi Dave
Great tutorial. Only one question. The file size of the completed map is 4KB and most maps that I have that were made using CraxyBump and about 1.5. Any thoughts about that> The .bmp size started at 1024×1024
Thanks
DXT supports compression, so chances are that the two programs are using different compression levels, giving you a different file size.
[…] no bumpmaps yet. I would prefer GIMP but will have to work myself through tutorials (like this: https://davenunez.wordpress.com/2008/…-maps-for-fsx/ ) It won't go any easier, wont it? That is just the start. Later, when it come to the finishing […]
Hi there Dave,
I am experiencing problems with my undertanding of your tutorial. Not that I can’t do the things you show here, but…
I have a greyscale layered PSD graphic of my bumps.
I can open in GIMP
I can flatten image
I can open the normalmap filter.
The “Preview” doesn’t appear to work, but I can click OK and get the “coloured” typical bumpmap picture.
Now… save as DDS, check. PROBLEM – the dds does not save as a dds file with an alpha component. Normally the bumpmap texture uses the red channel as the alpha channel and the remaining colour channels for the image part. GIMP doesn’t seem to save the bumpmap into separate texture and alpha.
Have I done something wrong?
The link for the normal map plugin is dead, but it can still be found in the GIMP Plugin Registry, under the name ‘normalmap’.