Template:Painted variants/Tutorial/Automation

From Team Fortress Wiki
Jump to: navigation, search


To aid in the generation of Painted Images, a tool-set has been created to reduce the amount of tedious tasks required to generate Painted Images. The toolset is available here.

Tools

hlmv-tf2.bat

This tool is used to copy Team Fortress 2's latest lighting binaries into the Source SDK files, in order to be used by HLMV.

fixVMT.py

This tool is used to ensure the VMT has the "$color2" attribute listed correctly, for use with automateCaptureImages.ahk.

automateCaptureImages.ahk

This script automates the editing of the VMT for each paint, screenshotting and pasting each image into Photoshop.

renameImages.bat

This tool converts the meaningless names exported from Photoshop into useful names, in a useful order for uploading to the Wiki.

Requirements

  • Python
  • AutoHotkey
  • Photoshop
  • Technical experience manually generating Painted Images.
  • Familiarity with the wiki's practises.

Process

This is roughly written, intended for users familiar with the process.

  • Run TF2 and then exit it.
  • Run hlmv-tf2.bat
  • Extract the relevant VMT files from the content GCF, place them in the appropriate directory.
  • Drag and drop the VMTs onto fixVMT.py.
  • Open HLMV and the appropriate model to create a registry entry.
  • Close HLMV and open regedit. Set the model's rotation as noted on Template:Painted variants/Tutorial/Rotations.
  • Re-open HLMV and the model. Set the FOV as noted on the rotations page.
  • Open Photoshop, create a document the same size as your HLMV window - ensure this document is unsaved and named "Untitled". Also ensure the only layer is the "Background" layer.
  • Run automateCaptureImages.ahk. Do not touch your PC while it does it's thang.
  • In photoshop, crop and remove the background of the images as usual.
  • QUALITY CONTROL - Check the images, make sure there are no duplicate images - if so this suggests the automation process is too fast for your computer... and it's already pretty slow, so just ragequit. :)
  • In photoshop, File - Scripts - Export layers to files.
    • Destination to wherever appropriate
    • File name prefix should be blank.
    • PNG24
    • Transparency and Trim Layers ticked.
  • Run the export and wait until it finishes.
  • Copy renameImages.bat into the directory with the images, and run it. All of the images should now have a nice useful name.
  • Upload the images to the appropriate places - their number prefix is their position from the top left of Template:Painted variants.
  • QUALITY CONTROL - Check the uploaded images against the history of the images they replaced - if they replaced any. Otherwise check them against another hat's colours - make sure the colours look similar.

Feedback

As the toolset is very new and very experimental, please provide feedback on the tools on the article's talk page.