DDS Creation with GIMP: Difference between revisions
Creation |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
''August 2020 | ''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. | ||
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 this functionality is available out of the box. You can find the most recent version [https://www.gimp.org/ here]. | 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 [https://www.gimp.org/ 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. | 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. | 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. | ||
Line 21: | Line 29: | ||
* 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. | * 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: | * 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. | * All other options are fine as is. | ||
== See Also == | == See Also == | ||
* [[ | * For a user-written exploration of GIMP DDS plug-in options (circa 2018 and not specific to TDM), see this [https://www.gimp-forum.net/Thread-How-To-Use-The-Gimp-DDS-Plugin GIMP-Forum post] and its [https://www.gimp-forum.net/attachment.php?aid=2871 download]. | ||
* For helpful pictorial images of the Wrap, Clamp, and Mirror options, contained in a lengthy technical tutorial, see [https://www.3dgep.com/learning-directx-12-4 "3D Game Engine Programming" - DirectX 12 - Part 4, Textures]. | |||
== Deeper Dives into Filter Choices When Mipmapping == | |||
* [https://www.cs.unc.edu/~mueller/GP/mipmap.txt An early, clear text explanation of basic algorithms] | |||
* [https://cgl.ethz.ch/teaching/former/vc_master_06/Downloads/Mipmaps_1.pdf A downloadable slide show] | |||
* For a tutorial with comparison of Box, Lanczos, and Kaiser filters, and thoughtful discussion of Mitchell filter and filter artifacts generally: [http://number-none.com/product/Mipmapping,%20Part%201/index.html Mipmapping Part 1] and [http://number-none.com/product/Mipmapping,%20Part%202/index.html Part 2] | |||
* [https://gitlab.gnome.org/GNOME/gimp/-/tree/master/plug-ins/file-dds Source code for GIMP DDS] may be of interest to graphical algorithm mavens. | |||
[[Category:Tutorial]] | [[Category:Tutorial]] | ||
[[Category:Textures]] | [[Category:Textures]] |
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
- For a user-written exploration of GIMP DDS plug-in options (circa 2018 and not specific to TDM), see this GIMP-Forum post and its download.
- For helpful pictorial images of the Wrap, Clamp, and Mirror options, contained in a lengthy technical tutorial, see "3D Game Engine Programming" - DirectX 12 - Part 4, Textures.
Deeper Dives into Filter Choices When Mipmapping
- An early, clear text explanation of basic algorithms
- A downloadable slide show
- For a tutorial with comparison of Box, Lanczos, and Kaiser filters, and thoughtful discussion of Mitchell filter and filter artifacts generally: Mipmapping Part 1 and Part 2
- Source code for GIMP DDS may be of interest to graphical algorithm mavens.