User:Gabrielwoj/War Paint Textures

From Team Fortress Wiki
Jump to: navigation, search
User Gabrielwoj userpage bar 1.png User Gabrielwoj usercontri bar 4.png User Gabrielwoj sanbox bar 5.png
My Userpage My Contributions Sandbox

Pre-Requisites

Notice

This tutorial will go step-by-step on how to obtain one War Painted generated texture, and not how to obtain a batch of textures from an entire collection. Currently, the method I rely to obtain an entire collection is very precise and probably wouldn't work with all computers, made with AutoHotkey scripts I wrote myself which move the mouse-around and require some software to work (including some paid software like DisplayFusion). I advice to hop to the Talk page of this guide for new solutions on how to obtain these textures, preferably ones that doesn't risk getting VAC banned.

The tools and scripts I used myself will be archived on my GitHub Repo, but you will probably need to change values in order to get it work on your end. Considering I've been exporting these textures not only for a potential TF2Wiki use, but also for TF2 Item creators and for general use by other players, I'll probably continue the texture exportation project whenever a new War Paint Collection comes out, even if I stop contributing to the Wiki altogether.

How does this work

Decorated Weapon and War Painted textures are almost all generated in-game (with some exceptions like Factory New Dragon Slayer war paints), so they aren't possible to extract from the game's .vpk files. In order to be able to get the texture outside the game, we must have some sort of way to extract directly from memory. Currently, the method explained on this guide utilizes a Graphics Debugger, which can view all sorts of details and more importantly, export any loaded textures in memory (including alpha mask).

Graphics Debuggers require to inject themselves into a specific process, so this is why the chances of getting VAC banned are very likely. While there might be other ways to do this more safely, currently this guide will only instruct on how to achieve with Intel GPA. Again, I suggest heading off to the Talk page of this guide to discuss some ideas, which I'll be posting there once this guide is fully written.

Pre-Configuration

Team Fortress 2 Config

Before getting started with Intel GPA, we should prepare our TF2 for the texture exportation. It should come to no surprise we should not include any sort of custom files on our game folder. Switch to your alt Steam account, and, if you have launched TF2 before, make sure that it's as vanilla as possible. You can run as -autoconfig on the launch options (Steam -> Right-Click on Team Fortress 2 -> Properties... -> Launch Options -> -autoconfig to restore all settings to default. Also disable Steam Cloud on the same window.

Make sure to make a backup of your default .cfg folder, so it doesn't override the config you use on your normal gameplay. You can simply rename the cfg folder from your tf folder to cfg_, and the game will create a new one. Later on, you can rename the cfg folder to cfg_default whenever you need to go back to default settings.

Launch TF2, and go to the Options Menu, Video then Advanced. Make sure to maximize every option. Also run TF2 on Windowed (No Border) and set to maximum available resolution. Press OK or Apply, let the game refresh, then close the game. Head over back to Steam, and replace the -autoconfig launch command with -insecure in the launch options by doing the same steps as before.

Preparing Intel GPA

Install Intel GPA from the link provided above. Once installed, launch Graphics Monitor from your Start menu. Once there, click the Gear icon above, and enable "Extended Profiling Modes". From the Supported APIs, select Frame [DX11] from the drop-down menu.

You can remove the Desktop Applications that come as samples by mouse-hovering and clicking the X. Now we have to set the paths to the executable we want to run Graphics Monitor with. You can click the ... to navigate the folders, but it should look like this (the paths will change depending on where your Team Fortress 2 installation is):

  • Application Executable with Command Line Arguments: "E:/Games/Steam/steamapps/common/Team Fortress 2/tf_win64.exe" -insecure
  • Working Directory: E:/Games/Steam/steamapps/common/Team Fortress 2
  • Environment variables in the form of "FOO=0;BAR=1": -insecure

Once all of this is set-up, press the blue Start button. In case nothing happens, try closing Intel GPA by right-clicking from the Tray icon and pressing Exit, open again and retry.

Exporting/Importing Process

