Template:Painted variants/Tutorial

From Team Fortress Wiki
< Template:Painted variants
Revision as of 10:25, 4 October 2010 by Pilk (talk | contribs) (minor edits, this already perfect)
Jump to: navigation, search

This tutorial will document the current method of painting hats in Photoshop. Note: Please check on Template:Painted variants which hat's need to be done, and which hats have been done. Please note that the generated images may differ slightly to the hats in-game due to TF2's lighting mechanics.

Setting up HLMV

For your images to be of adequate quality for us to accept, you need to set up Half Life Model Viewer so that it generates high quality images. You can force high quality settings in your graphics cards control panel, but this does not work for some people - so I will document the alternate method.

Dxsupport.cfg

  1. Navigate to this directory T:\Steam\steamapps\username\sourcesdk\bin\orangebox\bin (where T:\ the folder your Steam folder resides in).
  2. Open up Dxsupport.cfg in a text editor of your choice. If you do not have this file, create it with this content.
  3. Find your graphics card within that file, if it is not listed go to the bottom and use ATI Unknown or NVidia Unknown depending on your graphics card manufacturer.
  4. Add or modify the following lines in Dxsupport.cfg - within the section for your graphics card, and save it.
"DxLevel"	"99"
"ConVar.mat_antialias"	"8"
"ConVar.mat_forceaniso"	"8"
"ConVar.mat_picmip"	"-10"

Inside HLMV

  1. Open up Model Viewer via the Source SDK.
  2. Check (if it's not already checked) the Normal Mapping checkbox.
  3. Set the background colour to white: Options... > Background Color...
  4. Full-screen HLMV (so you get a nice big image).
  5. Open up a model and ensure there is no anti-aliasing or other quality defects. If there is it's likely your graphics card is not able to render images of high enough quality.
    When generating hat images, you should use the red team texture and angle the hat slightly forward and facing left or right (get as much of the hat in view as possible). For example: File:Painted_Tough_Guy's_Toque_7D4071.png. All the painted images of a certain hat should be in the same position.

Pre-painting preperation

Extracting textures

  1. Open the hat you've chosen to do the images for in HLMV (and follow the Inside HLMV steps above).
  2. In Model Viewer switch to the 'Model' tab, and look under "VMTs Loaded".
  3. Using GCFScape, open up Steam\steamapps\team fortress 2 materials.gcf
  4. Navigate inside this GCF to the the directory listed under "VMTs Loaded".
  5. Extract the red team texture files and put them in the same directory as in the GCF - but in the team fortress 2/tf folder. For example, Tough Guy's Toque would use heavy_stocking_cap.vtf and heavy_stocking_cap.vmt, and those files should be placed in: T:\Steam\steamapps\username\team fortress 2\tf\materials\models\player\items\heavy.

Readying Photoshop

  1. Open this file in Photoshop.
  2. Open the .vtf file in Photoshop.
  3. Copy the contents of the texture in to the PSD, above the white background layer.
  4. Back in the texture file, go on to "Channels" and copy over the Alpha channel to the PSD.
  5. In the PSD ctrl+click the thumbnail of the alpha channel, go back into layers and click the group: Tints, and add a layer mask.
  6. Go back into "Channels" and drag the Alpha channel in to the bin.
    This all may seem a bit long-winded, but it's necessary to ensure the where you're painting is aligned perfectly. Copy-pasting the alpha channel sometimes causes the layer mask to be misaligned.
  7. Open up the .VMT file for the texture in a text editor.
  8. Find the line: "$blendtintcoloroverbase"
  9. The value next to that line determines the transparency of your layer mask. "1" would mean the Opacity of the Tints group is 100%. "0.5" would be 50% opacity, and so on. (There may be some exceptions to this, compare with in-game screenshots if possible.)
  10. Save the PSD where the texture files are located, with the same name as the texture file.
  11. Close the .VTF from Photoshop.

Time to get the painted images!

Get the screenshots

  1. (In the PSD) Open up the Tints group and toggle on the first colour: 7D4071.
  2. File... > Save As and change the file type to "VTF", save and overwrite the existing VTF.
    If you've named the PSD correctly, you can do this really fast with keyboard shortcuts: Ctrl-Shift-S, Tab, V, Enter, Enter.
  3. Switch to Model Viewer and hit F5. If you've done everything prcoperly, the texture should update.
  4. Alt-Printscreen the Model Viewer window.
  5. Head back in to Photoshop and Ctrl+N (new file), hit enter and paste the screenshot you just took.
  6. Repeat steps 1 through 4 for all the colours. Do not skip any colours, nor select different layers in the documents for screenshots.

Organise the screenshots

Now you should have screenshots for all of the paint colours. They will be ordered as the colours are in the Tints group.

  1. Ctrl+Tab between the PSD and screenshots document and name each of the screenshots to the colour value of the tint (or some other name that you easily associate with the paint colours, such as orange, rustic, violet).
  2. Once they're all named, select the crop tool and crop the document around the hat.
  3. Select the topmost screenshot (it should be called 141414).
  4. Using the magic wand tool (A tolerance of around 10 seems to provide the best results), select the white background of the hat and hit delete. Make sure to check for islands of white background present that you might not have selected.
  5. Select each of the layers and hit delete (the selection made with the magic wand tool should not go away).

Export the images

  1. Go to File... > Scripts... > Export layers to file and set the destination to wherever you see fit, and the file-type to PNG-8.
  2. Ensure Transparency and Trim layers are both ticked, and hit Run.

Wiki-work!

By now you should have all the images ready to upload to the Wiki... so let's do that!

Implementing the template

  1. Open up the article for the hat you've done the images for.
  2. Hit edit and add the following lines above Trivia:
==Painted variants==
{{Painted variants}}
3. Hit show preview, and the template will be in place. Open in new tabs all of the red links for the images needed to be uploaded.

Uploading the images

For each of the tabs do the following:

  1. Select your image to be uploaded. The file name for the painted images will contain the colour ID that's also listed on the upload page as the file you're uploading, so finding the right image should be easy.
  2. Add the following to the Summary: {{subst:pid}}. No need to select a license, it is done automatically.
  3. Upload the file!

Amend the appropriate pages

Once all the files are uploaded, do the following:

  1. Hit show preview again on the Hat's article, to ensure all images show up.
    If you still have red links then you've missed a file when uploading. Just hit the red link and upload.
    If images aren't showing up then just hit show preview again, they should show up this time.
  2. If all is well, save the Hat's article.
  3. Once you've done the above, open up Template:Painted variants and find the hat you've just done in the table at the bottom of the page, and replace {{c|x|}} with {{c|done|}}.
  4. Show preview to check you've changed the correct item.
  5. Save the table.