Skip to content

Commit

Permalink
Update wiki (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
iMrShadow committed May 29, 2024
1 parent 8401c30 commit 45cd5d5
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 29 deletions.
8 changes: 4 additions & 4 deletions wiki/home.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Welcome to the DDS-D3DTX-Converter wiki!
Welcome to the Telltale Texture Mod Tool wiki!

This is the home page containing all the pages and information about the Texture Mod Tool. If you have trouble understanding, please use an in-built Google Translate.
This is the home page containing all the pages and information about the Texture Mod Tool. If you have trouble understanding in English, please use an in-built Google Translate.

### Table of Contents
1. **[Application Guide](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/wiki/%5BHelp%5D-Application-Guide)**
2. **[Reporting issues/bugs](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/wiki/%5BHelp%5D---Reporting-an-Issue-or-Bug)**
1. **[Application Guide](/wiki/application_guide.md)**
2. **[Reporting issues/bugs](/wiki/issue.md)**

### Tutorials
1. **[How to make a Texture Mod (Prelude)](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/wiki/%5BTutorial%5D--How-to-make-a-Texture-Mod-(Part-1))**
Expand Down
62 changes: 62 additions & 0 deletions wiki/tutorials/surfaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

[Home](/wiki/home.md)

Telltale surface formats have their equivalent DXGI format. If you are not sure in which format to save, this is a table containing useful information.

| Telltale Surface Format | DXGI Format | Notes |
| ----------------------- | ----------- | ----------- |
| ARGB8 | B8R8G8A8_UNORM or B8R8G8A8_UNORM_SRGB[^1] | |
| ARGB16 | R16B16G16A16_UNORM |
| RGB565 | R5G6B5_UNORM |
| ARGB1555 | B5G5R5A1_UNORM |
| ARGB4 | B4G4R4A4_UNORM |
| ARGB2101010 | R10G10B10A2_UNORM | Requires swizzling the red and blue channels.
| R16 | R16_UNORM |
| RG16 | R16G16_UNORM |
| RGBA16 | R16G16B16A16_UNORM |
| RG8 | R8G8_UNORM |
| RGBA8 | R8G8B8A8_UNORM or R8G8B8A8_UNORM_SRGB[^1] |
| R32 | R32_FLOAT|
| RG32 | R32G32_FLOAT |
| RGBA32 | R32G32B32A32 |
| R8 | R8_UNORM |- Use R8 in Paint.Net or L8 in GIMP
| RGBA8S | R8G8B8A8_SNORM |
| A8 | A8_UNORM | Used in detail textures.
| L8 | R8_UNORM |
| AL8 | R8G8_UNORM |
| L16 | R16_UNORM | Use DirectX SDK (2010 version).
| RG16S | R16G16_SNORM |
| RGBA16S | R16G16B16A16_SNORM |
| R16UI | R16_UINT|
| RG16UI | R16G16 _UINT |
| R16F | R16_FLOAT |
| RG16F | R16G16_FLOAT |
| RGBA16F | R16G16B16A16_FLOAT |
| R32F | R32_FLOAT |
| RG32F | R32G32_FLOAT | |
| RGBA32F | R32G32B32A32_FLOAT | Used in light maps.
| BC1 | BC1_UNORM or BC1_UNORM_SRGB[^1] | <ul><li>Also known as DXT2 (pre-multiplied alpha) or DXT3</li><li>Commonly used in textures **without** alpha.</li></ul>
| BC2 | BC2_UNORM or BC2_UNORM_SRGB[^1] | <ul><li>Also known as DXT2 (pre-multiplied alpha) or DXT3</li><li>Commonly used in textures **with** alpha.</li></ul>
| BC3 | BC3_UNORM or BC3_UNORM_SRGB[^1] | <ul><li>Also known as DXT4 (pre-multiplied alpha) or DXT5</li><li>Commonly used in textures with alpha.</li></ul>
| BC4 | BC4_UNORM | <ul><li>Also known as ATI1</li><li>Commonly used in ???</li></ul>
| BC5 | BC5_UNORM | <ul><li>Also known as ATI2</li><li>Commonly used in normal maps.</li></ul>
| BC6 | BC6H_UF16 |
| BC7 | BC7_UNORM or BC7_UNORM_SRGB[^1] |
| [Any Format]_UNORM | [Any Format]_UNORM | You will find these formats in legacy Telltale titles.

> There are other existing Telltale formats, but they cannot be found on PC platforms.
> DDS editors do not have all of the save options presented above. Use DirectX SDK or NVIDIA Texture Tool for conversion.
| Telltale Surface Gamma | DXGI Format |
| --- | --- |
| Non-existent | Non-SRGB (Linear) |
| Unknown | Non-SRGB (Linear) |
| Linear | Non-SRGB (Linear)|
| sRGB | SRGB |
> Non-existent means that there is no such field in the relative D3DTX version.
[^1]: The output depends on the D3DTX's surface gamma value.



2 changes: 1 addition & 1 deletion wiki/tutorials/tutorial_part_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Welcome to the first part of the tutorial on how to make a texture mod for Telltale's games. In this section we focus on how to find and extract the textures needed for your mods!**

## [Make sure you read the prelude before beginning. It contains important information.](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/wiki/%5BTutorial%5D-How-to-make-a-Texture-Mod-(Prelude))
## [Make sure you read the prelude before beginning. It contains important information.](/wiki/tutorials/tutorial_prelude.md)

**Now with that out of the way let's begin.**
We use Telltale Explorer for this part of the tutorial. Make sure to download it.
Expand Down
110 changes: 110 additions & 0 deletions wiki/tutorials/tutorial_part_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
## Step 1/9 - Selecting your Texture Folder

Open the application, simple and straightforward.

![tut1](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut1.png)

Go to the folder icon and click it to browse for your folder containing your **.d3dtx** textures.

![tut2](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut2.png)

It will open a folder browser, in here navigate and find the folder that contains your **.d3dtx** textures. Worth mentioning you can just have a single **.d3dtx** file in there or multiple. Once your folder is selected in the browser, just click **Select Folder**.

![tut3](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut3.png)

## Step 2/9 - Converting textures to .dds

Once you select your folder, the **Textures Directory section** will be populated with your **.d3dtx** files. The next thing to do here is to now convert these **.d3dtx** files into a **.dds** by clicking **Convert To DDS**.

It's worth mentioning that as of v1.0.0 the application will freeze for a few moments, but it will not crash. Just let it run and the conversion will be complete.

![tut4](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut4.png)

## Step 3/9 - Browsing through the .dds textures

Once the application finishes converting the **.d3dtx** textures, it will remove the original **.d3dtx** textures from the directory and replace them with the extracted **.dds** texture file along with a **.header** file that contains the original d3dtx header **(DO NOT REMOVE THIS FILE)**.

**With this process complete you can now browse through the textures and find which one you want to modify.**

![tut5](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut5.png)

**Once you have picked your .dds file to edit**, be sure to select it in the application like so, and before we move forward the next step is to look in the **Image Properties** section to know what to keep in mind when saving the texture after modification.

![tut6](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut6.png)

## Step 4/9 - Noting the Image Properties (IMPORTANT)

Look under the **Image Properties** section of the selected image you want to modify and note the information displayed. The **image resolution** needs to remain the same *(this will change in a later update)*. Not only that you need to pay attention most importantly to the **DDS Format**, and **Mip Map** info.

If the texture has mipmap information. **Has Mip Maps** will be displaying True along with **Mip Map Count** which will display the number of mipmaps. Occasionally when saving a dds texture the mipmap count will change, **this is fine** and won't ruin the texture. We just want to make sure that when we modify and save the image, that our image editing software generates mipmaps and is also saving in the same compression type as the original.

![tut7](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut7.png)

## Step 5/9 - Opening the Image in your editing software

Once we have the information noted. To get the texture you can **right-click** on the File Browser in the **Textures Directory** section and click **Open Folder** to open the folder in File Explorer.

![tut8](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut8.png)

Once you have it open in file explorer you can right click and edit this image in the following programs.

### **[Photoshop](https://www.adobe.com/products/photoshop.html)** with **[this DDS plugin](https://software.intel.com/content/www/us/en/develop/articles/intel-texture-works-plugin.html)** or **[Paint.NET](https://www.getpaint.net/)**.

In the case of this tutorial we are using **[Photoshop](https://www.adobe.com/products/photoshop.html)** with **[this DDS plugin](https://software.intel.com/content/www/us/en/develop/articles/intel-texture-works-plugin.html)** but the same steps will apply to **[Paint.NET](https://www.getpaint.net/)**. **[Photoshop](https://www.adobe.com/products/photoshop.html)** will ask for a prompt like this. It's self-explanatory but I'll describe it in a little more detail.

![tut9](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut9.png)

Checking the field here will load the different mipmap levels into **separate layers** in the image editor. You can do this however you need to keep in mind that when you are making changes to one layer you will need to do the same to each different mipmap layer which can get tedious. **For convenience and ease, I recommend leaving this off as we can generate mipmaps from the single texture later when saving, which is the next step.**

**Note:** if you are editing an alpha texture it will ask if you want to load it in the alpha channel. **Leave this off** as the alpha channel will just be read as transparency by default in **[Photoshop](https://www.adobe.com/products/photoshop.html)**.

## Step 6/9 - Saving the modified Image in your editing software (IMPORTANT)

**In this case, we are still using [Photoshop](https://www.adobe.com/products/photoshop.html) with [this DDS plugin](https://software.intel.com/content/www/us/en/develop/articles/intel-texture-works-plugin.html) but the information I will describe here can be applied to a different image editing software with DDS support.**

Worth noting here that the modified image here is the same resolution as the original.

@@ -94,40 +84,43 @@ Minor note: If your application is giving an error indicating that it can't save

![tut10](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut10.png)

## Step 7/9 - Opening the Texture Mod Tool application and viewing/verifying the texture

Once we have our final modified texture, we will return to the application to view and verify the texture. We can see that the image dimensions are the same, the format is also the same and along with that the texture has mipmaps as well. The mipmap count did grow compared to the original however this is okay, the important thing here is that the image has mipmaps.

![tut11](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut11.png)

## Step 8/9 - Converting the textures back into a D3DTX format

After we finished verifying our texture data and information we can now start the conversion process of putting these back into their native **.d3dtx** format. Simply click the **Convert To D3DTX** button in the **Textures Directory** section.

![tut12](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut12.png)

**Once we click the Convert To D3DTX button in the Textures Directory section it will ask you what folder to save the modified textures into.** Simply select an empty folder and click **Select Folder**. Once again as of v1.0.0 the application will freeze for a moment as it begins to convert the textures into a **.d3dtx** format.

![tut13](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut13.png)

## Step 9/9 - Conversion Complete

Once the conversion is complete, the application will automatically open file explorer to the folder in which your modified textures were saved to. In this case, we can see all of our converted textures and I have selected the main texture that I modified.

![tut14](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/tut14.png)

# [Part 2](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/wiki/%5BTutorial%5D--How-to-make-a-Texture-Mod-(Part-2))

**This next section is where we will sort of split off because how one would go about this can vary. You can still follow along just by clicking **[Part 2](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/wiki/%5BTutorial%5D--How-to-make-a-Texture-Mod-(Part-2))**, but there are two ways we can now integrate this modified texture back into the game.**

Main Route 1
- **[Part 2](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/wiki/%5BTutorial%5D--How-to-make-a-Texture-Mod-(Part-2))** describes how to do it where we use **[Telltale Script Editor](https://github.com/Telltale-Modding-Group/Telltale-Script-Editor)** to build the textures into a custom .ttarch2 archive, and this can either added in manually or can be added in using the **[Telltale Mod Launcher](https://github.com/Telltale-Modding-Group/TelltaleModLauncher)**. **We recommend it this way** as it's non-destructive to the game files, and distribution of this mod is made much easier as the **[Telltale Script Editor](https://github.com/Telltale-Modding-Group/Telltale-Script-Editor)** builds the final mod into a .zip file that is compatible with the **[Telltale Mod Launcher](https://github.com/Telltale-Modding-Group/TelltaleModLauncher)**.

Alternative Route 1
- With the D3DTX files you can actually drop them in the Game Directory Archives/Packs folder that contain the .ttarch2 archives and the game will actually see it and load it up.

Alternative Route 2
- This is the old way of doing it, it's more complicated and destructive but it's another way of doing it, it involves using **[ttarchext](http://aluigi.altervista.org/papers.htm#ttarchext)** which is a console application and will require you to manually extract the archive, replace the texture file, repack the archive, and replace the original archive with the modified one. This is an acceptable option, However, as stated, it is destructive to the game files and distribution would require you to send the whole archive which can get difficult fast as txmesh archives happen to be the biggest ones in size in the game files.

**So on to **[Part 2](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/wiki/%5BTutorial%5D--How-to-make-a-Texture-Mod-(Part-2))** where we build this texture into a mod ready file!**

For the record, the final result after integrating it into The Walking Dead Definitive Edition (and **[Part 2](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/wiki/%5BTutorial%5D--How-to-make-a-Texture-Mod-(Part-2))** will describe how to get the mod built/tested/ready).

![result](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/blob/main/tutorial-screenshots/result.png)
Loading

0 comments on commit 45cd5d5

Please sign in to comment.