Navigating through Team Fortress 2

  • Head over to Items.
  • Go to War Paints.
    • If the War Paint drop-down is set to "None", select the War Paint you wish to export the texture.
  • Set the seed (the amalgamation of numbers) to 0.
    • If you wish to export a texture with a specific seed (such as, something you have on your inventory), you can head over to your inventory by visiting the link https://steamcommunity.com/my/inventory.
    • Select the Decorated Weapon of choose, and click Inspect in Game....
    • If applicable, select the team you'd like the texture to be exported (RED or BLU).
  • Let the generated texture load, and once done, press CTRL+SHIFT+C. This will save a .gpa_frame to "My Documents/GPA".
  • You can now close TF2.
    • You can now close Intel GPA Graphics Monitor by right-clicking the tray icon and clicking Exit.

Exporting Texture with Graphics Frame Analyzer

  • Head over to Users\YourWindowsUsername\Documents\GPA.
  • Double-click the file called tf_win64_YYYY_MM_DD__HH_MM_SS.gpa_frame (example: tf_win64_2025_04_23__18_53_45.gpa_frame).
    • YYYY: Year;
    • MM: Month;
    • DD: Day;
    • HH: Hour;
    • MM: Minutes;
    • SS: Seconds.
  • Let the Frame Analyzer open. Once fully loaded, head over the table on the left, and press the Prim Co... column twice. This will set the most visible texture on top (useful if you were to use an automated script).
    • Select the ID by pressing the checkbox. The texture will appear on the right-side. Simply right-click and click Save Image. Save the .DDS texture somewhere.
  • Close the Frame Analyzer.

Importing Texture with VTFEdit Reloaded

  • Open VTFEdit Reloaded
  • Go to File -> Import. Select the exported .dds from the Graphics Analyzer.
  • When importing, utilize the following values:
    • General:
      • Color Format: DXT5;
      • Alpha Format: DXT5;
      • Texture Type: Animated Texture;
      • Keep sRGB Color Space unchecked;
      • Keep Resize unchecked;
      • Keep Generate Minimaps unchecked.
    • Advanced:
      • Version: 7.4;
      • Keep Correct Gamma unchecked;
      • Check Compute Reflectivity;
      • Check Generate Thumbnail;
      • Keep Generate Sphere Map unchecked;
      • Luminance Weights:
      • Red: 1.000
      • Green: 1.000
      • Blue: 1.000
    • Resources:
      • Keep Create LOD Control Resource unchecked;
      • Keep Create Information Resource unchecked.
  • Press OK, now head over to File and click Save As. Save your texture somewhere on your computer.

Other Important Info

Custom Materials

Some Decorated Weapons / War Paints utilizes a custom material that gives them a different shine. The proto_defs.json file has attributes to each weapon to include what material to use, but sadly, the file is compressed. You can download an older uncompressed version of this file to check it yourself, but not all Decorated Weapons will be there. In most cases, if a community War Paint utilizes a custom material, it's more often likely that it uses the same one as Macaw Masked, as it's the only one where all weapons are available.

You can also download this .zip file, which nullifies all .vmt materials. Checking War Paints in-game from the War Paint menu will show any weapon that uses a custom material as grey. Earlier War Paints and Decorated Weapons can utilize a multitude of different materials, so you'll have to try-and-error to see what .vmt is the one used or not (add a underscore after one of the .vmts so the nullified material is no longer loaded in-game). Just make sure to remove it once you know what custom material it's utilizing.

Loading on HLMV

