In order to make your spray animate it has to fit within the size restrictions. The full GIF cannot exceed 512 KB so this means a GIF such as the one we are using will be far too large. It also has to be either:
- 512 by 512 pixels (This size is not recommended for animated sprays)
- 256 by 256 pixels
- 128 by 128 pixels
Because we want to make it as small as possible we are going to be using 128 by 128 pixels.
Open up Photoshop and navigate to File > Open
and select your GIF. You will notice that when Photoshop opens the file it will pull up each frame of the GIF on its own separate layer, which is really handy for editing it down.
The resolution of the GIF right now is 499 by 281 pixels
. In order for it to work in TF2 we will need to change that to one of the sizes listed above. Seeing as all of the interest in the image is on the penguin I am going to create a new canvas by going to File > New
and setting the height and width to 128 by 128 pixels
Open up the original image and the new smaller canvas side by side. Select every layer on the original image so they are all highlighted in blue, and then drag and drop the layers on to the smaller canvas.
With every layer selected on our new 128 by 128 pixel
image, select the Move tool
and make sure you have Show Transform Controls
turned on located on the top bar.
Grab one of the corners and hold down Shift
on your keyboard. This will keep the image constrained perfectly so it's impossible to make it look squished or deformed.
This is what mine looks like at this point.
We now have a 128 by 128 pixel
image loaded in Photoshop with every frame we need to create a loop. In order for it to fit the size requirements we will need to shorten the loop, which is what we will be doing in the next section.