Dr Sleep's DOOM Apothecary
  Latest News
  Editing Clinic
  Tutorials
  jDoom
  AddOn Levels
  Downloads
  About
  Doom Builder Guide
 Related Sites
  Doomsday HQ
  NewDoom.Com
  Doom Wad Station
  DoomWorld: Top 100 PWADs
  The Megawad Project Page


Doomsday HQ Link

Doomsday HQ Link

Check out our host: NewDoom.com
Hosted by NewDoom

Copyright @ 2004 by
John W. Anderson
johnwanderson@verizon.net

 

Dr Sleep's DOOM Apothecary

Home  |  Editing Clinic  |  Tutorials  |  jDoom  |  Levels  Downloads About  Email

Editing Clinic: Textures
PWAD Designer's Reference| REJECT | Textures | Graphics | Architecture | Aesthetics

How to Use Hi-Res Textures in jDOOM

David “Tolwyn” Shaw
tolwyn@tolwyn.com

This tutorial focuses on how to create a Texture PWAD when creating a Map for Doom or DOOM2 that takes advantage of Doomsday’s JDOOM engine. The tutorial should also work with HERETIC and HEXEN as well (jHEXEN, jHERETIC), but the author has limited experience editing for these two games and will focus on DOOM 2.

This process may work for other ports, but I haven’t tested it. I support all ports in the DOOM community; even though I may not have experience with many of them.

JDOOM has the ability to utilize hi-res textures. It has support for TGA and PNG; 8, 24, and 32 bit. Note that TGA files always must be saved as 32 bit; even if no alpha information is used. A 32 bit file is a 24 bit image with an 8 bit grayscale alpha channel that is used to define transparency. Areas of the alpha channel that are white are opaque; areas of the alpha channel that are black are transparent. The grey values in-between denote different levels of these two extremes. You’d only want to use a texture with an alpha channel on a two-sided LineDef.

It is recommended to use PNG files whenever possible for the added flexibility of utilizing 24 bit when an alpha channel is not required. File sizes of the PNG format are also smaller.

This guide assumes that you have some familiarity in creating new textures for the DOOM engine. I’ll summarize the process shortly.

This guide also uses the terms “folder” and “directory.” Normally, these two terms are synonymous and can be freely interchanged. Different utilities use different syntaxes. I’ll try to use the same term the utility uses.

In regular DOOM, textures are created by one or more patches. Patches are the actual graphic; textures is really a list (the texture1 lump in a PWAD, for example) that defines which patch or patches the engine needs to use to create the “composite” graphic (texture) that you see on the SideDefs (walls) in the game. The patch must be created by using an 8 bit (256 color or “paletted”) graphic; furthermore, you must quantize the image to the DOOM palette (a predefined 256 color map or palette—some PWAD utilities will do this for you).

A texture can be created by just using one patch, but interesting textures can be created by using two or more patches. The texture list contains things such as the canvas size of the texture (128x64, 128x128, 256x128, etc.) as long as it’s a multiple of 2, the “Z-order” of the patches (which patch is placed on top of the other), and any X or Y offset of a particular patch. The entire canvas must be “covered” by a patch. You should not use just one 64x64 patch to build a texture that has a 128x128 defined “canvas” size. You would need to add that patch 3 more times to cover the entire canvas.

In JDOOM, the engine will substitute a PNG file for any existing DOOM texture as long as the PNG file is named the same as the texture (not patch!). JDOOM simply bypasses the patch process and strictly reads the texture list and substitutes accordingly. To explain further, if you had a DOOM2 texture defined (named) as mrblerck made up of 3 patches (granite1, mrble1, and mrble2) and you wanted to use a hi-res PNG file in its place in JDOOM, you would simply need to find an appropriate PNG file and name it mrblerck.png and place it in the folder that JDOOM requires its textures to be in order to be displayed by the engine: /data/jdoom /textures.

NOTE: Substitute slashes “/” for backslashes “\” where appropriate depending upon your operating system.

Another important thing to realize is that the engine will scale your hi-res texture to fit within the canvas size defined in the texture1 lump in the PWAD. So, a 256x256 PNG file in all its detailed glory will be scaled to 64x64 in the game if the texture1 entry’s canvas size definition is 64x64.

Ok, so knowing how this works, there should be a nagging little question in the back of your head, and that question should be:

“If JDOOM simply reads the texture1 entry for using hi-res textures, couldn’t I just create all my texture1 entries using one simple little reference patch?”

Not surprisingly, the answer is “yes.” If you really want to go crazy, you can use a zero-length patch name and create textures using that and the JDOOM engine will be none the wiser. This means you can save a lot of space in your PWAD.

Home <<  1 2 3 4 5 6 7 8 9  >> Next