Normal map creation
One of the new features that can be used on our 3D models in FSX is the bump map. This article will describe how to create the normal map texture that you can use on your model.
Bump mapping is a technique that makes a surface look uneven. For example a brick wall consisting of only one polygon, could look like it has been made of individual stones. If you would model that all in 3D it would require a lot more polygons. What the normal map does is adjust the local normal based on the value stored in the normal map, so instead of having the same normal for the entire polygon, now each pixel can have a different normal. That results in the uneven look.
Contents
Requirements
To follow the rest of this tutorial you need to make sure you have the following tools at hand:
- GMax or 3DSMax with the FSX gamepack installed
- A photo editing tool like Photoshop, Paintshop Pro or GIMP
- A normal map plugin (see the links section for links to get them)
Creating a grayscale height map
The normal map plugin that we will be using to create the normal map, needs a grayscale height map as input. You can see this as a texture where the different shades of gray give information about the height of that pixel. It sort of gives a relief of your diffuse texture.
Simply turning your diffuse texture into grayscale does not give the best result. On the other hand creating the height map by hand is also a lot of work and requires quite some artistic skills. But fortunately there are some tricks to get your started.
One of the best ways to create a grayscale height map I found is to make use of the filters in your painting program that allow to make a photocopy or charcoal version of your texture. If you play around a bit with the settings of such a plugin, you will see that you can generate a quite convincing height map. For the final details you will probably have to edit the texture, but it should give you a good starting point.
Creating a normal map
The next step is to use the normal map plugin for your painting program to turn the grayscale height map into a normal map. What this does is turn your grayscale relief into a format where the information is stored in the red, green, blue and alpha channels of the image, so that the graphics card can process the information quicker.
The normal map plugin has a lot of options and feel free to play around with them. The most powerful is probably the scale setting. In the FSX material section of the SDK you also find some examples of what different bump scales can do.
Once you are happy with the settings, generate the normal map. It could look like the example shown on the right, although I exaggerated the scale a bit in this case to make things more clear for the tutorial.
Saving in FSX format
Because of the way the shaders have been written for FSX you can not use the normal map you just created directly. You will have to do some modifications to it. Failing to do so will result in a unrealistic view of your model.
Here are the steps you need to take:
- Copy the content of the red channel to the alpha channel
- Make the red channel black
- Invert the green channel
- Make the blue channel white
The image on the right shows the resulting normal map for FSX.
After that save your normal map as DXT5 texture. Due to the different compressions in the DXT format, DXT5 is strongly preferred over DXT3 for your normal maps. You can do this with the ImageTool tool that comes with the SDK.
Assigning to your model
Now that you have your normal map texture file that you can use in FSX, we are almost done. The final step is to assign the normal map to your 3D model so that it will actually be used. For this you need to make sure you use a FlightSimX material on your object.
Using Gmax, all you have to do for this is assign the texture you just created to the Bump slot of your material. See the image to the right for an example. As you can see I prefer to use the PSD version of the texture in GMax.
Using FSDS, you need to install FSDSxTweak, and then assign the bump map (which must be a DDS file) using a material tweak (see this tutorial).
After this export your model to MDL as before. The next time you load your aircraft or scenery you should see that it has a bump map now.
The result
So what did we do all this extra effort for? The two images below show the difference between a model without and with a normal map applied. In this case the normal map scale has been put a bit higher than normally desired to make the effect stronger, but I hope you can see the benefit of using normal maps in some cases.
Related
Internal
Texture - Related | |
---|---|
Quick links to related topics - Transclusion-Texture-Oneline | |
General | Night · Perspective - Correcting (GIMP) · Seasonal textures · Taxilines with Gmax · Reflection and scenery · Bump Maps · Disappearing textures |
Transparency | Problem solving · PhotoShop |
Performance | Optimising for performance · DrawCallMonitor · Texture - Missing (FSX) |
File Formats | Formats (Overview) · DXT Compression · Texture.cfg (FSX) |
SDK - FSX | Modeling SDK (FSX) · Panels and Gauges SDK (FSX) · SimObject Container SDK (FSX) |
SDK | SDK Toolset (FS9) · SDK Toolset (FS8) |
Click the links to access the topic pages, (Default - Opens in same window). |
External
- Direct3D - Exposes the advanced graphics capabilities of 3D graphics hardware, including z-buffering, anti-aliasing, alpha blending, mipmapping, atmospheric effects, and perspective-correct texture mapping.
- Bump Mapping - A technique to add details to shading without using more polygons.
- Normal Mapping - An enhancement of bump mapping.
- DirectDraw Surface - Wikipedia (aka .dds) - A file format used for storing textures and cubic environment maps, both compressed and uncompressed.
- DirectDraw Surface - MSDN (aka .dds) - A file format used for storing textures and cubic environment maps, both compressed and uncompressed.
- 3Dc - A lossy data compression algorithm for normal maps invented and first implemented by ATI. It builds upon the earlier DXT5 algorithm and is an open standard. 3Dc is now implemented by both ATI and NVIDIA.
- Nvidia normal map plugin
- GIMP normal map plugin
- Using The Gimp to create bump maps for FSX (tutorial)
- Creating and using normal maps - a tutorial
- Normal map photography - a cool idea on how to create a normal map