Titan Quest Fans Forum

Titan Quest - Anniversary Edition => Modifications => Texture & Skin Modding => Topic started by: nargil66 on 05 February 2020, 01:28:18

Title: (Tutorial) Making Animated Textures
Post by: nargil66 on 05 February 2020, 01:28:18
Credit for this tutorial goes to Skylla from Grim Dawn forums:
https://forums.crateentertainment.com/t/creating-animated-texture/32223

The method explained here uses TextureCompiler found in your main game folder via Windows Command Line. Using it you will be able to combine multiple TGA textures into a single animated TEX file.  Here is an example of animated texture:

(https://i.imgur.com/ke9dfsU.gif)

Part I - Initial Setup

Before you start making the textures you want to combine, there are few preparations that need to be done. Here are the steps for setting up:

1.   In Windows, go to Search Panel and in the empty field type: cmd

(https://i.imgur.com/hzkTTSC.png)

Right Click on command prompt and pin it to your taskbar for faster access later.

2.   Run it. You will see something like this:

(https://i.imgur.com/2oKPmL7.png)

In this case, my current location is C:\Users\User. Yours will probably be different.

3.   Now open Windows Explorer and go to that directory (whatever it is), and inside it create a new folder. Let’s name it “TQ” (this will be your working folder for animated textures).

(https://i.imgur.com/hUmBigU.jpg)

4.   Next, go to your main Titan Quest installation folder. Copy the following files:
TextureCompiler.exe
devil.dll

Then paste them in the “TQ” folder you crated:

(https://i.imgur.com/99oRodB.png)

5. You are set to go.

Part II – Making the textures

As in all animations, animated textures consist of separate parts or frames. For the above example with the rainbow glowing armbands I used 18 parts total. Here is how they look before combining:

(https://i.imgur.com/T1wsIue.png)

The trick in most cases is to make the texture to “loop” - starting and ending with the same shape (or color in this case), while gradually changing in between, before it completes the animation circle. Example of looping animated sequence with changing shape:

(https://cdn5.vectorstock.com/i/thumb-large/96/84/cartoon-fire-flame-sheet-sprite-animation-vector-18799684.jpg)

You get the idea.

Part III – Combining the Textures into TEX

After you’re done with the different parts of the texture sequence, place them all inside the “TQ” folder you created before. It should look like this:

(https://i.imgur.com/zkK1zIF.png)

Its better if you use simple names or numbers (less writing after). I just named them from 1.tga to 18.tga
Now open the command prompt again, and in the empty field type: cd TQ

(https://i.imgur.com/3XS45Om.png)
Press Enter. This will redirect you to the TQ subfolder in your User directory, where TexCompiler and your textures are located (“cd” stands for “change directory”):

(https://i.imgur.com/WUBkw06.png)

You are ready to combine the TGAs.
 
A general example of a command is this:

“TextureCompiler filename1.tga filename2.tga filename3.tga -fps 15 -format dxt5 animatedtexture.tex”

“fps 15” stands for frames per second – of this number depends how fast your animated texture will change or loop. Higher number will make it fast, lower will slow it down.
“format dxt5” is the conversion method – I assume you can put dxt1 or dxt3 there at least.

In my case with 18 parts I used the following command:
TextureCompiler 1.tga 2.tga 3.tga 4.tga 5.tga 6.tga 7.tga 8.tga 9.tga 10.tga 11.tga 12.tga 13.tga 14.tga 15.tga 16.tga 17.tga 18.tga -fps 9 -format dxt5 rainbowarmbands.tex

(https://i.imgur.com/Sb6C61U.png)

Press Enter. If you did everything right, the animated TEX file should appear in your working “TQ” folder with the other files.

(https://i.imgur.com/qtDLcVs.png)
Title: Re: (Tutorial) Making Animated Textures
Post by: nargil66 on 08 March 2024, 10:41:31
This tutorial is outdated. The function of building animated textures is now built-in ArtManager when building a TEX asset, so you dont need a command line anymore.
SimplePortal 2.3.7 © 2008-2024, SimplePortal