Crosshair creation


Cpl. Entek
10-22-2005, 04:24 AM
Ok did a search couldnt find anything anywhere specific to what im looking for.

Im tryin to create a custom crosshair using the source sdk and when i go to compile, it complains the crosshair is in the wrong resolution.

After reading a tutorial on this, it says it has to have a resolution equal to a multiple of power of 2.

Now im krap at maths so what the heck does that mean?

If someone, ANYONE can post a simply tutorial how to create a crosshair from a jpeg, or tga image, what size (pixels) to create it in i would be very greatfull and follow them round like a stalker waving a huge banner with they're name on it for about a week and a half.

Please help meh!

Cheers.

Wulf
10-22-2005, 10:19 AM
The way I do it is using Photoshop with the VTF file extension plugin. You also need GCFscape to get a copy of one of the original crosshairs VTF and VMT files.

Copy them into your dod\materials\vgui\crosshairs in your Source folder. Open the VMT file with photoshop, and you'l have an image of the crosshair. If you have the channels showing, you'll notice several layers.

I find the best way to work with these is to colour in the RGB layer completly white, that way you can tweak the aplha transparency to whatever you want without having to change the RGB at any point...

Next, click into the alpha layer, named Alpha 1. It will show a greyscale image, again of the crosshair that you've copied. Change this as much as you want, black is transparent, white is opaque, shades of grey are different levels of translucence. When you're done, save the file.

Now you have 2 options, you can keep the name as it is and it'll replace the original, or you can rename it to something like Crosshair5, and edit the VMT with WTF edit to load the correct crosshair. I'll attach one of mine so you can see what I mean...

Trp. Jed
10-22-2005, 10:53 AM
Graphic cards use "Power of two" textures as their are more efficient in terms of calculations, memory useage and transfer into GPU RAM.

A power of two texture has a width and height which has a pixel dimension of 1,2,4,8,16,32,64,128,256, etc., etc.

For example, common sizes might be 1024x1024, 256x512, 16x16, etc.

Maximum practical size is about 2048x2048 but 1024x1024 or less is recommended for compatibility with older graphics card.

Cpl. Entek
10-23-2005, 05:19 AM
Now THATS helpfull :D

Ta ever so much :D

BeastLoLz
10-23-2005, 08:15 PM
Why do i have this black backgrond on every crosshair I make am i doing something wroung! :dog:

Cpl. Entek
10-29-2005, 08:45 AM
Dont suppose anyone knows how to add an alpha layer to an image in paintshop pro and get it to stay there when you save it as a tga do they? I can get me xhairs in game they are just solid with no transparency :confused:

Sgt.Crocodile
11-16-2005, 06:22 AM
Alpha channels are quite simple:
1- No transparancy : white
2- Full Transparancy : black
3- Partial Transparancy: shades of grey.

Just use them wisely to create the wanted effect.

I am far from being good as some guys here, but iŽll try to pass along the little i know. :D

I wonder if a 2048x2048 texture will have the same (unwrap) mapping as the 1024x1024 sized....If so iŽll work on some more details on my skins

Thanks

C h A m O
12-16-2005, 09:05 AM
Someone can make me a "Dot" one?

The official doesnt work for me!!

ps: It's a DoD S one I need

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.