banner



How To Set Up A Spray In Tf2

This trivial tutorial volition encompass making custom TF2 sprays. How to make a static spray, a transparent spray, and animated sprays.

First, to give credit where credit is due. I constitute the information on making sprays from a few blogs/sites. Unfortunately, at that place was no comprehensive information for dealing with transparency and animation then this commodity y'all are reading now attempts to bring it all together in one place. Here are the direct links to the articles I used as a base:

  • – "Create Squad Fortress 2 Sprays" @ www.ghacks.net
  • – "TF2 Custom Spray Image with Transparency" @ denyerec.co.uk

    – "Create Animated Sprays in Team Fortress ii and Counter-Strike" @ www.maximumpc.com

Tools you will need:
  • – An image editing utility like Adobe'southward Photoshop ($$$) or gimp (Free!). The tool must supporting saving to TGA (Targa) file-format and must support Blastoff channels (for transparency)
  • – VTFEdit (5.ane.two.v Full seems to be the latest though it was release on nine/xiv/2007, likewise requires the .Net 2.0 Runtime and the Microsoft Visual C++ 2005 SP1 runtime too, which likely your computer already has)
A annotation on Spray Image Resolutions and Spray file sizes:

Resolution: Sprays resolution maximum is: 256 x 256 pixels
They can be smaller, but they can't be larger! If they are larger the 256 in either width or height, the spray simply will not evidence.

File Size: Currently the Source Engine (the Valve game platform that Team Fortress 2 is built on) has a file size limit for sprays of 120 KB do not exceed that or the spray will but not piece of work. This usually isn't an issue with Non-Animated sprays, simply Animated ones use ane image per frame so you lot're probably not going to get more 4 or 5 frames with a resolution of 128 x 128 (note that is smaller then the largest supported spray resolution, we choose that to allow for more frames.)

In all cases, when we import images into VTFEdit, they are re-sampled to marshal to a resolution that is a ability of two, this is due to the rendering engine and an optimization for faster and easier rendering. Suffice it to say. the engine just needs them that way. VTFEdit gives you a drop-down box to give you further control. It defaults to "Nearest Power of 2" but there are options for "Smallest Ability of ii" and "Largest Ability of two".

During the import, VTFEdit looks at the dimensions of the image, for an example, allow's say our image is 220 x 220. If the paradigm'due south dimensions do not align to a power of two in both their 10 and Y dimensions, VTFEdit figures out the next largest and next smallest fifty-fifty power of ii to marshal to and re-samples the paradigm to these new dimensions. It uses the value in the driblet-down list equally a guide-line. In our case the next smallest is: 128 ten 128 and the next largest is 256 x 256. If "Nearest Power of two" is chosen, since 220 is closer to 256 then information technology is to 128, 256 x 256 is used. If our image size was 130 x 130, the next smallest is: 128 ten 128 (again) and the next largest is: 256 10 256 (once more), and 128 x 128 would be used. If you lot select "Adjacent Smallest Power of 2" information technology will e'er pick the next smallest value, and also, should yous cull "Next Largest Power of 2" it will always choose the side by side largest.

How do I know what the next powers of 2 are? Well I wrote a simple program to dump a bunch out for me and I only compared 😉 Below is a user-friendly table for your utilise:

ii to the Power of         December. Value         Bin Value
——————————————————————
ii ^ 0                            1                        0000000001
ii ^ 1                            two                        0000000010
2 ^ two                            4                        0000000100
two ^ 3                            8                        0000001000
2 ^ 4                          16                        0000010000
2 ^ 5                          32                        0000100000
2 ^ six                          64                        0001000000
2 ^ 7                        128                        0010000000
2 ^ eight                        256                        0100000000
2 ^ nine                        512                        1000000000

Using square images (same 10 and Y dimensions) is easiest. But in the case of a rectangular image, the X and Y and handled separately, then an 65 x 130 image, using "Nearest Power of ii" ends up beingness 64 x 128, which may or may not stretch / compress your paradigm inappropriately and you'll desire to either forcefulness the re-sampling or manually resample it with padding in the image to make the resolutions easier to work with. Square, as I mentioned is the easiest 😉

Ordinarily, leaving the default of "Nearest Ability of 2" is sufficient, simply I feel it's better to resample the image yourself during the prototype preparation phase of the procedure because it is likely Gimp or Photoshop have a highly superior re-sampler then VTFEdit. I'yard not saying it is, I'm merely saying it'due south likely, especially as the tool hasn't been updated in 2+ years at this bespeak. Plus it's squeamish to know what's actually going on nether the hood.

