Texture sizes and difference in quality

"The powers of 2"

When creating textures it’s best to stick to “the powers of 2” pixel dimensions. This means using the following pixels sizes 16, 32, 64, 128 and 256.
For example, a 32x128 texture would be a “powers of 2” texture, so would a 256x256.

The half-life engine allows you to use texture sizes that are a multiple of 16. So a texture size of 48x96 is allowed, like the door textures in the HL.wad. The problem with this texture not being a “powers of 2” texture is that the engine needs to do extra work when it uses the texture. As well as distorting the texture to whatever perspective its being viewed in-game it also need to resample it to a “powers of 2” size for it to be used. This results in a drop of quality for the texture.

“But what if my texture does not fit a powers of 2 texture?”

Your texture does not have to occupy all of the space, you can put your texture onto a “powers of 2” size and not show the empty space when you apply it or apply another texture in that space.

Here are two textures featuring an image of Louise. Both of the images of Louise are exactly the same except that one texture is a “powers of 2” with a border of un-used space.

Even in the hammer view you can see a difference, even though both pictures are made-up of the exact same pixels, just that the texture on the right has a hidden border.

This is the in-game view and you can see a difference in quality, especially in her hair and mouth. You might not think it’s that much, but these two images should look the same, and the poorer image on the left is taking the engine more work to display.

A Closer view.

The 512x512 texture

512x512 textures can still be bad idea in the HL1 engine, not everybody has graphic cards that can handle a texture lump size over 65536 pixels.
To work out the texture lump size, just multiply the width by the height.
A 128x256 texture has a texture lump of 32768.
You can get away with a 512x128 texture as this is 65536, but a 512x512 is 262144.

Here is a model with a 512x512 texture applied to it.

The image above is taken on a computer with a graphics card that can handle a texture lump size of over 65536 pixels.

This image however is taken on a computer with a graphics card that can’t handle texture lump size over 65536 pixels, notice how much more blurred it has become.
What’s more is that this can even cause additional slow down in-game for this player.


"The powers of 2" is a set rule you should stick to, but using 512x512 textures is up to you. More people have better graphics cards these days so the odd 512 x 512 texture might look great, just keep in mind that a lot of people still play the HL mods because there have a standard computer that’s unable to handle the latest games.

re-launch site? DaddyCool