To be able to load a War Paint generated texture onto HLMV, you'll have to know the paths utilized by the game's internal names. You can download this folder tree where it has each folder already created (note that it also gets rid of jigglebones in weapons, the animation on Pyro's pilotlight flamethrowers and makes the Medi Gun's hose shorter). Here is a list of weapons based on their model path, provided by Reahan, which can help you know where to put the files at:

 "airstrike": "models/workshop/weapons/c_models/c_atom_launcher/c_atom_launcher.mdl",
 "amputator": "models/workshop/weapons/c_models/c_amputator/c_amputator.mdl",
 "backscratcher": "models/workshop/weapons/c_models/c_back_scratcher/c_back_scratcher.mdl",
 "bazaarbargain": "models/workshop/weapons/c_models/c_bazaar_sniper/c_bazaar_sniper.mdl",
 "blackbox": "models/workshop/weapons/c_models/c_blackbox/c_blackbox.mdl",
 "brassbeast": "models/workshop/weapons/c_models/c_gatling_gun/c_gatling_gun.mdl",
 "claidheamhmor": "models/workshop/weapons/c_models/c_claidheamohmor/c_claidheamohmor.mdl",
 "crusaderscrossbow": "models/workshop/weapons/c_models/c_crusaders_crossbow/c_crusaders_crossbow.mdl",
 "degreaser": "models/workshop/weapons/c_models/c_degreaser/c_degreaser.mdl",
 "detonator": "models/workshop/weapons/c_models/c_detonator/c_detonator.mdl",
 "disciplinaryaction": "models/workshop/weapons/c_models/c_riding_crop/c_riding_crop.mdl",
 "dragonsfury": "models/weapons/c_models/c_flameball/c_flameball.mdl",
 "familybusiness": "models/workshop/weapons/c_models/c_russian_riot/c_russian_riot.mdl",
 "flamethrower": "models/weapons/c_models/c_flamethrower/c_flamethrower.mdl",
 "grenadelauncher": "models/weapons/c_models/c_grenadelauncher/c_grenadelauncher.mdl",
 "holymackerel": "models/workshop/weapons/c_models/c_holymackerel/c_holymackerel.mdl",
 "ironbomber": "models/workshop/weapons/c_models/c_quadball/c_quadball.mdl",
 "jag": "models/workshop/weapons/c_models/c_jag/c_jag.mdl",
 "knife": "models/weapons/c_models/c_knife/c_knife.mdl",
 "lochnload": "models/workshop/weapons/c_models/c_lochnload/c_lochnload.mdl",
 "loosecannon": "models/workshop/weapons/c_models/c_demo_cannon/c_demo_cannon.mdl",
 "medigun": "models/weapons/c_models/c_medigun/c_medigun.mdl",
 "minigun": "models/weapons/c_models/c_minigun/c_minigun.mdl",
 "panicattack": "models/workshop/weapons/c_models/c_trenchgun/c_trenchgun.mdl",
 "persianpersuader": "models/workshop/weapons/c_models/c_demo_sultan_sword/c_demo_sultan_sword.mdl",
 "pistol": "models/weapons/c_models/c_pistol/c_pistol.mdl",
 "powerjack": "models/workshop/weapons/c_models/c_powerjack/c_powerjack.mdl",
 "rescueranger": "models/workshop/weapons/c_models/c_tele_shotgun/c_tele_shotgun.mdl",
 "reserveshooter": "models/workshop/weapons/c_models/c_reserve_shooter/c_reserve_shooter.mdl",
 "revolver": "models/weapons/c_models/c_revolver/c_revolver.mdl",
 "rocketlauncher": "models/weapons/c_models/c_rocketlauncher/c_rocketlauncher.mdl",
 "scattergun": "models/weapons/c_models/c_scattergun.mdl",
 "scorchshot": "models/workshop/weapons/c_models/c_scorch_shot/c_scorch_shot.mdl",
 "scotsmansskullcutter": "models/workshop/weapons/c_models/c_battleaxe/c_battleaxe.mdl",
 "shahanshah": "models/workshop/weapons/c_models/c_scimitar/c_scimitar.mdl",
 "shortstop": "models/workshop/weapons/c_models/c_shortstop/c_shortstop.mdl",
 "shotgun": "models/weapons/c_models/c_shotgun/c_shotgun.mdl",
 "smg": "models/weapons/c_models/c_smg/c_smg.mdl",
 "sniperrifle": "models/weapons/c_models/c_sniperrifle/c_sniperrifle.mdl",
 "sodapopper": "models/workshop/weapons/c_models/c_soda_popper/c_soda_popper.mdl",
 "stickybomblauncher": "models/weapons/c_models/c_stickybomb_launcher/c_stickybomb_launcher.mdl",
 "tomislav": "models/workshop/weapons/c_models/c_tomislav/c_tomislav.mdl",
 "ubersaw": "models/weapons/c_models/c_ubersaw/c_ubersaw.mdl",
 "warpaint": "models/items/paintkit_tool.mdl",
 "winger": "models/workshop/weapons/c_models/c_winger_pistol/c_winger_pistol.mdl",
 "wrench": "models/weapons/c_models/c_wrench/c_wrench.mdl",

