PDA

View Full Version : Sprays.....etc.



atomicbob
04-19-2005, 01:18 PM
I saw someone spray an animated picture the other day. I thought, cool! So I found me an animated .gif I wanted to use. (A tasteful one of course)

But it would let me upload it. Do .gifs not work? Does anyone know how they did that?

monos
04-19-2005, 01:23 PM
I saw someone spray an animated picture the other day. I thought, cool! So I found me an animated .gif I wanted to use. (A tasteful one of course)

But it would let me upload it. Do .gifs not work? Does anyone know how they did that?

prolly a size issue bob

atomicbob
04-19-2005, 01:32 PM
The old "It's to big" syndrome?

:yaya:

monos
04-19-2005, 01:37 PM
yep just never get tired of hearing it's too big!

The_Professor
04-19-2005, 02:57 PM
Might have been mine, looks like this: http://www.geocities.com/shyperson6969/asspic.gif

Had to look this info up, but I hope this helps!

For regular sprays use step 3.
For transparent sprays use steps 1 and 3.
For animated sprays use steps 2, and 3.

1.)
To get transparency on your spray:
Add an alpha channel in the channels pane in photoshop using the little white document button at the bottom of the channels pane. Select this channel and paste/paint your mask in it. This wont affect your picture, but will effect how it is blended in to the game scene.
This is a grayscale channel where white is where your RGB channels will show up. The black area will be whatever background you sprayed onto. Gray values will be a blend between your spray and the background. You can get some Killer effects with blending.

2.)
Animated Sprays:
This is more complicated, and you will have to use the tools.

There seems to be different versions of these tools on the net. One of the versions doesn't work for making animated sprays. I finally found a version of the tools that do work, and the results are pretty kewl.

PM me w. your email and i will send them to you!
Hopefully i can host the zip somewhere soon.

Unzip the zip somewhere nice.
Then go into the "cs_animated_spray_tools" directory.

To make an animated spray you will have to modify 2 files.
The convert.bat file and the "script" file.
The convert.bat file contains the commandline to run the tools and looks like this:
Code:

vtex.exe -mkdir -shader LightmappedGeneric hl2\materialsrc\animated\spray.txt


where "spray.txt" is the name of YOUR script file.

The script file tells the tool how many and which frames to use for your animation and looks like this:
Code:

"Startframe" "1"
"endframe" "17"



The script file must be named the same name as your first frame of animation, without the number, so if your first frame is called: "mofo001.tga" your script needs to be named mofo.txt.

Note: In the zip, it is confusing because I named my test animation "0" (zero) so my frames look like this:
0001.tga, 0002.tga, etc...

Copy the "script.txt" file in "cs_animated_spray_tools\materialsrc\animated\"
Right click/edit this file in notepad or wordpad.
Change the "Startframe" and "endframe" values to match the number and starting frames you have.
for instance if you have 4 frames , starting with a frame named
"mofo001.tga" and ending with a frame named "mofo004.tga"
Then your script file must be named "mofo.txt" and must contain the following text:
Code:

"Startframe" "1"
"endframe" "4"




Make sure the script file and your animation frames for your animation in the:
"cs_animated_spray_tools\materialsrc\animated\"
directory.


Make a copy of the "convert.bat" file in the "cs_animated_spray_tools" dir,
and call it something else, like "convertMyRadSpray.bat".
There is an example called "unholyconvert.bat" that is set up for my unholy spray.
Right click/edit this file in notepad or wordpad.
Replace the name "spray.txt" with the name of YOUR script, for instance: "mofo.txt"
Save and close, then double click your "convertMyRadSpray.bat" file to run it.
This will generate a .vtf and .vmt file in the "hl2\materials\animated" directory.
These are the spray "texture" and "material" files used by CS.


3.)
Make sure you save this image as a 24 or 32 bit TGA with a power of 2 dimension.
This means that the width and height are the same, and either 32, 64, 128, or 256 pixels high/wide.
This also means square.
For the technically inclined, this *also* means that only 1 bit will be set in the binary representation of either width and height, and that bit will be on of 6th, 7th, 8th, or 9th bit starting with 1.

Then:
If you dont have/want transparency in your image, you can save it as a 24 bit TGA.
If you Do want transparency, save it as a 32 bit TGA.
Other formats work as well, but I prefer TGA cuz its lossless and supports Alpha channels easily.

For a single frame spray, you can just "import" your TGA file from within CS, under options.

For animated sprays, the convert.bat, when run, will generate a .vtf and .vmt file in the "hl2\materials\animated" directory.
Copy these 2 files to your
\Program Files\Valve\Steam\SteamApps\???username???\counter-strike source\cstrike\materials\VGUI\logos
directory.
Then run counterstrike, and the new spray should show up in the list under "options".
It wont animate in the options screen, but should animate in game.

atomicbob
04-19-2005, 04:41 PM
Nope. That wasn't it. But Very nice spray indded!!

The one I saw was from a sick twisted, immature mind and shouldn't even be legal, let alone tolerated.

All that aside, dude, them is some good instructions. Ya gotta remember when it come to such things, I am very stupid.

But I ain't scared either.

I'll shoot you a PM.

atomicbob
04-19-2005, 05:21 PM
I really like monos' answer better.

I think I just want to make it smaller and then just click the button. LOL

But I'm impressed more every day by the level of skills the people here have. What a huge resource!

Myself, I have a brand new wireless router that's been sitting in the box for a year because I don't know how to mess with my IP address.

:crazy:

I'm your basic idiot.

Decaff
04-19-2005, 05:26 PM
this site has essentially the same instructions listed above. I've used the directions and tools provided and had good results. Takes a little trial and error sometimes to get the size right, but it does work.

http://www.planethalflife.com/counterspray/sourcetutorial.htm

you can also download some of theirs, the demon one is cool i think

atomicbob
04-19-2005, 05:33 PM
Well, I don't have no girly butts to use. I'm just trying to use this one.

http://www.atomicbobs.com/uploads/eyeflash.gif

I have a few others I find humorous enough to be worthy of an Atomic Bob spray and hope I can find something simple enough to switch them regularly.

Thanks for the link!

Decaff
04-19-2005, 05:39 PM
To take an animated gif and pull apart the frames to convert them and etc you'll need something to do that. I don't have any fance Adobe software, but I did find this free one
http://www.xoyosoft.com/gs/
this app will save each individual frame, which you can take those frames and follow the directions for the link I provided.

Tykwer
01-31-2006, 11:34 PM
I want to use a .gif as a spray, but css doesnt recognize that format. I used an image converter and changed it to a .jpg, but when i attempt to import the converted image, the game shuts down.
what ever shall i do?

edit: i tried converting to a bmp and it said "corrupt image".

maybe i need a better image converter? if so i'd need a good free one. otherwise wtf? :dunno:

wihadmin
02-27-2006, 04:23 PM
I've enabled spray uploads to the server in-game. So use your custom sprays and it should upload to server. I'll leave this enabled for a week or two so that you guys can get your new sprays online.

godkyle
02-27-2006, 06:06 PM
where do you find these? ive always wonted one

Tykwer
02-27-2006, 06:20 PM
I've enabled spray uploads to the server in-game. So use your custom sprays and it should upload to server. I'll leave this enabled for a week or two so that you guys can get your new sprays online.


finally! YAHOOOOOOOO! thanks :thumbsup: