Monday, July 27, 2015

Source Sprays with GIMP not Photoshop

No comments :
Across the web are countless tutorials on how to make sprays to be used in Source Engine games like Counter-Strike: Source and the vast majority of them use Adobe’s Photoshop which is not needed, you can use GIMP for free and be legal while using it free.

Valve’s Source Engine has a unique feature in that of player defined art called a spray that can be placed on walls within multiplayer maps.  Sprays can be anything as long as they conform to the maximum image size and are of the .tga file type if importing directly into the game.  The first set of games that supported sprays had more limitations on sizes and were all based on the original Half-Life Engine, although we’ll be focusing on the Source Engine, the successor to the the Half-Life Engine.
Here’s an image of the Source logo. It's been resized to 256 x 256 and contains transparent elements if you'd like to use it for your first run. Just right click and save it to your desktop.

Source Engine games which support sprays:
File sizes (optimal, you can make variants)
  • 256 x 256 (max of any height or width)
  • 128 x 128
  • 32 x 32
  • 16 x 16
I typically open up GIMP (you can download it from the GIMP website for free on any platform) and start with a New File at 256 x 256.  Don’t worry if your image isn't square, sprays can support transparency elements.

I’ll be using a WWII poster to make for use in Day of Defeat: Source but the same spray can be imported into any of the games listed above.

Here is a poster I grabbed off of Google Maps, unedited
I’m going to add in my own edging after I resize the photo, this will make the border look perfect in size all around, since I’ll be shrinking the image, doing a new border after might make the edges look thicker on the bottom versus the top. Always make sure you make it the right size before adding any type of border.

In GIMP, resizing is under Image > Scale Image. Under Image Size make sure the Height and Width is linked (chain looking icon next to each) and change only the largest of the two, this will make sure the other size is correctly proportional and your image looks right.

Now the Texaco logo is gone and I've removed all of the black edging, now it’s time to resize.
I’m going to add in my own edging after I resize the photo, this will make the border look perfect in size all around, since I'll be shrinking the image, doing a new border after might make the edges look thicker on the bottom versus the top. Always make sure you make it the right size before adding any type of border.

In GIMP, resizing is under Image > Scale Image. Under Image Size make sure the Height and Width is linked (chain looking icon next to each) and change only the largest of the two, this will make sure the other size is correctly proportional and your image looks right.

Last edit, now in the correct size with a nice looking border
Now that our image is finished, we simply need to save it and then import it into one of the Source Engine games we want to use it in, I'll be using Day of Defeat: Source.  With GIMP, use File > Export, once the command small window comes up, simply give it a name at the top and name it with a .tga extension, like TakeDayOff.tga, in GIMP you don't have to choose the file extension, it will save it as whatever type you named it. Make sure you remember where you save it, you'll need to browse here within the game to import the image.

The final step with GIMP is critical, when you export the image, it will popup a window a window with an option for RLE Compression, you want to make sure it is unchecked or the game will not be able to import it.

Make sure RLE Compression is unchecked
Now we’re done with GIMP and can simply close everything out and start up the game we want to use our graphic for spraying.

Under Options in the Game, the Multiplayer tab at the top, you’ll find this menu
Once the image is shown as you see above after you Import Spray, you'll see it as your new spray in the game, make sure to hit OK. If you're in a game already, just know that it can take a map change for your spray to update and some servers can disable sprays all together or limit the frequency you can spray.  When you spray the next time, most servers will update your spray location to the new spot, removing the old one.  Be curious with your sprays, offensive sprays can get you banned from private servers and inappropriate sprays on Valve run servers can get you banned from all of Valve run servers and they run a LOT of public servers.

Here’s the Spray in-game
As you can tell if you click to see the full size image above, the spray will lose some quality during import and this is pretty normal.  If when you save the image as a targa file (.tga) there are transparent pixels anywhere, they will be transparent when imported into your game of choice.

*If you've seen this tutorial before it's from a website I used to run BloodSportGaming but finally gave up the domain and reposted it here. I still run the Steam Group.

No comments :

Post a Comment