doom2tex (39K)




Textures and Flats

Then and Now



In the early days, when idSoftware developed Doom, memory space was at a premium, so a system of using socalled PATCHES was introduced, to create textures from either a single patch or multiple patches. This system allows for many wall textures to be displayed from a few patches, without having actual texture images use up precious memory space.




From PATCHES to TEXTURES - Then

In the original DOOM/2/U, all patches are between P_ markers (P_START and P_END). Patches are of type Graphic (Doom) and can vary in byte size. Colouring of these patches followed the palette specified with PLAYPAL. For some reason idSoftware divided that namespace into 3 sections inside PP_ markers, P1_, P2_ and P3_. Probably to arrange the patches in groups, like wood, stone, etc.

NAMESPACE_PATCH (42K)

However, in your own pwad it is not necessary to use those subdivisions, unless you feel that the patches need to be split into specific groups.

To note, neither PP_ markers nor P_ markers are really needed, but are handy for a clean lump arrangement.




So, how are these patches used to assemble the textures seen on walls?

For that, let's look at two textures from DOOM2.wad, REDWALL and BIGDOOR1. Open DOOM2.wad with Slade 3, highlight the Texture1 lump and doubleclick to open the Texture Editor.

RnB (19K)

The texture REDWALL is comprised of a single patch, Wall78_1

REDWALL (61K)

The texture BIGDOOR1 is comprised from 2 patches, one patch DOOR2_1 and another patch W13_1 used 4 times.

BIGDOOR1 (59K)

When a texture is made up from multiple patches, then the offset and order for each patch is very important, since the offset determines where the patch is placed and thus visible. The menu items on the right are used to arrange the patches.




FLAT textures - Then

The other type of textures are flats of type Graphic (Flat), which are used on floors or ceilings and are placed between F_ markers (F_START amd F_END). In DOOM2.wad idsoftware did again split flats up into 3 groups: F1_, F2_ and F3. In this case the markers are required.

flats (48K)

Those textures are easily recognizable as they are of size 64x64 (4096 bytes). These can be readily copy/pasted into another pwad as long as they are placed between F_ markers.

graphic_flat (65K)




TEXTURES and FLATS - Now

With the advent of most new source ports there is now a choice. For example, ZDoom (GZDoom) is compatible with the old TEXTURE1, TEXTURE2, PNAMES arrangement.

But GZDoom has a much simplified method to add textures to a pwad. The images, for either wall textures or floor/ceiling textures, are pasted in between TX_ markers (TX_START and TX_END).

TX1 (90K)

These images can then be placed on walls as well as ceilings/floors.

TX2 (500K)

Other benefits are:
The images do not have to be tailored to the PLAYPAL palette, but can be in just about any image format, such as png, jpeg, etc.
Yje images are not tied to a specific size (128x64, 128x128, etc) but can be any size, although power of 2 is preferred.

A further method, TEXTURES, allows the patching of images into composite images. Slade3 can convert TEXTURE1/2 lumps into a TEXTURES lump.

convert1 (52K)

convert2 (72K)





Kappes Buur, January 2020