Tutorial: How to make a working spraypaint in 5 minutes

pixartist

Newbie
Joined
Jul 23, 2003
Messages
1,009
Reaction score
0
Tutorial: How to make a working spraypaint in 3 minutes

This is a tutorial how to make spraypaints with transparency! I made this because this: http://www.raiden.se/spraytut/ makes it more complicated as it could be(you DO NOT need alpha channels). I use Photoshop for this tutorial(german version).

LIMIT for spraypaints is 130kb. So I am always using 256x256 pixels.
Size of the image (height&width) has to be power of 2...

2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
2^6 = 64
2^7 = 128
2^8 = 256
2^9 = 512
2^10 = 1024

now...lets start:

Create a new image, with a transparent background:

tut1.jpg

After that, paste your image ( if your image is too big, resize it before pasting it here of course!):
tut2.jpg


Now you can cut out what you do not want:
tut3.jpg

->
tut4.jpg


If you do not already have it, download tga2vtf:
http://www.pixartist.de/hl2/vtex.rar
Extract it anywhere but not into the css folder, because it wont work with an @ in the file adress (remember the email-adress in the steam folder)
Save your image to
???\vtex\hl2\materialsrc\sprays
with 32bit and uncompressed.
Now start tga2vtf.bat...

The spraypaint file will be in
???\vtex\hl2\materials\sprays

Copy the vmt and vtf file and paste them into
???\steamfolder\SteamApps\[email protected]\counter-strike source beta\cstrike\materials\VGUI\logos

Now run css, the spraypaint should be in the list and work online!

have fun ;)
 
i have photoshop le and i was wondering how the hell do u save it to .tga file? when i go to save as it has no .tga extension
 
That method does NOT make it transparent. AFAIK you DO need alpha channels. It' complex, but it works. With your method, photoshop automatically gives it a white background, which may make it transparent on a white webpage, but not in CS:S :|

i have photoshop le and i was wondering how the hell do u save it to .tga file? when i go to save as it has no .tga extension

I had this problem too. When you make a new layer, are you making it 16 bit? For some reason, the layer has to be 8 bit RGB to be able to save as a TGA. :thumbs:
 
Actual it does work, atlest for photoshop 7.0. I have a large number of (err adult) sprays to prove it.
 
Mad Dog said:
That method does NOT make it transparent. AFAIK you DO need alpha channels. It' complex, but it works. With your method, photoshop automatically gives it a white background, which may make it transparent on a white webpage, but not in CS:S :|



I had this problem too. When you make a new layer, are you making it 16 bit? For some reason, the layer has to be 8 bit RGB to be able to save as a TGA. :thumbs:

oh well, for me it works...i have photoshop 7
i do it as it's described and it works...i dont have to reduce colors or so...
 
The diffrence is in how you save it. 24-bit will not save the transparent background but 32-bit will save it (just tested).
 
Grand Architect said:
The diffrence is in how you save it. 24-bit will not save the transparent background but 32-bit will save it (just tested).

Yeah, it works :cheese:
 
Wow, this is so much easier, and it works too. I could never get the other one to. Thanks!
 
Ok, I guess that problem is on my end, I'm using Photoshop CS. When it saves as TGA, it automatically makes the background white. What is different between PS7 and PSCS that would cause this? Anyone else here using PSCS have this problem?
 
Can some1 turn this photoshop image into a transparent spary? I have paintshop pro and I cant save 32 bit TGAs.
 
The Terminator said:
I thought in the new update they changed the max from 256 to 128.

NOOOOOOOOOOOOOOOOOOOOOOOOOOO
THEY DID NEVER CHANGE IT TO ANY SIZE !!!!!!!! THERES ONLY ONE LIMIT!!!!!!!!! 130 KB!!!!!!!!

****....this is the 680th time i say that :frown:
 
pixartist said:
NOOOOOOOOOOOOOOOOOOOOOOOOOOO
THEY DID NEVER CHANGE IT TO ANY SIZE !!!!!!!! THERES ONLY ONE LIMIT!!!!!!!!! 130 KB!!!!!!!!

