Animated Spray Tutorial www.TheVille.org


Gen.Ben
04-01-2007, 09:54 PM
www.TheVille.org Come play on our servers!
Okay guys, I know a handful of people who requested on how I made my animated spray. This spray works on CS:S and DOD:S
Well here is how..

I use photoshop CS2, but similar freeware programs such as the GIMP can be used as well.

1) Make, Or get the images of choice you want to be in your spray. As you can see I took pictures of my disk tray opening... A simple yet funny spray!
You must make sure your images are 128x128 in size, or any acceptable dimensions with an area less than or equal to 128x128.

http://i7.photobucket.com/albums/y298/benkipper/1.png

2) This is extremely important. Save your images as 32 bit .TGA's named spray001.tga , spray002.tga..etc. MAKE SURE THEY ARE IN CORRECT ORDER. For this tutorial i have 3 images, so they are subsequently saved as spray001.tga, spray002.tga and spray003.tga.
http://i7.photobucket.com/albums/y298/benkipper/2.png

3) You will need this program: Animated Texture Converter, Download it here http://www.freewebs.com/bensfilebucket/new%5Fworking%5Fvtex.zip (if link doesn't work, copy and paste it into new internet window) . Unzip the contents of the download. Now, copy and paste your spray TGA's into the: new_working_vtex\hl2\materialsrc\animated folder. You will see a .TXT document in that folder also. You need to open this and change the last line "End Frame" number to the number of frames of animation you have. For this tutorial i have 3 images, so my number will be "3".

http://i7.photobucket.com/albums/y298/benkipper/3.png
http://i7.photobucket.com/albums/y298/benkipper/4.png

Now save the text file

4) Now go back a few folders to your new_working_vtex folder and click on convert.bat. You should see something similar to the following:
http://i7.photobucket.com/albums/y298/benkipper/5.png

5) Now go to your "new_working_vtex\hl2\materials\animated\" folder. You should see 2 files: spray.vmt and spray.vtf. THE FILE SIZE OF YOUR .VTF FILE MUST BE UNDER 120kb or your spray WILL NOT work. If you kept your dimensions to 128x128 or equivelent as stated in step 1, you should be fine.

http://i7.photobucket.com/albums/y298/benkipper/6.png

Now, you must open the spray.vmt file. This can be opened in NOTEPAD. here is how..

http://i7.photobucket.com/albums/y298/benkipper/7.png

http://i7.photobucket.com/albums/y298/benkipper/8.png

http://i7.photobucket.com/albums/y298/benkipper/9.png

Then Click OK.

When it is opened you will see the following:


"LightmappedGeneric"
{
_"$baseTexture" "animated/spray"
}


Now erase all of that and copy and paste this in its place


"LightmappedGeneric"
{
"$basetexture" "vgui/logos/gabedance"
"$decal" "1"
"$decalscale" "1"

}



http://i7.photobucket.com/albums/y298/benkipper/10.png
http://i7.photobucket.com/albums/y298/benkipper/11.png

6) Now save it. At this point you should have 2 files. The spray.vtf file and your code modified spray.vmt file.

It is now safe to rename these files to distinguish among other custom sprays. They MUST have the same name though. So I will rename mine: DiskTray.vmt and DiskTray.vtf

7) Copy and Paste these files into the root of your hard drive for simple acess, in my case its Drive (D:/) On your computer it is probally Drive (C:/)

http://i7.photobucket.com/albums/y298/benkipper/12.png

8 ) Load up Day of Defeat: Source or Counter Strike: Source

On the main menu click Options and then click the Import Spray button

You will get this

http://i7.photobucket.com/albums/y298/benkipper/13.png

In the drop down menu, Click the Drive letter you pasted the files into (in my case Drive D:/)

Click the YOURFILE.vtf then click ok

http://i7.photobucket.com/albums/y298/benkipper/14.png

Restart your computer!

Load up The game you have the spray on, Join a room..... And test it out!

Here is the final product:

http://i7.photobucket.com/albums/y298/benkipper/Sprayinaction.gif



If anything here is not clear, Please ask me and I will point you in the right direction.

Thanks everybody and enjoy!

http://www.theville.org/viewtopic.php?t=1764

l3eeron
04-02-2007, 01:13 PM
w00t!

nice tut Ben


Im sure Ill have a couple questions... see ya on TV1!

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.