You will also have to know what are the internal names of textures and materials. You can check examples from my TF2 Decorated Weapon Textures and TF2 War Paint Weapon Textures collections to have a better idea.

For example, if you were to be extracting a team-colored War Painted texture for the Medi Gun, it would go to custom/my custom files/materials/models/weapons/c_models/c_medigun. The RED variant would be c_medigun.vtf and the BLU variant would be c_medigun_blue.vtf. The custom material would need to be duplicated to also be utilized by the BLU Team, then opening it, and replacing the $basetexture value to include c_medigun_blue.

If you want to use a team-colored War Paint for a single-colored weapon, you'll have to either choose the RED or BLU variant, then replace the texture used by the neutral color. Likewise, if you want to use a neutral-colored war paint texture for a team-colored weapon, simply replace both team's .vtf files with the same one (c_medigun.vtf and c_medigun_blue.vtf would be the same texture in this case).

Some weapons use different internal names (for instance, Powerjack's RED texture has the suffix _red.vtf, and it also uses _blu.vtf as opposed to _blue.vtf as it's commonly utilized), so I recommend checking out my collections for a good reference.

Tools I use

The following is a .zip package including tools I use to automate the process: https://github.com/gabrielwoj/hlmv-resources/raw/refs/heads/main/Other%20-%20War%20Painted%20Weapon%20Textures/Related%20Tools.zip. You will need to following extra tools:

1- GPA Capturing

It is what it says. The script will only work on the left-side monitor when running 2-monitors, and the main one is the right-monitor.

  • SingleColor.ahk will capture a batch of 225 War Paints, which are ones that are neutral-colored between teams;
  • TC.ahk will capture a batch of 450 War Paints, which include both RED and BLU variants of a War Paint.

On my setup, TF2 must be run with the following launch options for it to work: -insecure -windowed -noborder -novid -w 1920 -h 1060. So, make sure to paste that both on your alt account's Steam launch options for TF2, as well for the Intel GPA Graphics Monitor. Still on the Graphics Monitor, click "Options", go to Shortcuts, and change capture frame to "C".

On launch, you'll have to use AltSnap to move the window to be properly placed (I use another way, but it requires a paid program, so this will suffice). On AltSnap's options, make sure to enable "Snap window edges to: To Screen borders" and click the "Elevate" button. Because Intel GPA runs under administrator, AltSnap will also need to be run under admin.

Holding Alt and holding click, you can move the TF2 windows to the left-monitor, in a way where you taskbar is still visible. Now, head over to the War Paints options, select the War Paint, type 0 as the seed, select Air Strike, and select the Factory New wear. Everything is set up now.

Alongside AltSnap, the autohotkey scripts also require to be in adminstrator. To do that, you can create a shortcut by holding the .ahk by holding left-click, then holding Alt, and releasing the left-click button while keeping Alt held. This will create a shortcut. Now right-click on the shortcut, go to Properties, go to Advanced..., and enable "Run as administrator".