****....this is the 680th time i say that :frown:
Which size is the one that matters?

The size of the TGA file or the size of the files that are created after converting?
 
Nice work, I made my spray extremely fast. Yes, it does make the image transparent... as long as you have Photoshop 7. One quick question: Is it possible to make a 1024x1024 image as long as it fits the 130kb requirement?
 
yep..but i dont know how you would do a 1024x1024 image with <130 kb oO
 
pixartist said:
yep..but i dont know how you would do a 1024x1024 image with <130 kb oO
as i said
Which size is the one that matters?

The size of the TGA file or the size of the files that are created after converting?
 
pixartist said:
after converting of course
well wasn't so obvious to me...sorry. thats good news cause it was like 250+ in TGA format and only 86 in the VMT or whatever the extension is
 
pixartist said:
32 bit 32!!!!! BIT!!!!! WAAAAAHHH
This doesn't help me, not even when it's in ALL CAPS. Assume for a minute that I followed your steps to the letter, INCLUDING SAVING IN 32 BIT(!!!), but I'm using Photoshop CS instead of PS7. When you use this method in CS, you get a white background, not a transparent image. What's changed from 7 to CS in regards to transparencies?

If someone finds an easier way to do this in CS, PLEASE SHARE. Otherwise, the abe2000 tutorial will have to do.

Incidentally, here's my results:
http://img62.exs.cx/img62/9853/pwnage1.jpg
 
dammit, i can't get mine to show on the list. any ideas?
 
Then what does this say? I think you can have bigger sprays but YOU will be the only one to see it. Others will see sprays that are 128x128 or less.


Counter-Strike Source Beta Update Released
August 20, 2004, 7:04 pm · cliffe

An update to the Counter-Strike: Source beta has just been released. Steam will update itself automatically when you restart. Here is a list of the changes:

COUNTER-STRIKE: SOURCE BETA CHANGES / ADDITIONS:
Optimal refresh rate is now autodetected from the list of available....
............
Limited sprays to 128 by 128 pixels <- <- <- <- <-
 
Hey all, I'm new to this forum. :cheers: I've been reading through here for the past week or so and just got around to signing up. I'm havin the same problem as the other guy, I've got Paint Shop Pro and can't save as a 32 bit tga... can someone do it for me? If you even have an extra minute, maybe go as far as running the bat and changing it to a vtm and a vtf? Thanks a bunch. :E
 
Here you go, hope this is how you wanted it :imu:

PS: next time make the areas you want removed another color so its easier to spot and remove :cheers:
 
Farfege said:
Then what does this say? I think you can have bigger sprays but YOU will be the only one to see it. Others will see sprays that are 128x128 or less.


Counter-Strike Source Beta Update Released
August 20, 2004, 7:04 pm · cliffe

An update to the Counter-Strike: Source beta has just been released. Steam will update itself automatically when you restart. Here is a list of the changes:

COUNTER-STRIKE: SOURCE BETA CHANGES / ADDITIONS:
Optimal refresh rate is now autodetected from the list of available....
............
Limited sprays to 128 by 128 pixels <- <- <- <- <-

abe2000 posted a e-mail from Cliffe in his tut thread with a correction to 130kb which must be true as it works fine for me.
 
Im having problems with making Spray Paints for CSS i can get it to work but my image is not transparent it has a white background. I even click transparent for a background but i still get it any clue why?
Im using Photoshop CS is that helps.
 
Slayertime said:
Im having problems with making Spray Paints for CSS i can get it to work but my image is not transparent it has a white background. I even click transparent for a background but i still get it any clue why?
Im using Photoshop CS is that helps.


Same here, the "5 minute tutorial" doesn't work in CS, only PS7 from what I've heard so far. The abe2000 method works for me, but for Photoshop CS there's a few extra steps or clarifications he may need. I'll tell you what I do to get it to work:

