Team Fortress 2

Team Fortress 2

43 ratings
Creating backpack icons with TFMV & Photoshop for workshop items
By neodos
Easily take screenshots and create backpack icons with TFMV for your workshop items.

Why use TFMV and HLMV?

TFMV allows you to load workshop compiled items (or .VPK .MDL .QC) and automatically setups and loads the model(s) in HLMV without having to do any silly registry edit or copy/edit a single file.

HLMV allows you to have more control to take a screenshot of your item (FOV, camera, background color, ambient light etc).
   
Award
Favorite
Favorited
Unfavorite
Loading an item in TFMV
Before we start, if you are not familiar with the tool TFMV you can download it and check the guide here.

Loading the model in TFMV
You can load workshop compiled (.zip files) into TFMV by click the blue "workshop" button next to the list of TF2 player classes.
It should load a list of your workshop items that you can double click to add to the loadout and into HLMV.

In this case, we want most likely need to load the model alone to create the backpack icon, so add the item to the loadout, select it, and then click the arrow on the left, that should put the item as the main model instead of the player model:



Click "Loadout to HLMV" to launch HLMV with the model.
Taking screenshots
Setting the FOV

Once you have your item loaded in HLMV, you might want to change the camera FOV(Field of View) setting to get a better shot.

By default the FOV is too large, for a backpack icon, an FOV around 25 to 40 would be more suitable.

Setting HLMV windows size

Since backpack icons images are a square, we should set the HLMV window to a proper scale.

In TFVM open the advanced settings tab by clicking Advanced Settings or the button [>>].
Next set the values under "Set HLMV window size" to 512x512 and click "Set HLMV window size"



HLMV's windows should be set for taking square screenshots of your item:


Taking screenshots for backpack icon

Now that the item is loaded and the HLMV size set to square proportions, we just need to take two screenshots.
One with a black background and a second with a white background, this will help creating the transparency mask we need for the backpack icon.

In HLMV set the background color to black: Options > Background Color...
Select the TFMV window and press F5 to take a screenshot.

In HLMV set the background color to white: Options > Background Color...
Select the TFMV window and press F5 to take a screenshot.

Go to the TFMV screenshots directory: Settings > Screenshots Directory > Browse

You should find the two screenshots:





Finishing the backpack icon in Photoshop
I have created a TF2 backpack icon template PSD file for creating backpack icons, it has rulers and a few top layers to delimit the zone of the icon which should be black.



Open up the PSD in photoshop:



You can press CTRL + H to show/hide the blue rulers, these are simply there to delimit the area in which your item's screenshot should fit, in the center.

Loading and placing the icon

Backpack icons contain the icon color image in the RGB channel, the transparency for the icon is defined by the Alpha channel, we need to create it.

Load the two screenshots in Photoshop and add them in the template PSD layer's:


Make sure both layers are aligned and that they are betwen the background layer and the "bounds" group.

Select both layers of the white and black background screenshots.
Use the move tool (V) and the transform tool (CTRL + T) to move and scale the icon so it fits properly in the center without going out of the bounds.

Creating the transparency mask

Once you have placed your icon properly we can create the alpha, at this point you should no longer move or scale any layer!

Duplicate the layer of the screenshot with black background and disable its visibility, we will need it later.

In order to create the alpha mask, select the screenshots layer that's on top in the layers list and set its layer blending mode to "difference".

You should get a black and white image:



Now select both layers (white/black background screenshots).
Merge the two selected layers: CTRL + E
You might need to invert the image colors depending in which order you had the layers, if so press CTRL + I to invert the colors (the item should be in white = visible, in alpha black = transparent)

And here is our alpha mask! you should get this:

Now we just need to fill the empty space around it.
Create a layer below and fill it with black, select the mask and the black layer and merge them.

There's a catch here!
The TF2 item importer does not like left over non-black pixels, so we need to do a little cleanup.

You might notice (in the previous image) that there's some brighter pixels on the edges of the mask layer even after we merged it with a black layer.

In order to fix this, use a black brush with the color set to black and paint over to get rid of these non black edges, you should get this:


That's it, we have our Alpha mask for transparency! =)

Now we need to copy this to the Alpha channel.
While having the black and white mask layer selected, press CTRL + A to select all and then CTRL + C to copy.
Next go to the "Layers" and select the "Channels" tab.
Select the "Alpha" layer and hit CTRL + V to paste the alpha mask in the alpha channel.


Select the RGB Channel.
Return to the Layers tab.
Select the hidden layer with the screenshot of the item in color with a black background and make it visible.

Finally we just need to flatten the image.
In the menu Layer > Flatten Image.


File > Save as...
Make sure you have the "Alpha Channels" checked:


Next you will get a popup, make sure you have these settings:




Done!
Your backpack icon is saved in TGA, ready to be used with the TF2 importer.



11 Comments
ressy.exe 26 Apr, 2024 @ 2:00am 
mine just says "Load Failed" i want to fuckin die
SINFUL CREATURE 28 Nov, 2017 @ 2:16am 
In GIMP, you can edit an alpha mask to recreate these results.
neodos  [author] 5 Oct, 2015 @ 3:05pm 
I don't use gimp so you'll have to figure it out, but its most likely possible to do this on gimp as well.
Count Scaphandre 5 Oct, 2015 @ 2:57pm 
I don't have Photoshop. How can I do this in GIMP?
mrlol 10 Mar, 2015 @ 8:33am 
i haven't photoshop(((((( can i do it in paint.net?
Vipes 1 May, 2014 @ 6:46am 
I'm guessing it's supposed to be common knowledge, as no tutorial has ever told me this. Thanks very much.
neodos  [author] 1 May, 2014 @ 6:45am 
Yeah that's just how the HLMV camera works, you'll need to export the item mesh at the center of the scene and recompile it as a model just for the backpack icon.
Vipes 1 May, 2014 @ 6:34am 
I have a small problem, when I load items without a playermodel, they are in a position that is impossible to move out of so I can take a picture of.
[T9k] MoleManMike 24 Feb, 2014 @ 2:53pm 
can you tell me how to make a BP icon in Paint.net? i cant get Photoshop
Encounter [2] 22 Dec, 2013 @ 7:01am 
nice