DDS Creation with GIMP: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Geep (talk | contribs)
Redo wrap mode, add end notes
Geep (talk | contribs)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
''August 2020 - Page Creation in Progress''
''August 2020, by peter_spy and Geep''
==Introduction==
==Introduction==
Please review [[DDS creation]] for general, tool-independent guidance on DDS creation for TDM.
Please review [[DDS creation]] for general, tool-independent guidance on DDS creation for TDM.
Line 32: Line 32:
*: "Default" (namely "Wrap") is the best choice with tileable textures, since it repeats the texture in a 2D tiled manner.
*: "Default" (namely "Wrap") is the best choice with tileable textures, since it repeats the texture in a 2D tiled manner.
*: "Clamp" just clones the border pixels. It can be useful with textures that won't be tiled, e.g., models unwrapped in 0-1 texture space.
*: "Clamp" just clones the border pixels. It can be useful with textures that won't be tiled, e.g., models unwrapped in 0-1 texture space.
*: "Mirror" flips the texture, which is useful in games that can do automatic flipping during tiling (not TDM).
*: "Mirror" flips the texture, which is useful in games that can do automatic flipping during tiling (not TDM). Also, an alternative to "Clamp" for untiled textures.
*: A reference below links to illustrations of these modes.
*: A reference below links to illustrations of these modes.



Latest revision as of 15:53, 1 September 2020

August 2020, by peter_spy and Geep

Introduction

Please review DDS creation for general, tool-independent guidance on DDS creation for TDM.

GIMP (Gnu Image Manipulation Program) is a popular, no-cost image editor. Originally, a separate plugin was required to open and save DDS images, but since version 2.10.10 in April, 2019, this functionality is available out of the box. You can find the most recent version here.

Readying Your Image

Open your image file (typically TGA) in GIMP. The "Layers" pane on the right hand side should then display just one layer. Its name will be

  • in bold font, if the image is opaque, or
  • in regular font, if it uses an alpha channel.

DDS does not support layers. If you choose to do any image editing that adds additional layers, when done editing, you must

  • merge the layers, if preserving the alpha channel
  • flatten the image otherwise.

Exporting Your Image as a DDS File

From the top menu bar, choose "File > Export As..." or press Ctrl + Shift + E. In the "Export Image" window, use "Browse" to navigate to the proper folder in your DDS directory structure (discussed in DDS creation). In the "Name" field at the top, change the file extension from ".tga" to ".dds". Click "Export" or hit Enter.

In the resulting "DDS Exporter" dialog box, choose from available options:

Compression: Use DXT1 for opaque images and DXT5 for textures with alpha channel.

Mipmaps: Always pick "Generate Mipmaps", to avoid in-game errors.

In the "Mipmap Options" Section:

  • Filter: Scaling filter for mipmaps. The dropdown list is ordered from faster/low-quality to slower/high-quality algorithms. If you're not sure which one to choose, pick the last one. It's recommended to use the best scaling filter available, as it improves the quality of textures rendered further away from the player, without any additional performance cost.
  • Wrap mode: This specifies how beyond-the-boundary pixels are filled in during mipmap level generation. Recommendations:
    "Default" (namely "Wrap") is the best choice with tileable textures, since it repeats the texture in a 2D tiled manner.
    "Clamp" just clones the border pixels. It can be useful with textures that won't be tiled, e.g., models unwrapped in 0-1 texture space.
    "Mirror" flips the texture, which is useful in games that can do automatic flipping during tiling (not TDM). Also, an alternative to "Clamp" for untiled textures.
    A reference below links to illustrations of these modes.
  • All other options are fine as is.

See Also

Deeper Dives into Filter Choices When Mipmapping