1). I generally work with cutouts vs freehand stuff, so I have like different layers of everything like all over the drawing board. When I'm done with the image I want, I drag it all into one transparent 8bit rgb layer(for some reason, it has to be 8bit for CS to want to save it as TGA, don't ask me). What's currently in this window is what I want to see in-game. Close all the other images you don't need, click on the window with your final image and MERGE the layers into one(top toolbar->Layer->Merge Visible)
I usually use 256x256 for my main image window.

2). Now that the layers are merged into one, this method requires you to add a fill layer. Do this by highlighting your image window, go to the Layer tab at the top, and select New Fill Layer-> Solid Color. Name it whatever you want, but make sure the other settings are unchanged(ie: unchecked box, color:NONE, mode:Normal, Opacity:100%) Click OK and a color window will pop up. For R, G, and B enter 128 in each of the boxes. Click OK, and your image will turn grey. Now, on the right hand side, below the navigator is the Layers window(F7 to toggle). Click and drag that fill layer you just made below your main image layer and BAM, your image is superimposed on a grey background.

3). Now you need to make a duplicate image of your logo. Click on the title bar bar of your image to highlight it, go to the Layer tab at the top, select Duplicate. When the window pops up, name it like copy or something and select New in the Doccument dropbox. This should create a dupe of your original image with no background.

4). Click the title bar of the duplicated image to highlight it, and go to the Layer tab at the top. Layer Style->Blending options(alternately, you can right click on the layer in the the small window on the right to get here). In the blending options window, there's a bunch of checkboxes. Check the one called Color Overlay. Now, double-click the actual word "Color Overlay." This should simplify the center of the window to Blend Mode, Opacity, and a color square that's red by default. Click the color square and change the values for R, G, and B to 255. Click OK, and your image should become like a white blur on a transparent background.

5). On the tool bar to the left, with the brushes and magic lasso and what not, there's two color windows. I'm not sure which one really effects this next step, so I set them both to Black (0,0,0). Once that's done, Click the blurry white dupe image title bar to highlight it, then go to Layer->New->Layer From Background. This should make a white dupe image on a black background, all on one layer. Ctrl-A to select all then Ctrl-C to copy the dupe image into your cache.

6). Higlight the ORIGINAL image(with the grey background), go to the Layer window on the right(F7 toggles), and click the Channel tab. There should be 4 channels: RGB, Red, Green, and Blue. At the bottom of that window are 4 icons. 3rd from the left is "Create new channel." Click that to make an Alpha Channel, and the main image you're working on will go black.

7). Highlight the title bar of your main image, go to Edit at the top, and select "Paste." This should put that black-on-white image you copied from the dupe image in your alpha channel. It's possible that during the course of this excercise that you have moved one or more of the other images around in the window and they have become misaligned. If that's the case, now's the time to correct that. If everything's cool, click File, Save as, select TGA, 32 bit, no compression.

8). Throw it in the vtex\hl2\materialsrc\sprays folder, run the tga2vtf batch proggy, then get your vtf and vmt from the \vtex\hl2\materials\sprays folder. Drop that into your counter-strike source beta\cstrike\materials\VGUI\logos folder and you're ready to go. My vtf's usually come out to 86k at 256x256.


This all seems complex to PS7 users, but until someone finds a simpler method on Photoshop CS I'm sticking with this. Once you do it 3 times or so it becomes second nature.

Here's one I made for a buddy:
http://img33.exs.cx/img33/2812/ghostspray2.jpg
 
doesnt ps cs save transparent areas as alpha channels in tgas? thats sick...ps 7 rulz ^^
 
I've done the impossible, according to someone here who swears by Photoshop CS yet can't seem to get his spray working with this method. I've gone from CS back to 7. 7 owns me. Period. Excellent work with this tut.
 
Mad Dog, good tutorial there, but I think u cud simplify it quite a lot... when you make an alpha layer in photoshop you don't need to remove the colour information (whch is what steps 2 to 6 seem to do in your tutorial...

The same alpha layer can be achieved by simply merging your whole image, CTRL+A to select everything, copy and paste it into a new alpha layer.. :)
 
having said that, i still cant get it to work even following your instructions! :(
 
Back
Top