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

From Team Fortress Wiki
Jump to: navigation, search
(Undo edit by Smashman (Talk) (548878); Don't just blank this without even checking -_- ... my DLLs and HLMV work just fine.)
(I checked. The new dlls do not work. If you have old dlls, that's another matter.)
Line 1: Line 1:
 
{{DISPLAYTITLE:Painted variants (tutorial)}}
 
{{DISPLAYTITLE:Painted variants (tutorial)}}
This tutorial will document the current method of painting hats using HLMV.
+
{{ambox|image=Warning_blue.png|contents=The tutorial that was previously shown here no longer works.}}
 
 
== Setting up HLMV ==
 
We want the images to be the best quality possible, so 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.
 
 
 
=== DLL Support ===
 
Instead of modifying VTF files, we can set up HLMV to correctly interpret newer VMT files and modify them directly, allowing us to have fully accurate representation of colors. To support this in-model viewer representation of paint, some SDK DLLs need updating:
 
# Run TF2 to ensure the correct binaries are updated prior to copying.
 
# Copy the contents of this directory <code>T:\Steam\steamapps\username\team fortress 2\bin</code> to this one <code>T:\Steam\steamapps\username\sourcesdk\bin\orangebox\bin</code>, overwriting where necessary.
 
 
 
=== <code>Dxsupport.cfg</code> ===
 
# Navigate to this directory <code>T:\Steam\steamapps\username\sourcesdk\bin\orangebox\bin</code> (where <code>T:\</code> the folder your Steam folder resides in).
 
# Open up <code>Dxsupport.cfg</code> in a text editor of your choice.  If you do not have this file, create it with [http://pastebin.com/8AsEWL19 this content].
 
# Find your graphics card within that file, if it is not listed go to the bottom and use <code>ATI Unknown</code> or <code>NVidia Unknown</code> depending on your graphics card manufacturer.
 
# Add or modify the following lines in <code>Dxsupport.cfg</code> - within the section for your graphics card, and save it.
 
<pre>"DxLevel" "99"
 
"ConVar.mat_antialias" "8"
 
"ConVar.mat_forceaniso" "8"
 
"ConVar.mat_picmip" "-10"</pre>
 
: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.
 
 
 
=== HLMV Options ===
 
# Open up Model Viewer via the Source SDK.
 
# Check (if it's not already checked) the <code>Normal Mapping</code> checkbox.
 
# Set the background colour to white for each item: <code>Options... > Background Color...</code>
 
# Full-screen HLMV (so you get a nice big image).
 
# 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.
 
 
 
== Modify VMT Files ==
 
{| class="wikitable grid" style="float: right;"
 
! class="header" | Name
 
! class="header" | Color
 
! class=header | {R G B}
 
|-
 
| A Deep Commitment to Purple
 
| style="background:#7D4071" | <font color="white">#7D4071</font>
 
| {125 64 113}
 
|-
 
| Aged Moustache Grey
 
| style="background:#7E7E7E" | #7E7E7E
 
| {126 126 126}
 
|-
 
| [[Australium]] Gold
 
| style="background:#E7B53B" | #E7B53B
 
| {231 181 59}
 
|-
 
| Color No. 216-190-216
 
| style="background:#D8BED8" | #D8BED8
 
| {216 190 216}
 
|-
 
| Indubitably Green
 
| style="background:#729E42" | #729E42
 
| {114 158 66}
 
|-
 
| [[Mann Co.]] Orange
 
| style="background:#CF7336" | #CF7336
 
| {207 115 54}
 
|-
 
| Muskelmannbraun
 
| style="background:#A57545" | #A57545
 
| {165 117 69}
 
|-
 
| Noble Hatter's Violet
 
| style="background:#51384A" | <font color="white">#51384A</font>
 
| {81 56 74}
 
|-
 
| Peculiarly Drab Tincture
 
| style="background:#C5AF91" | #C5AF91
 
| {197 175 145}
 
|-
 
| [[Radigan Conagher]] Brown
 
| style="background:#694D3A" | #694D3A
 
| {105 77 58}
 
|-
 
| Ye Olde Rustic Color
 
| style="background:#7C6C57" | #7C6C57
 
| {124 108 87}
 
|-
 
| [[Non-player characters#Zepheniah Mann and Company|Zephaniah]]'s Greed
 
| style="background:#424F3B" | #424F3B
 
| {66 79 59}
 
|-
 
| An Extraordinary Abundance of Tinge
 
| style="background:#E6E6E6" | #E6E6E6
 
| {230 230 230}
 
|-
 
| A Distinctive Lack of Hue
 
| style="background:#141414" | <font color="white">#141414</font>
 
| {20 20 20}
 
|-
 
| Pink as Hell
 
| style="background:#FF69B4" | #FF69B4
 
| {255 105 180}
 
|-
 
| A Color Similar to Slate
 
| style="background:#2F4F4F" | #2F4F4F
 
| {47 79 79}
 
|-
 
| Drably Olive
 
| style="background:#808000" | #808000
 
| {128 128 0}
 
|-
 
| The Bitter Taste of Defeat and Lime
 
| style="background:#32CD32" | #32CD32
 
| {50 205 50}
 
|-
 
| The Color of a Gentlemann's Business Pants
 
| style="background:#F0E68C" | #F0E68C
 
| {240 230 140}
 
|-
 
| Dark Salmon Injustice
 
| style="background:#E9967A" | #E9967A
 
| {233 150 122}
 
|-
 
| Team Spirit (RED)
 
| style="background:#B8383B" | #B8383B
 
| {184 56 59}
 
|-
 
| Team Spirit (BLU)
 
| style="background:#5885A2" | #5885A2
 
| {88 133 162}
 
|}
 
 
 
=== VMT Editing ===
 
# Open <code>team fortress 2 materials.gcf</code> in GCFScape.
 
# Extract the relevant VMT to the right place. For example, Tough Guy's Toque would use <code>\tf\materials\models\player\items\heavy\heavy_stocking_cap.vmt</code>, and should be extracted to: <code>T:\Steam\steamapps\username\team fortress 2\tf\materials\models\player\items\heavy</code>.
 
# Open the VMT file in VTFEdit or any text editor, and position the camera in HLMV to take screenshots.
 
# Near the top of the VMT, change <code>"$detailblendfactor" .01</code> to <code>"$detailblendfactor" .00</code>. This removes the faint fire overlay (most noticeable on black painted items).
 
# Create a new line in the VMT file underneath <code>"$colortint_base" "{VALUE}"</code> and fill it with this content <code>"$color2" "{R G B}"</code>.  You can find a complete list of colours to copy/paste below.
 
# Paste the relevant RGB value found in the table to the right.
 
# Hit F5 in HLMV and take a screenshot of this color, and paste it in a Photoshop document.
 
# Repeat steps 5-6 for each color.
 
 
 
<pre>
 
// Uncomment and re-comment as necessary.
 
//"$color2" "{}"            // Stock - Copy the value of "$colortint_base" into here.
 
//"$color2" "{233 150 122}" // Dark Salmon Injustice
 
//"$color2" "{207 115 54}"  // Mann Co. Orange
 
//"$color2" "{240 230 140}" // The Color of a Gentlemann's Business Pants
 
//"$color2" "{231 181 59}"  // Australium Gold
 
//"$color2" "{50 205 50}"  // The Bitter Taste of Defeat and Lime
 
//"$color2" "{114 158 66}"  // Indubitably Green
 
//"$color2" "{128 128 0}"  // Drably Olive
 
//"$color2" "{66 79 59}"    // Zephaniah's Greed
 
//"$color2" "{47 79 79}"    // A Color Similar to Slate
 
//"$color2" "{216 190 216}" // Color No. 216-190-216
 
//"$color2" "{255 105 180}" // Pink as Hell
 
//"$color2" "{125 64 113}"  // A Deep Commitment to Purple
 
//"$color2" "{81 56 74}"    // Noble Hatter's Violet
 
//"$color2" "{230 230 230}" // An Extraordinary Abundance of Tinge
 
//"$color2" "{197 175 145}" // Peculiarly Drab Tincture
 
//"$color2" "{165 117 69}"  // Muskelmannbraun
 
//"$color2" "{126 126 126}" // Aged Moustache Grey
 
//"$color2" "{124 108 87}"  // Ye Olde Rustic Color
 
//"$color2" "{105 77 58}"  // Radigan Conagher Brown
 
//"$color2" "{20 20 20}"    // A Distinctive Lack of Hue
 
//"$color2" "{184 56 59}"  // Team Spirit (RED)
 
//"$color2" "{88 133 162}"  // Team Spirit (BLU)
 
</pre>
 
 
 
=== Export and upload the images ===
 
# Go to <code>File... > Scripts... > Export layers to file</code> and set the destination to wherever you see fit, and the file-type to PNG-8.
 
# Ensure <code>Transparency</code> and <code>Trim layers</code> are both ticked, and hit <code>Run</code>.
 
# Upload a new version of the existing files on the Wiki. Use one of the following codes in the upload summary box to automatically add licensing and proper categories (this saves you from typing out categories or manually selecting a license in the drop down box).
 
#*{{tlx|subst=yes|pid}} for hats.
 
#*{{tlx|subst=yes|pid|misc}} for misc items.
 
 
 
=== Amend the appropriate pages ===
 
Once all the files are uploaded, go to [[Template:Painted_items]] and add {{code|1={{!}}updated=y}} to the row template for that item. You're officially done!
 
 
 
== Note ==
 
The new DLLs will mean most items will appear washed out in the model viewer. In order to fix this (for Vanilla screenshots) change the {{code|"$color2"}} value to the same value as {{code|"$colortint_base"}} and F5.
 

Revision as of 18:10, 9 June 2011