Now, run one of the autohotkey scripts, depending if it's a neutral colored or team-colored war paint, and let the mouse move it for you. I was unable to automate the entire process as I wasn't able to make clicks work on applications running as admin, so, the script works with the following:

  • As soon as you launch it, activate the TF2 window, and press C. Then, wait the mouse move to the next wear, then press X then C (the script also changes the X button to be left-click, so that's why we press X). Do this for all the 5 wears on the Air Strike.
    • In the case of a Team Colored war paint, the script will also capture BLU Team variants after the RED ones. The process is the same, but you must run TC.ahk when doing Team Colored War Paints and running SingleColor.ahk for neutral-color War Paints.
  • Then, the script will go to the drop-down menu for the weapons, and change to the next one. Just do the entire process once you capture every single war painted weapon.

Once everything is captured, close the Graphics Monitor by right-clicking on its tray icon and clicking Close.

3- ToggleableBATs

  • Toggle File Extensions.bat will disable File Extensions on Windows Explorer, in case it's enabled. It can also re-enable afterwards. It's a toggle after all.
  • Toggle Hidden Files.bat will no longer show hidden files from showing on Windows Explorer, in case it was enabled. It can also re-enable afterwards. It's a toggle after all.

The File Extensions and Hidden Files need to be hidden in order for the .gpa_frame process to work.

2- Filename Shortener

This is a pre-built .bru file for Bulk Rename Utility. In order for future steps to work, we have to rename the filenames to a shorter name. After installing Bulk Rename Utility, open file.bru, and head over to Users/YourWindowsUsername/Documents/GPA. Click the "Modified" tab in a way where the arrow stays up. Then, click the first instance of .gpa_frame, hold shift, and click the very last one, and press Rename.

4- GPA Extraction

Here is the meat of everything. These autohotkey scripts rely on auto mouse movement to extract the .dds out of the gpa frames. Before running them, we have to do some small adjustments on our File Explorer. Make sure to open Users/YourWindowsUsername/Documents/GPA, right-clicking somewhere empty, and Sort by -> Date Modified. Also right-click and go to View -> List. Make sure that the last file (from left to right) is the oldest one (earlier time, first capture, therefore, Factory New Air Strike), and the first file (from right to left) is the newest one (latest time, last capture, therefore, RED/BLU Battle Scarred Wrench), and keep the window open, maximized.

You will also need to re-enable the Hidden Files quickly in order to hide some files on the GPA folder. Hide everything except the .gpa_frames you will be exporting. That means hiding the following...:

  • .lua.log
  • rules.lua.log
  • MonitorConfig.json
  • domain.fltr
  • Dumps (folder)
  • Logs (folder)
  • python_plugins (folder)

Now, hide them again, and now we are ready to rumble. On the GPA Extraction part of the zip, there are the following folders and subfiles:

  • 4- GPA Extraction
    • 1 Monitor
      • Normal
        • 1Monitor-1Batch-NormalSpeed.ahk
        • 1Monitor-2Batches-NormalSpeed.ahk
        • 1Monitor-3Batches-NormalSpeed.ahk
      • Very Fast
        • 1Monitor-1Batch-VeryFastSpeed.ahk
        • 1Monitor-2Batches-VeryFastSpeed.ahk
        • 1Monitor-3Batches-VeryFastSpeed.ahk
    • Dual Monitors
      • Normal
        • 2Monitors-1Batch-NormalSpeed.ahk
        • 2Monitors-2Batches-NormalSpeed.ahk
        • 2Monitors-3Batches-NormalSpeed.ahk
      • Very Fast
        • 2Monitors-1Batch-VeryFastSpeed.ahk
        • 2Monitors-2Batches-VeryFastSpeed.ahk
        • 2Monitors-3Batches-VeryFastSpeed.ahk

You can use the .ahk scripts for "1 Monitor" if you only have 1 monitor connected to your PC, "Dual Monitor" is for the left-side monitor if you are running a dual-monitor setup. "1 Batch" refers to exporting 225 .gpa_frames, which is the entire neutral-colored war paint. "2 Batches" refers to 2 neutral colored war paints, or, a single team-colored war paint, 450 .gpa_frames. "3 Batches" is the absolutely maximum that it can be used using the "List" view on Explorer, 675 .gpa_frames.

  • You can use "2 Batches" to extract two entire neutral colored war paints.
  • You can use "3 Batches" to extract three entire neutral colored war paints, or, 1 neutral colored war paint and 1 team-colored war paint in one go.

NormalSpeed will have a very generous "Sleep" time between clicks, to make sure that the Graphics Analyzer tool can load it properly before the script makes clicks. "Very Fast" takes little to no Sleep time, and it's what works under my Setup. Speed may be dependent on your Desktop's specs.

Before finally opening one of the .ahk files, make sure to open any .gpa_frame, and exporting it to a "temp" folder. Then, remove that temp.dds file, and you are ready to run the scripts. These scripts take quite some time to do everything, depending on how many batches and its speed. Pressing F12 will terminate the script, and pressing Pause Break will pause the script (as long as the Graphics Analyzer tool isn't the active window, so you'll need to do that when it's on File Explorer). You can do something else once it's paused, as when you resume it, it will continue from where you left off. But, if you terminate it, it's back to square one.

If you open too many programs after pausing the script then resuming, there's chances the script will be out of sync due to having to reload the Graphics Analyzer back to memory. In that case, just do the temp.dds export again to keep the program intact in memory.

The Graphics Analyzer tool needs to be specifically at the position and size (for the 2nd left-sided monitor):

  • Left: -1912
  • Top: 4
  • Width: 1907
  • Height: 1023

There is no tool available to set this specific size as I use a commercial program, but you should be able to make a simple autohotkey script that does that for you.

Once the script exports all .dds files, you can close it by pressing F12, re-enable file extensions and hidden files (if you wish to). Open the temp folder, re-order by date modified, and make sure to get 225 .gpa_frames from oldest to your appropriate collection folder, then, the next 225 .gpa_frames for the other collection, and so on. Now, we can go to the next step.

5- Move Extracted Files to Proper Folders

This folder includes two bat files:

  • MoveDDS-SingleColor-Batch.bat: It moves and renames files from a collection of neutral colored war paints to its appropriate folder, 225 .gpa_frames;
  • MoveDDS-TeamColor-Batch.bat: It moves and renames files from a collection of team-colored war paints to its appropriate folder, 450 .gpa_frames;

Pictogram comment.png Note
If you make three batches of single colored war paints, you will have to rename them back to the appropriate file names by utilizing Bulk Rename Utility again. After the files are moved from Temp to its appropriate folder, you can do the same process as you did on the GPA folder, to make sure the filenames are correct for the bat files to work.

Copy the SingleColor-Batch.bat file to a folder containing 225 .gpa_frames. This will move all .dds files to appropriate folders, while also renaming them to appropriate file names, utilized internally by the game (001.dds becomes c_atom_launcher.dds, for Air Strike, for example).

For Team Colored war paints, simply do the same but with the TeamColor-Batch instead.

VTFEdit Reloaded Batch Import

We are almost close to the entire process. After you have already set up your VTFEdit to use the proper VTF format and quality, head over to Tools and click Convert Folder.

  • On Input Folder, select the folder including all the exported .dds files that you wish to convert to .vtf. Make sure to enable "Recursive" so it can get files on subfolders as well;
  • On the Output Folder, select a path where the .vtf files will be exported. I use Desktop/vtf-converted.

Select the button "To VTF", and type *.dds. Uncheck "create VMT files". Make sure the VTF format, settings and such are correct by going to Options. This will save between sessions, so you only need too do it once. Now, you can press Convert. This will convert every .dds files to a .vtf file. This process is CPU-intensive, so make sure to not run too many applications. Your CPU temperature might go up a bit, too.

After the entire process is complete, head over to the vtf-converted folder, open it, right-click somewhere empty on the folder, and go to Rename with PowerRename (this is after installing PowerToys).

  • Type DDS on the Search for input text
  • Uncheck "Use regular expressions", uncheck "Match all occurrences" and uncheck "Case sensitive".
  • On Replace with, type VTF
  • Apply to: Filename only
  • Enable the three buttons on the right: Include files, Include folders, Include subfolders.
  • Enable Enumeration features.
  • Press apply.

This will rename the "DDS" folder in all the folders to use "VTF" instead, after it was already converted. Then, simply cut the entire folder, and paste it over the collection folder to have both DDS and VTF files accordingly.