Normal maps using MapZone

From FSDeveloper Wiki
Jump to: navigation, search

MapZone is a free, powerful texture processing tool from Allegorithmic. This tutorial will show you how to setup MapZone to transform all your greyscale heightmaps in ready-to-use FSX-format "bump" maps (.DDS DXT5). For basic info on FSX bump-mapping, refer to Arno's Normal map creation page.

Requirements

All you need is your greyscale heightmap, preferably saved in a lossless format (i.e. 24-bit .BMP), and MapZone 2.5 or higher... Since you don't need any NVIDIA or other plugin, nor the SDK's imagetool to generate the normal map, just save your artwork in it's current state in your favorite photo editing tool in either one of .BMP, .JPG or .PNG formats.

Generating the normal map

Basically, you build up a flowchart by interconnecting image processing nodes, each one transforming it's input before passing the result to the next one. For a quick overview of the tool, take the tour on their website.

Mapzone interface

Install and fire up MapZone. In the library dialog box, select "New\New" and hit Edit (or double-click) to open the editor. The interface has two main areas: top is the graph view (where you place the nodes), bottom is the view frame (displays result of the selected node).

  1. Right-click somewhere in the graph view. Point and select ->"New filter"->"Bitmap import". This will add an entry node where we can load our heightmap.
  2. Fig. 1 - Bitmap Import options
    Select the node by double-clicking (or right-click->"Open (Display)") to display it's options in a bar beneath the graph view. Click on the "Size"-button (256x256) and set to the size of your texture (Fig. 1). Check the "default" box (all the subsequent nodes are created with default size). Click "OK" to confirm.
  3. Now as in step 1., add a ->"New FX-Map"->"FX Filter to FX-Map" node and connect the output from the first node to its input (drag-drop the small triangle).
  4. Right-click the new node and point-select "Connect to new"->"Normal Map". This node generates a "standard" normal map as used by most rendering engines out there. From here on, it's almost all about converting it into the FSX-format "bump" map. You can always rearrange the nodes in the graph view by drag-and-drop. Saving your progress (File->Save As...) is a good idea at this point...
  5. Let's see what we are doing and load our heightmap into MapZone via the "Bitmap Import" node. Click the "Bitmap File"-button (options bar, far left) displaying "[None...]" and browse to your file.
Fig. 2 - Normal Map options
Next, we can tweak the Normal Map-node's options, meaning filter strength and intensity (Fig. 2). These are displayed in the options bar beneath the graph view when the node is selected (so, select it!). Play around a little and watch the effect in the view frame. Depending on the contrast of your heightmap, you will have to adjust the settings to achieve a very subtle effect. You can still scale the effect in the material settings in max/gmax. Alas, finding suitable personal settings is a matter of trial and error, as with the NVIDIA-plugin.

Converting to FSX "bump" map

  1. Fig. 3 - Alpha option settings
    Fig. 4 - Flipping the map vertically
    Fig. 5 - OUTPUT settings
    Next, add a Uniform Color FX Filter in the graph view, right-click it and Connect to new->[Uniform] Mix. When prompted, choose Connect to 'Input [2]' ; that's the lower input. Connect the output of the Normal Map node to 'Input [1]' (the upper input).
  2. Select the Uniform Mix and set it's Blending Mode to Sub. (subtract).
  3. Drag a selection marquee around both the "Uniform" nodes you just inserted, right-click one of them and Clone Selection [keep input links]. Arrange the clones somewhere underneath.
  4. Select the upper Uniform Color node and in the options bar, click the color swatch (default black). Adjust the colour sliders to match (R=0, G=255, B=255, A=63), so as to subtract these channels from the normal map and isolate the red channel in the upper Mix node.
  5. Select the lower Uniform Color node and set the color to (R=255, G=0, B=0, A=255).
  6. Add a New FX-Map->FX Filter to FX-Map node right next to the upper Uniform Mix node and connect the output of the latter to the input of the former.
  7. Right-click the lower Mix node and Connect to new...->Alpha. Join the output of the FX Filter to FX-Map node to the greyscale (top) input of Alpha.
  8. Select Alpha and toggle Combine Alpha to Replace Alpha (Fig. 3). Open the Transforms-dialog box for greyscale input and click Vertical Mirror once (Fig. 4), then confirm OK. Repeat this for Colour input [1] .
  9. Right-click the Alpha node in the graph view and Connect to New->OUTPUT. Choose a name for the output node and confirm.
  10. Right-click the OUTPUT node and Choose the TEXTURE FORMAT. Check Limit mipmap levels and Compress via D3D functions and confirm (Fig. 5).

Save your progress and you are ready to export your FSX bump map. To do so, Right-click the OUTPUT-node and Export bitmap...

That's it for now. Look back here for an update on how to setup the texture library of your FS-project for Mapzone to automatically refresh all DDS-textures.

Related

Internal

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.