VERC: Detail textures in Half-Life Last edited 14 years ago2004-02-15 20:31:00 UTC by Penguinboy Penguinboy

This article was recovered from an archive and needs to be reviewed

  1. The formatting may be incorrect as it was automatically converted to WikiCode from HTML, it needs to be revised and reformatted
  2. Some information may be out of date as it was written before Half-Life was available on Steam
  3. After the article is re-formatted and updated for Steam HL, remove this notice
  4. Please do not remove the archive notice from the bottom of the article.
  5. Some archive articles are no longer useful, or they duplicate information from other tutorials and entity guides. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a page.
First off, what are detail textures? A detail texture is simply an extra texture that is faded in as you get closer to a surface, providing extra detail instead of the usual blur when a texture is enlarged. A picture tells a thousand words, so have a look at image one and see how much of a difference detail textures can make.

| (Link: example1.jpg)
Image 1: Close-up of a texture, with detail texture
(right) and without (left). Click to enlarge.

So, how do you get detail textures into your map? Well, you'll need two things: the detail textures themselves and what I call a "detail texture list file".

The Detail Textures

The detail textures themselves are simply images, usually with 50% grey used as a base colour. Darker and lighter greys are used to make shadows and highlights. Detail textures should be a power of two in size, as 256x256 is the maximum size Half-Life will load. I found that 128x128 often works well. When you've got the detail texture looking how you want it, save it in the gfx/detail/ folder as a 24-bit uncompressed TGA. It's important you get that bit right - any other format and Half-Life won't load it properly.
detail1.gifdetail1.gif
Image 2: The detail texture
used to produce image one

Detail Texture List File

The list file is what tells Half-Life which detail textures to use on which surfaces of your map. It is a plain text file and should be placed in the same directory as your BSP. It should have the same name as your map with "_detail.txt" appended. For example, if I was adding detail textures to ns_example.bsp , then the list file would be called ns_example_detail.txt .

The list file should contain one line for each texture you want to have a detail texture. Each line should have four items, seperated with tabs. The first item is the Half-Life texture name. The second item is the path to the detail texture, relative to the gfx directory and without the extension. The third and fourth items specify the x and y scaling for the detail texture. If that all sounded a bit confusing, here's an example: say I wanted to use the detail texture gfx/detail/ground3.tga wherever the texture out_pav3 occurs. I might use a line looking like this:

out_pav3    detail/ground3    10.0    10.0
And that's it! If you load up your map, you should see the detail texture.

Notes

This article was originally published on the Valve Editing Resource Collective (VERC).
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

Comments

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