Difference between revisions of "Template:Painted variants/Tutorial/Automation"

From Team Fortress Wiki
Jump to: navigation, search
(Draft. EXPERIMENTAL TOOLS - Experience users only.)
 
m (Whee, typos!)
 
(13 intermediate revisions by 5 users not shown)
Line 4: Line 4:
 
}}
 
}}
  
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 [http://dl.dropbox.com/u/14166375/Painted%20Image%20automation%20-%20EXPERIMENTAL%200001.7z here].
+
 
 +
{{Ambox
 +
|type = notice
 +
|contents = '''Current version:''' 0008 {{md}} [http://www.mediafire.com/?9lws5yvs9elavy2 Download]
 +
}}
 +
 
 +
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.
  
 
== Tools ==
 
== Tools ==
=== hlmv-tf2.bat ===
+
=== automateCaptureImages.ahk ===
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.
+
This script automates the editing of the VMT for each paint, screenshotting and pasting each image into Photoshop.
  
=== fixVMT.py ===
+
=== automateCaptureImages_slow.ahk ===
This tool is used to ensure the VMT has the "$color2" attribute listed correctly, for use with automateCaptureImages.ahk.
+
Same as above with increased pauses - may be necessary for taking the images of attached items.
  
=== automateCaptureImages.ahk ===
+
=== renameImagesEasyUpload.bat ===
This files automates the editing of the VMT for each paint, screenshotting and pasting each image into Photoshop.
+
This tool converts the meaningless names exported from Photoshop into useful names for manually uploading to the Wiki.  The first section of the name relates to that images position in the Painted Variants template.
 +
 
 +
=== renameImagesWikiNames.bat ===
 +
This tool requires additional parameters (renameImagesWikiNames <nowiki><"hat name"> ["style"]</nowiki>).  It converts the Photoshop exported files into the file names as they would appear on the Wiki.  This is useful if you're using the script below to upload the files; if not: <code>renameImagesEasyUpload</code> is easier.
  
=== renameImages.bat ===
+
=== upload.py ===
This tool converts the meaningless names exported from Photoshop into useful names, in a useful order for uploading to the Wiki.
+
This tool will upload all images in the /png subdirectory. Use renameImagesWikiNames.bat before using this. This uses the modified wikitools found [[User:WindBOT/Source|here]]; If you already have this installed in your site-packages, delete the included wikitools as appropriate.
  
 
== Requirements ==
 
== Requirements ==
* Autohotkey
+
* Python
 +
* [http://www.autohotkey.com AutoHotkey]
 
* Photoshop
 
* Photoshop
* Technical experience manually generating Painted Images.
+
* Technical experience manually generating Painted Images
* Familiarity with the wiki's practises.
+
* Familiarity with the wiki's practices
  
 
== Process ==
 
== Process ==
 
This is roughly written, intended for users familiar with the process.
 
This is roughly written, intended for users familiar with the process.
 
* Run TF2 and then exit it.
 
* Run TF2 and then exit it.
* Run <code>hlmv-tf2.bat</code>
 
 
* Extract the relevant VMT files from the content GCF, place them in the appropriate directory.
 
* Extract the relevant VMT files from the content GCF, place them in the appropriate directory.
* Drag and drop the VMTs onto <code>fixVMT.py</code>.
+
* Paste this into the VMT somewhere, preserving the indentation in the VMT: {{code| "$color2" "{0 0 0}"}} '''Replace 0 0 0 with the item's default color'''.
 
* Open HLMV and the appropriate model to create a registry entry.
 
* 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]].
 
* 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.
 
* 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.
+
* Open Photoshop, create a document the same size as your HLMV window - ensure this document is unsaved and named "Untitled".  Also ensure there is only one layer; usually "Background" or "Layer 1".
* Run <code>automateCaptureImages.ahk</code>. Do not touch your PC while it does it's thang.
+
* Run <code>automateCaptureImages.ahk</code>. Don't interrupt the process.
 
* In photoshop, crop and remove the background of the images as usual.
 
* 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. :)
 
* '''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.
 
* In photoshop, File - Scripts - Export layers to files.
** Destination to wherever appropriate
+
** Destination to wherever appropriate. '''If you're using the upload script, make it the /png subdirectory of these tools.'''
 
** File name prefix should be blank.
 
** File name prefix should be blank.
 
** PNG24
 
** PNG24
 
** Transparency and Trim Layers ticked.
 
** Transparency and Trim Layers ticked.
 
* Run the export and wait until it finishes.
 
* Run the export and wait until it finishes.
* Copy <code>renameImages.bat</code> into the directory with the images, and run it. All of the images should now have a nice useful name.
+
* '''If you're using the upload script, run {{code|renameImagesWikiNames.bat}} in /png.''' If not, copy {{code|renameImagesEasyUpload.bat}} into the export directory and run it.
* Upload the images to the appropriate places - their number prefix is their position from the top left of [[Template:Painted variants]].
+
* If using the upload script, simply run it ({{code|upload.py}}) and then clean the /png directory of all pngs after verifying the images have uploaded successfully (leave the {{code|.bat}} in there). If not, 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.
 
* '''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 ==
 
== Feedback ==
 
As the toolset is very new and very experimental, please provide feedback on the tools on the article's talk page.
 
As the toolset is very new and very experimental, please provide feedback on the tools on the article's talk page.

Latest revision as of 16:10, 18 May 2013


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.

Tools

automateCaptureImages.ahk

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

automateCaptureImages_slow.ahk

Same as above with increased pauses - may be necessary for taking the images of attached items.

renameImagesEasyUpload.bat

This tool converts the meaningless names exported from Photoshop into useful names for manually uploading to the Wiki. The first section of the name relates to that images position in the Painted Variants template.

renameImagesWikiNames.bat

This tool requires additional parameters (renameImagesWikiNames <"hat name"> ["style"]). It converts the Photoshop exported files into the file names as they would appear on the Wiki. This is useful if you're using the script below to upload the files; if not: renameImagesEasyUpload is easier.

upload.py

This tool will upload all images in the /png subdirectory. Use renameImagesWikiNames.bat before using this. This uses the modified wikitools found here; If you already have this installed in your site-packages, delete the included wikitools as appropriate.

Requirements

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

Process

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

  • Run TF2 and then exit it.
  • Extract the relevant VMT files from the content GCF, place them in the appropriate directory.
  • Paste this into the VMT somewhere, preserving the indentation in the VMT: "$color2" "{0 0 0}" Replace 0 0 0 with the item's default color.
  • 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 there is only one layer; usually "Background" or "Layer 1".
  • Run automateCaptureImages.ahk. Don't interrupt the process.
  • 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. If you're using the upload script, make it the /png subdirectory of these tools.
    • File name prefix should be blank.
    • PNG24
    • Transparency and Trim Layers ticked.
  • Run the export and wait until it finishes.
  • If you're using the upload script, run renameImagesWikiNames.bat in /png. If not, copy renameImagesEasyUpload.bat into the export directory and run it.
  • If using the upload script, simply run it (upload.py) and then clean the /png directory of all pngs after verifying the images have uploaded successfully (leave the .bat in there). If not, 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.