Skip to content

Commit c7d78bc

Browse files
Tools: Gigapixel update + PNGtoDDSTextureScripts
Added separate page for 'PNGtoDDSTextureScripts'
1 parent 9795711 commit c7d78bc

File tree

3 files changed

+77
-6
lines changed

3 files changed

+77
-6
lines changed

mmw-content/guides/textures/gigapixel-texture-upscale-tutorial.md

+16-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ description:
2727
> | Type | Name |
2828
> | --- | --- |
2929
> | **Difficulty** | #advanced |
30-
> | **Requirements** | - [[gigapixel\|Gigapixel]]<br>- [Python](https://www.python.org/downloads/)<br>- A bulk file renaming utility (recommended)<br> - [XnConvert](https://www.xnview.com/en/xnconvert/)<br>- [[normalmap-generator\|NormalmapGenerator]] (optional)<br>- [[nvidia-texture-tools\|NVIDIA Texture Tools 3]] |
30+
> | **Requirements** | - [[gigapixel\|Gigapixel]]<br>- [Python](https://www.python.org/downloads/)<br>- [Pillow (PIL fork)](https://pillow.readthedocs.io/en/stable/)<br>- [PNGtoDDSTextureScripts](https://github.com/staticnation/PNGtoDDSTextureScripts)<br>- A bulk file renaming utility (recommended)<br> - [XnConvert](https://www.xnview.com/en/xnconvert/)<br>- [[normalmap-generator\|NormalmapGenerator]] (optional)<br>- [[nvidia-texture-tools\|NVIDIA Texture Tools 3]] |
3131
> | **Tutorial Files** | Any vanilla Morrowind textures will do |
3232
>
3333
> %% embed download link to tutorial files if applicable %%
@@ -38,26 +38,36 @@ This step-by-step tutorial describes a workflow for upscaling textures with AI,
3838

3939
By the end of this tutorial, you should be able to:
4040

41-
1. Convert textures in bulk from TGM/DDS format to PNG, ready to be upscaled.
41+
1. Convert textures in bulk from TGA/DDS format to PNG, ready to be upscaled.
4242
2. Upscale textures using Gigapixel 7
4343
3. Optionally generate normal maps and specular maps using [[normalmap-generator|NormalmapGenerator]].
4444
4. Convert the upscaled textures back to the appropriate DDS format using [[nvidia-texture-tools|NVIDIA Texture Tools 3]] via Python batch scripts
4545

4646
### Prerequisites
4747

48+
The tools outlined here are required in order to follow this tutorial. Several of these have equivalent tools which could be used instead by experienced users. However, this tutorial will assume the user is using the tools described below.
49+
4850
#### Gigapixel 7
4951

5052
Gigapixel 7 (personal) is required. Theoretically the trial version will suffice, but any output textures processed by it will have a watermark applied to them. Gigapixel Pro will also work, but it is more than is necessary.
5153

5254
#### XnConvert
5355

54-
[XnConvert](https://www.xnview.com/en/xnconvert/) will be used to convert the original textures from DDS or TGM into DDS format in bulk. Equivalent batch image converters can be used instead, but the tutorial will assume usage of XnConvert.
56+
[XnConvert](https://www.xnview.com/en/xnconvert/) will be used to convert the original textures from DDS or TGA into DDS format in bulk. Equivalent batch image converters can be used instead. If only working on a handful of textures, even [[gimp|Gimp]] or [[photoshop|Photoshop]] will suffice, but these are not suitable for batch processing large amounts of images.
57+
58+
#### NVIDIA Texture Tools 3
59+
60+
[[nvidia-texture-tools|NTT3]] is used for converting the Gigapixel-upscaled textures to the appropriate DDS format. NTT3 must be used, as opposed to [[nvidia-texture-tools|NVIDIA Texture Tools]], because PNGtoDDSTextureScripts utilizes NTT3's API.
61+
62+
#### Python + PIL
63+
64+
[Python](https://www.python.org/downloads/) is required in order to run the PNGtoDDSTextureScripts used for processing the textures through NTT3.
5565

56-
#### Python
66+
In addition, the scripts utilize [PIL](https://pillow.readthedocs.io/en/stable/), which can be installed via [pip](https://pypi.org/project/pip/).
5767

58-
This is required in order to run BAT files used for processing the textures through NTT3.
68+
#### PNGtoDDSTextureScripts
5969

60-
####
70+
[[pngtodds-texture-scripts|PNGtoDDSTextureScripts]]
6171

6272
---
6373

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: PNGtoDDSTextureScripts
3+
aliases:
4+
- PNGtoDDSTextureScripts
5+
tags:
6+
- Python
7+
- Textures
8+
description: PNGtoDDSTextureScripts by StaticNation are a set of Python scripts for use with NVIDIA Texture Tools 3 when batch converting PNG textures to DDS.
9+
---
10+
11+
![[maintenance-expand-article#^6fc39d|clean]]
12+
13+
## About
14+
15+
> [!infobox|n-th]
16+
>
17+
> ## Article Title
18+
>
19+
> > [!caption|center wfull txt-s]
20+
> >
21+
> > ![[staticnation-nexus-mods-avatar.webp|center]]
22+
> > [StaticNation's](https://next.nexusmods.com/profile/StaticNation/about-me) Nexus Mods avatar.
23+
> > [(image source)](https://next.nexusmods.com/profile/StaticNation/about-me)
24+
>
25+
> ### Details
26+
>
27+
> | Type | Name |
28+
> | --- | --- |
29+
> | **Links** | [Github](https://github.com/staticnation/PNGtoDDSTextureScripts/tree/main) |
30+
> | **Requirements** | - [Python](https://www.python.org/downloads/)<br>- [Pillow (PIL fork)](https://pillow.readthedocs.io/en/stable/)<br>- [[nvidia-texture-tools\|NVIDIA Texture Tools 3]] |
31+
> | **Author** | [StaticNation](https://github.com/staticnation) |
32+
33+
**PNGtoDDSTextureScripts** by StaticNation are a set of Python scripts for use with [[nvidia-texture-tools|NVIDIA Texture Tools 3]] when batch converting PNG textures to DDS.
34+
35+
## Usage
36+
37+
See [[gigapixel-texture-upscale-tutorial|Gigapixel Texture-Upscaling Tutorial]].
38+
39+
this is used to detect the alpha channels and sorts out pngs with alphas and those without so they can be converted to BC1 and BC3 as needed
40+
the convert_images.py script is not recursive so you have to run it on each folder
41+
there is a second script for normal maps etc which is recursive and converts everything to BC1 (convert_maps.py)
42+
the batch files allow drag and drop of files
43+
44+
everything is set up to use a Kaiser filter for the mip maps as it gives really nice results and prevents things from seeming blurry from a distance in game in the batch files
45+
these are the CLI settings
46+
47+
```python
48+
nvcompress -color -mipfilter kaiser -bc1 "%input%" "%output%"
49+
```
50+
51+
```python
52+
`nvcompress -color -mipfilter kaiser -bc3 "%input%" "%output%"`
53+
```
54+
55+
the python scripts have lines with where you need to put in the paths, these are commented in the files
56+
57+
'convert_images.py' lines 26, 27, 57 and convert_maps.py lines 31, 34
58+
59+
use my scripts to convert to DDS because it allows me to set the mip map filters and color correction (the scripts apply the correct BC1 and BC3 DDS types with detection of if there is alpha channels in the png) while using CUDA to save on processing time[^1]
60+
61+
[^1]: [StaticNation, Discord, Morrowind Modding Community, October 12, 2024](https://discordapp.com/channels/210394599246659585/976440577044402217/1294416067653009480)

0 commit comments

Comments
 (0)