Doug the Head
05-23-2003, 10:13 AM
This is my first ever comprehensive tutorial, so let me know if don't explain anything well enough or leave something out.
Tools for necessary sprite-making:
-SprView (http://www.worldcraft.cz/soubory/sprview.zip) (This is used to view sprites. Go figure)
-Sprite Wizard (http://collective.valve-erc.com/data/docs/1047496381-02062100/files/sprwiz.zip) (This is the easiest tool for compiling sprites)
Tools that would be good for sprite making:
-Adobe Photoshop (http://www.adobe.com/products/photoshop/main.html) (most popular graphic design program)
-Paint Shop Pro (http://www.jasc.com) (used by many instead of PhotoShop)
-The Gimp (http://www.gimp.net/) (freeware program for those that can't get ahold of Photoshop or PSP)
Basics of Sprite-making:
A sprite is a two-dimensional file that consists of one or more bitmap images played in a sequence. They make everything in Half-Life from smoke and fire, to your heads-up display, to muzzle flashes.
All of the bitmap files in a sprite must have a size that is a multiple of 8 (e.g. 56x128). This is just a little quirk with Half-Life. All .bmp's must also be in 8-bit format (meaning they can use a maximum of 256 colors), also reffered to as indexed color. The pallete, or color table, is the term used to describe the colors used by the .bmp file. In addition, all the .bmp's used in a single sprite must use the same pallete.
There are four different types of sprites, each is defined by the way the sprite is compiled.
1 - Normal: The sprite appears in-game with no effects applied to it. exactly as you drew it.
2 - Alphatest: The first 255 colors in the pallete appear normally in-game. The last color in the pallete defines which part of the sprite is transparent in-game (i.e. If pure blue was the last color in the pallete, all the pure blue in the sprite would appear transparent in-game. Be careful, if some of the blue in the sprite is slightly off from pure blue, it will appear in-game)
3 - Indexalpha: Everything that is white in the sprite is transparent, and everything black is opaque. Anything grey will be anywhere in-between, as defined by how close it is to white or black. When compiled in indexalpha mode, your .bmp files must use a grayscale pallete.
4 - Additive: uses all 256 colors of the pallete and blends them together (this is the most common type of sprite)
If you create a sprite from more than one .bmp, it will play them in order from first to last. This is called an animated sprite, and is used for smoke, fire, etc.
I don't really know what else to say, since just about everything about compiling is self-explanitory with Sprite Wizard, so here is a tutorial on how to make scope sprite for dod, since they use a very strange format.
How to make DoD sniper scope sprites:
Export the .bmp sequence using sprview
Then open all four .bmp's with photoshop/paint shop pro
Put all four images into one picture so that them make the four quadrants of a square
Stretch the image out to 800x600 (or 1024x768, whatever floats your boat)
Edit the scope as you wish (white is transparent, black is opaque, grey is semi-opaque and gets closer to transparent the closer you get to white). It makes the scope look better if you blur all the lines except for the crosshairs, so it doesnt look jagged.
Resize the image back down to 512x512
Cut the image into 256x256 parts.
Make sure the .bmp's are in indexed color mode, and the pallete is greyscale. This step is very important
Save your 256x256 .bmp files.
Use sprwizard to comile the sprite with the four pieces in the following order: top-left, top-right, bottom-right, bottom-left
Compile the sprite in Index-alpha mode. This is important for the sprite to work.
Save the sprite as one of the following (depending on which scope you want to replace) in your dod\sprites directory:
scope_spring.spr
scope_enfield.spr
scope_k43.spr (actually replaces the k98 scope, but it has retained it's name from the beta 1.x period)
That should be all.
Tools for necessary sprite-making:
-SprView (http://www.worldcraft.cz/soubory/sprview.zip) (This is used to view sprites. Go figure)
-Sprite Wizard (http://collective.valve-erc.com/data/docs/1047496381-02062100/files/sprwiz.zip) (This is the easiest tool for compiling sprites)
Tools that would be good for sprite making:
-Adobe Photoshop (http://www.adobe.com/products/photoshop/main.html) (most popular graphic design program)
-Paint Shop Pro (http://www.jasc.com) (used by many instead of PhotoShop)
-The Gimp (http://www.gimp.net/) (freeware program for those that can't get ahold of Photoshop or PSP)
Basics of Sprite-making:
A sprite is a two-dimensional file that consists of one or more bitmap images played in a sequence. They make everything in Half-Life from smoke and fire, to your heads-up display, to muzzle flashes.
All of the bitmap files in a sprite must have a size that is a multiple of 8 (e.g. 56x128). This is just a little quirk with Half-Life. All .bmp's must also be in 8-bit format (meaning they can use a maximum of 256 colors), also reffered to as indexed color. The pallete, or color table, is the term used to describe the colors used by the .bmp file. In addition, all the .bmp's used in a single sprite must use the same pallete.
There are four different types of sprites, each is defined by the way the sprite is compiled.
1 - Normal: The sprite appears in-game with no effects applied to it. exactly as you drew it.
2 - Alphatest: The first 255 colors in the pallete appear normally in-game. The last color in the pallete defines which part of the sprite is transparent in-game (i.e. If pure blue was the last color in the pallete, all the pure blue in the sprite would appear transparent in-game. Be careful, if some of the blue in the sprite is slightly off from pure blue, it will appear in-game)
3 - Indexalpha: Everything that is white in the sprite is transparent, and everything black is opaque. Anything grey will be anywhere in-between, as defined by how close it is to white or black. When compiled in indexalpha mode, your .bmp files must use a grayscale pallete.
4 - Additive: uses all 256 colors of the pallete and blends them together (this is the most common type of sprite)
If you create a sprite from more than one .bmp, it will play them in order from first to last. This is called an animated sprite, and is used for smoke, fire, etc.
I don't really know what else to say, since just about everything about compiling is self-explanitory with Sprite Wizard, so here is a tutorial on how to make scope sprite for dod, since they use a very strange format.
How to make DoD sniper scope sprites:
Export the .bmp sequence using sprview
Then open all four .bmp's with photoshop/paint shop pro
Put all four images into one picture so that them make the four quadrants of a square
Stretch the image out to 800x600 (or 1024x768, whatever floats your boat)
Edit the scope as you wish (white is transparent, black is opaque, grey is semi-opaque and gets closer to transparent the closer you get to white). It makes the scope look better if you blur all the lines except for the crosshairs, so it doesnt look jagged.
Resize the image back down to 512x512
Cut the image into 256x256 parts.
Make sure the .bmp's are in indexed color mode, and the pallete is greyscale. This step is very important
Save your 256x256 .bmp files.
Use sprwizard to comile the sprite with the four pieces in the following order: top-left, top-right, bottom-right, bottom-left
Compile the sprite in Index-alpha mode. This is important for the sprite to work.
Save the sprite as one of the following (depending on which scope you want to replace) in your dod\sprites directory:
scope_spring.spr
scope_enfield.spr
scope_k43.spr (actually replaces the k98 scope, but it has retained it's name from the beta 1.x period)
That should be all.