Tutorial: Custom Textures Last edited 2 years ago2022-09-01 11:18:51 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.
Download attachment

There's a limit to what you can do with only the textures provided with Half-Life. Brand new maps quite often need brand new textures, but how do you do that?

What you Need

You could, of course, find the textures you need on the web, but it's always more exciting to make your own. If you do plan to download all your textures, they'll probably already be in WAD format, so you can skip the next couple of stages.

First, you need to know what type of texture you're looking for. What style must it blend in with? Is it for indoors or out? Must it tile or be single? Tiling textures are the kind that are used for structures like walls, rock-faces, terrain, glass etc. while single are used for more specific objects like vehicles, vending machines and buttons. Both require a bit of work to get right.

You'll need a few tools as well, aside from WorldCraft. An image editor is first. Jasc's Paint Shop Pro will do, although you might have problems with fixing up tiling textures (see below), but your best bet is Adobe Photoshop, providing you can (and want to) afford it.

Then you'll need a WAD-editing program. Wally is about the only one anybody's ever heard of, so get that ( here).

Making your Texture

As an example, I made my own (rather cheap) tiling wall texture out of a photo. Let's have a look at the process:
Stage 1: The SelectionStage 1: The Selection
Stage 2: The FlipStage 2: The Flip
Stage 3: The ResultStage 3: The Result

WADing it Up

So, having completed your texture, what do you do with it? Half-Life needs all its textures to be in WAD3 format. WADs are just... yes, wads... of textures, and the idea dates back to Doom. Quake uses WAD2, and Half-Life has a modified version of that, WAD3. WAD3 format allows each texture to have its own 8-bit palette. This just means that each image is stored in 256 colours, and those colours can be anything (as opposed to WAD2, where the palette is the same for all textures in the WAD, restricting the variety of texture colouring).

Putting your textures into a WAD is where Wally comes in. Although Wally is capable of doing some basic image editing itself, you'll probably find the only useful extra feature is being able to see your texture tiled (you can do this in regular image editors, but perhaps less easily).

All you need to do is copy 'n' paste. Pasting into Wally will let you choose the file type. Select 'Half-Life Package', and it will create a new WAD and put the texture into it. To add subsequent textures to the WAD you are working in, press Ctrl+E. Double-click a texture to edit it, and press Ctrl+T in this view to see it tiled. + and - zoom in and out. When you're done, save the WAD anywhere you like (although it will need to be in your 'Half-Lifevalve' folder if you plan to use Method 1, below).

Using your New WAD

Here's where it gets more exciting. Open WorldCraft, go to Tools -> Options, and click the Textures tab. Click Add WAD, and browse your newly-created WAD file. Close the Options window, and you will find that when you create a new map your custom texture(s) will be at your disposal.

Working with WADs: Method 1

The simplest way to work with custom textures is to put the new WAD with all the default ones in your 'Half-Lifevalve' folder. In this case any maps using the custom WAD will simply call it like they would the default ones. The advantage is that BSP file sizes are kept to a minimum, but the disadvantage is that anyone could open the WAD and take the textures. So where would you use this method? Well, the Half-Life multiplayer maps all use it, because it's possible that clients may have to download a map on connecting to a server, and downloading a bunch of textures they already have is a waste of time. So as long as the client has the required WADs already, it all works great.

Working with WADs: Method 2

This method is a little more complicated, but it's better for some situations. It involves embedding the used textures into the final BSP file, which increases the size of the BSP somewhat, but means you only have to distribute that one file. The single-player maps in Half-Life all have their textures embedded in this manner. You will need to use either of two command-line arguments to do it:

Including the Textures: Method 1

This is the simplest way, which works with both the default WorldCraft compile tools (the ones you get with WorldCraft), as well as with Zoner's Compile Tools (what real mappers use :) - they're free anyway. Go get them!).

When you're ready to test your map, press F9 or click the Run Map button (as usual), but then click the Expert button at the bottom (doesn't that make you feel cool?) and you should see a list of commands to the left. Find the one that is similar to 'C:program filesworldcraftqcsg.exe' (or 'hlcsg.exe' if you are using Zoner's Tools), click it, and add -nowadtextures to the end. Your box should now look something like the one below:
Compile optionsCompile options
What this does is put every texture that is used in the map, not just the ones from your new WAD, but the onse from all the other WAD's, into the BSP. While it is simple, it's also a little sloppy, so only use it when you want a quick and easy single-file distribution. It's sloppy because there's no control over which textures are included, so even ones everyone has will be there. The better method is...

Including the Textures: Method 2

...-wadinclude, but this one only works with Zoner's tools (Version 253). Instead of putting all of the textures used in the map into the BSP, it only includes the ones from the WAD(s) you specify. In other words, you can tell it to include only the custom textures that you created. To use it put -wadinclude wadname as your CSG parameter, where wadname is the name of the file. You don't need the extension or path (these will be taken from WorldCraft). So your Parameters box should say something like this:

$path$file -wadinclude mytextures

To add more than one wad file to your .bsp, all you need to do is add another -wadinclude command

$path$file -wadinclude mytextures -wadinclude mytextures2> and so on...

Yes, you have to use the -wadinclude prefix for every new wad that you want included.

That's about it. Using either of these parameters, you will get a single BSP file at the end that will work by itself.

Hopefully you'll now be able to incorporate custom textures into your maps. Experiment with texture design, as it's obviously the most challenging bit of this to get right. And remember, there are plenty of free custom textures available on the web, if you aren't up for this art thing :)

The example map includes a custom WAD for you to look at. To see it in the map you'll need to add it to WorldCraft's list, explained above.

4 Comments

Commented 7 years ago2016-12-18 05:32:36 UTC Comment #100529
Insanely useful, but the link for Wally is broken, any idea of updating it soon?
Commented 7 years ago2016-12-21 21:46:03 UTC Comment #100530
Google is your friend, or http://gamebanana.com/tools/4774
Commented 3 years ago2021-07-05 09:13:03 UTC Comment #103600
For some reason, even after doing -nowadtextures as well as -wadinclude. After I compile my map, remove the wad file from the valve directory, and load up the map again just to see if it works without requiring the wad file, it doesn't. Please help, I've tried searching on many sites and they all tell you the same thing and it never works.
Commented 3 years ago2021-07-14 14:51:21 UTC Comment #103610
@StanleyLikesCyan:
For me, this works to really embed textures into a bsp file:
-wadautodetect -wadinclude "..."
I'm not using "-nowadtextures".
This is using the "Vluzacn's ZHLT v3.4" tools. :)
Hope that helps!

You must log in to post a comment. You can login or register a new account.