Adding custom textures
Adding custom textures to user-created PWADs allows authors to enhance the look of their custom maps or introduce new visual styles that cannot be achieved through the use of Doom's stock textures. There are several different approaches to this depending on what type of textures are being added, and which source ports the wad is intended to be played with.
Inserting and converting
The first step to adding custom textures to a WAD is using a WAD management tool, such as SLADE, to insert the graphic into the PWAD and then convert it to a format that the engine can recognize. For vanilla Doom, wall/sky textures must be converted to Doom's picture format and floor/ceiling graphics must be converted to Doom's flat format. Both of these operations can be done within SLADE by clicking "Convert to..." under the "Graphic" menu.
Be aware that converting graphics that stray from Doom's color palette may result in a loss of color detail.
Source ports with true-color graphics modes may not be restricted to these formats, and may support alternatives such as PNG.
Replacing existing textures
The easiest way to include custom textures is to simply replace the original graphics by inserting patches into a PWAD that have the same lump name as those found in the game's IWAD. Such an approach does not technically add new textures; it merely replaces components of the present ones. This is usually most effective with textures that only use a single patch, as replacing a patch that is used by multiple textures will, in effect, modify all of those textures. Note that you cannot modify the dimensions of any textures using this method.
Adding new wall textures
A more thorough approach is to actually add new patches to the PNAMES lump, and use these to create new textures within the TEXTURE1 lump. Patches can be arranged to form individual textures at the discretion of the author, thus allowing a small set of patches to create a large quantity of textures. These textures can then be used along with the original textures.
Whether replacing existing textures or adding new ones, it is customary to use P_START/PP_START and P_END/PP_END marker lumps to enclose the patch graphics inside the PWAD. Although these markers are ignored by vanilla Doom and are not necessary, some older WAD management utilities make use of or may require these.
To add textures using SLADE:
- Import the patches into the WAD and convert them to the appropriate format.
- To create textures directly from the patches, and forego the process of assembling the patches into textures, click "Add to TEXTUREx". Otherwise click "Add to PNAMES". The latter will add those patches to PNAMES but not create any new textures.
- When prompted to create or import a texture definition list, click "Yes". Then select the "Import from Base Resource Archive" option and click "OK". This will create a PNAMES and TEXTURE1 lump containing all of the default texture definitions. Note that when adding textures in this manner, each lump should have a name unique from the default textures to prevent duplicate patch/texture definitions.
- Double-click on the TEXTURE1 lump to bring up a list of all the texture definitions. If you opted to create new textures directly from the patches, those textures should be visible at the bottom. If that is the case, the textures are ready to use.
- To create a new texture from one or more patches, click the "New" button in the bottom-left corner of the Texture Editor. Give the texture a name, set the width and height (note that the width must be a power of two), then begin adding patches using the panel on the right side of the screen. Add as many patches as desired and adjust their offsets. Patches further down the list are drawn over top of preceding ones. Do this for each texture you wish to create then click the "Save" button when done.
For Doom 2 and Final Doom, an alternative to TEXTURE1 is the unused TEXTURE2 lump. All textures defined in TEXTURE2 will stack on top of TEXTURE1, so that one does not need to include all of the original textures when adding new textures. This may be useful in some situations, where the PWAD should not redefine the default textures.
ZDoom-based source ports offer the TEXTURES lump, which is a more powerful text-based alternative to TEXTUREx.
Replacing sky textures
The default skies in Doom are defined in TEXTURE1 as normal textures and can be modified easily by replacing the patches that comprise them. These patches are named RSKY1, RSKY2, RSKY3, and RSKY4 (Ultimate Doom only).
Custom sky textures are also not limited to the default width of 256; they may be extended to 512 or 1024 through editing their texture width and using appropriate patches, as demonstrated in Final Doom.
Adding new floor/ceiling textures
Floor and ceiling textures, referred to as flats, are used differently by the Doom engine, and require a different, yet arguably easier approach than wall textures. All flats must be 64x64 pixels in size and converted to Doom's flat texture format. By using identical lump names as found in the IWAD, flats can be replaced in a similar manner as texture patches, however, new flats can be easily defined by assigning them their own unique lump names.
For vanilla Doom WADs, flat textures must be followed by an F_END lump marker and F_START must not be used, because of how vanilla Doom loads flat textures. Using the latter will cause Doom to exit. The use of FF_START and FF_END, however, are safe to use and ignored by Doom.
Adding animated textures
Vanilla Doom has a limited number of animation definitions, but some are unused and are available to authors for creating texture animations of their own using any number of frames. In order to use these, textures with the corresponding names must be defined in TEXTUREx. Custom animated flats also work in a similar manner.
- See Animated wall and Animated flat for more information.
Boom-compatible source ports allow a bit more flexibility through the ANIMATED and SWITCHES lumps, and ZDoom-based ports feature the text-based ANIMDEFS lump, which provides yet further capabilities.