Transparencies with GIMP

From FSDeveloper Wiki
Jump to: navigation, search

A short tutorial about editing transparencies in textures with GIMP

GIMP uses layermasks to assign transparency information to layers.

Why use layer masks?

  • It saves you the tedious procedure of manually adding an alpha channel to an image with DXTBMP.
  • Masks are added per layer and are automatically combined upon exporting. This means you can decide just how transparent each (layered) element of your texture is.
  • With the DDS-Plugin [1], you can for example export your texture directly as a FSX compatible DXT5 .dds file for an improved workflow.

The basics

  1. Select transparent parts on texture
  2. Assign the transparent parts to a new layer
  3. "Layer" -> "Mask" -> "Add Layer Mask"
  4. Choose "Selection"
  5. In the window for the layers, right click on the layer with the mask and choose "Show Layer Mask"
  6. Edit the layer's color to control transparency (anything between black (transparent) and white (opaque))
  7. When done, right click the layer in the layer window again and untick "Edit Layer Mask" and "Show Layer Mask"
    • If the transparency gets annoying when editing the texture, tick "Disable Layer Mask" (you can leave the mask disabled; the image will export properly)

You will have to play around with the various settings that the "Add Layer Masks" offers to find an optimal result for your needs.

Before exporting

  1. Enable all layer masks you want to export
  2. Choose the layers you want to export by making them visible or invisible
  3. Next, select "Image" -> "Merge Visible Layers" from the menu bar
  4. Select "Clipped To Image" and tick "Discard Invisible Layers"


  • Bitmap formats
    • Export as 32 bit .bmp files can be done with GIMP's "Save As" function and choosing "32 bits" (R8 G8 B8 A8) in the "Advanced Options" dialogue.
      Getting the resulting bitmap into DXT format still requires the use of Imagetool or DXTBMP 'though.
  • DDS format
    • Before exporting your texture into the .dds format from GIMP, you will have to flip the image vertically.
      This can be done with "Image" -> "Transform" -> "Flip Vertically" or by assigning a key combination to this function ("Edit" -> "Keyboard Shortcuts"; CTRL+ALT+F works)
    • Export with "File" -> "Save As" and select "BC3/DXT5" as compression when asked.

Note: Neither .dds nor .bmp files store any layer information, so it's recommended to undo the layer merging process after exporting (CTRL+Z or CTRL+Y) and save the texture in GIMP's native .xcf or the .psd format for further editing at a later point.