A note on Team Fortress 2 directories for saving the Spray to:

Sprays are stored in 2 places for Team Fortress 2. Past default they are:

C:Plan FilesSteamsteamapps<STEAM_ACCOUNT_NAME>team fortress 2tfmaterialsVGUIlogos

C:Program FilesSteamsteamapps<STEAM_ACCOUNT_NAME>squad fortress 2tfmaterialsVGUIlogosUI

where <STEAM_ACCOUNT_NAME> is the login name associated with your Steam business relationship.

-If the C:Plan FilesSteamsteamapps<STEAM_ACCOUNT_NAME>team fortress 2tfmaterials directory does non have a sub-directory chosen "VGUI" create a new folder with that name there.

-If the VGUI binder does not have a logos directory, create a new folder with that proper name there. Once the .vtf is in hither, you tin import it from here using the TF2 Options –> Multi-Histrion, Import Spray pick and browse to this directory. The importing process will create a file with the same name every bit the .vtf file but will have a .vmt extension ( not certain what that is though, any thoughts? ) This will also copy the .vtf and .vmt to the logos/UI directory.

-If the logos directory does not have a UI directory, create a new folder with that name there. I the .vtf and .vmt files are in this directory, they will announced in the Cull Spray drib-downwards list for choosing.

A notation on image file naming for use while importing to VTFEdit

For nearly cases it does not matter what you lot name the paradigm file that you import into VTFEdit. Whatever the file is named, will exist used by VTFEdit as the default .vtf proper noun for saving but you can always blazon a different proper noun.

For Animated Sprays, information technology DOES thing yet. Animated sprays are created by making a series of images, ane per frame, and giving them a sequential file name so that VTFEdit recognizes them as multiple frames for the same spray. Basically, they just need to be alphabetized so when VTFEdit sorts the multi-selected images, it sorts the filenames alphabetically and frame 1 goes to the 1st file, frame 2 goes to the second, and so on. For ease of utilize you could use filenames like: "i-MySprayImage.tga", "two-MySprayImage.tga", "3-MySprayImage.tga", etc.

Summary of the process:

The procedure is relatively uncomplicated, create or find an image you desire to use as a spray. Make sure information technology is cropped or scaled down to a resolution of (at largest) 256 x 256. Open VTFEdit, on the File Carte du jour, choose the Import item. Scan to the spray prototype and select it, verify the VTFEdit import options are correct (the tool remembers it's last settings then typically you'll only need to fix information technology up the first fourth dimension you lot make a spray) and hit OK.

A screenshot of pretty useable settings follows:

Not-Animated Spray:

VTFEdit Non-Animated Spray Settings

Animated Spray:

VTFEdit Animated Spray Settings

Delight notation, the only deviation in the above two screen-shots is the value of the "Texture Type" drop-downwards listing item. Non-Blithe sprays use "Book Texture", animated ones use "Animated Textures". Information technology would be fine to employ an Animated Texture with a 1 frame blitheness, merely I take found no information to say use one method or another. I've successfully created non-blithe sprays with Volume Texture and animated sprays with Blithe Texture.

At this indicate VTFEdit volition brandish to you the imported image and you simply go to the File menu again, choose the "Save Equally" item, browse to your local logos directory and save the file with whatever name you'd like with a .vtf extension.

Y'all're ready to use it! Just start Team Fortress ii, go to Options, then the MultiPlayer Options tab, then press the import spray button and browse to your logos directory (equally mentioned above) and cull the new spray. Click utilise, connect to your favorite server and spray away!

VTFEdit makes the whole procedure of creating the .vtf file for use by TF2 a very easy process. The hard office is preparing the image before importing it into VTFEdit. Non-Animated, Non-Transparent images are the easiest, they only require the correct 256 x 256 or smaller size constraint. Transparency requires Blastoff channels and TGA file format.

Some of the Articles I listed at the beginning have more detail on making transparent images and animation prototype preparation, I urge you to cheque them out if you lot are unsure.

Good luck!

Spray in action, click for larger view!

Here is a link to a Quicktime movie of the actual spray in game showing the animation. Not very exciting but relish! Click here to view the moving-picture show!

How To Set Up A Spray In Tf2,

Source: https://blog.johnminadeo.com/creating-custom-team-fortress-2-sprays-for-a-pc/

Posted by: moonsurse1998.blogspot.com

0 Response to "How To Set Up A Spray In Tf2"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel