This is an incomplete rough draft of the next version of the Editart Guide.  It is meant to show you what to expect in the next version and allow you to give feedback on what features you like, dislike, or find lacking.  The colors aren't set, the internal links aren't all up, etc.  Questions and comments can be directed to me via email at aesire@hotmail.com or via the RTCM forum.

Usurper’s Editart Guide v2.0  Draft 2002

This is the final version of this guide. V2.0 final was never made. (C) RTCM The Usurper
Do not publicly post this document anywhere. See the updated Editart Documents on RTCM

  1. What Editart Does
  2. Getting Editart Running
  3. The Editart Interface
  4. Navigating and Saving Tiles
  5. Preparing Import-Ready Images
    1. Dimensions
    2. Palette Conversion
    3. Transparency Issues
    4. File types
  6. Importing Tiles
  7. Animating Tiles
  8. Weapon Art
  9. Enemy/Actor Art
  10. Sky/Parallaxed Textures
  11. Editart Keylist
  12. Palette.dat Structure
  13. Lookup.dat Structure
  14. Wad2Art
  15. Voxels
  16. Cutscene Files
  17. Other Art Programs
  18. Quick FAQ

 

I.  What Editart Does ^

Editart is a program that allows you to modify the art files in games which use Ken Silverman’s Build Engine, such as Duke Nukem 3D, Shadow Warrior, Blood, and others.  This guide is written for use with Duke Nukem 3D (hereafter referred to as “Duke3D”), although most of the instructions will apply to other Build Engine games as well.

While Editart has some basic drawing capabilities, it is not a fully featured paint program.  It’s primary purpose is for storing images, not creating them.  For that reason, drawing in Editart will not be covered extensively in this guide, save for the explanation of drawing commands in the Keylist section and a few other useful commands.

Each art file in Duke3D contains 256 art tiles.  There are thousands of art tiles available.  If you have Duke3D version 1.3d, you will have 4096 tiles (0-4095) available in 16 art files (tiles000.art-tiles015.art).  If you have version 1.4 or 1.5, you will have 6144 tiles (0-6143) in 24 art files (tiles000.art-tiles023.art).  The limit for v.2.x (Eduke, www.saettler.com/eduke) may or may not be higher than the v.1.4/1.5 limits in future versions. 

The art files account for all of the graphics used in the game (textures, sprites, weapons graphics, help screens, fonts, etc.) with the exception of certain cutscenes, which are stored in anm files.

Tiles can have dimensions of up to 1024 pixels wide and 512 pixels high.  Keep in mind that rotating and wall-aligned sprites, as well as walls, will not shade normally if their height exceeds 256 pixels, and standard (non-parallaxed) floor and ceiling textures will have glitches if their width and/or height meets or exceeds 512 pixels.  Also be aware that Duke3D and all other Build Engine games do not display more than 256 colors on screen at once.  All of your art (with a few exceptions such as title screens and cutscenes) will conform to a single 256-color palette.  I’ve saved you the trouble and prepared the game palettes in Windows’ pal format (compatible with Paint Shop Pro) and Photoshop’s act format with instructions on how to use them:  click here to download palettes.  You can also read about how to obtain the palettes yourself in Section V.

Important: the editart.exe that ships with v.1.4/1.5 is the same version used in Duke3D v.1.3D and is not modified to handle the higher art file limit.  The editart.exe that comes with Shadow Warrior will work with v.1.4/1.5 allowing access to the wider range of art files.

FACT BOX

  • Tiles per art file: 256
  • v.1.3D max tiles: 4096 (tiles000.art-tiles015.art)
  • v.1.4/1.5 max tiles:
  • Max tile dimensions: 1024x512

II. Getting Editart Running ^

You should run editart in your Duke3D directory so that you have immediate access to your modified art files in Build and the game itself.  The following files should be in the directory along with editart.exe:

  • palette.dat (required)
  • tables.dat (required)
  • all art files (tiles000.art-tilesxxx.art; required)
  • names.h (optional)

You will likely find the dat files already inside your Duke3D folder.  If not, they can be extracted from the duke3d.grp file.  The art files will almost certainly need to be extracted from duke3d.grp as well.  To extract the art or dat files (or both), make sure you have a program called kextract.exe in the Duke3D directory with your Editart files.  If it isn’t there, copy it from the Duke3D CD-Rom.  Assuming you understand DOS, go to the folder that contains Duke3D.  Type kextract duke3d.grp filename.xxx where filename.xxx is the file or files you wish to extract.  To extract all the art files, replace it with *.art.  To extract all the dat files, use *.dat

Once you have all of the necessary files in the directory, run the Editart program.  You should see a black screen with red lettering that reads “Loading Tiles000.art.” 

Note that it is in fact loading all art files that follow tiles000.art in sequential order.  If you are lacking an art file, such as tiles004.art, tiles005.art and up may not display correctly.

Important:  If you extract a file from duke3d.grp using kextract, the program will overwrite any file of the same name in the same directory without prompt or warning. 

Important:  If you have copied files directory off of the Duke3D CD-Rom, they will probably be marked as read-only.  You can quickly fix this in DOS by going to your Duke3D folder and typing attrib –r at the DOS prompt.  Alternately, you could select all of the files in the folder in Windows, right click on them, select Properties, then uncheck the read-only box and click “apply” and “ok.”

III. The Editart Interface ^

Upon opening Editart you should see the following:

The bottom left corner displays the tile number.  If the tile has been assigned a name, that name will appear beneath the tile number.  In the center are the tiles dimensions in pixels (64 wide/32 high in the above image) and its animation setting.  The bottom right corner displays the palette (the 256 colors that most of the artwork conforms to).  The center of the screen displays the tile itself.  If you move the mouse or press the arrow keys, you’ll notice a tiny cursor moving around the tile.  You can use this tile for drawing pixel-by-pixel or for selecting areas for copying and pasting.  The rest of the commands are based on various keys on the keyboard.  See the keylist section for a complete listing.

IV. Navigating and Saving Tiles ^

You can save pre-existing tiles to an external pcx file using editart.  First, find the tile you wish to save.  You can change tiles in three different ways.  First, you can press the pageup/pagedown keys to cycle through the tiles one at a time.  Secondly, if you know the exact tile number of the file you wish to view, press the G key.  This will bring up the goto prompt.

Type in the tile number and press Enter to immediately bring up that tile.  The third method allows you to enter a selection mode where you can see numerous tiles at once.  Press the V key.  Your screen will look similar to the following image:

A flashing box surrounds tile 0.  You can move this box around using the arrow keys, or scroll up or down rapidly with the pageup/pagedown keys.  Once you have selected your tile, press enter to return to the original view mode.

Now that you have selected a tile, you can save it to a 256-color pcx file, which can be read by most paint programs.  The first tile that you save will be named Capt0000.pcx.  Each subsequent tile will add 1 to the number at the end of the tilename.  Capt0001.pcx and Capt0002.pcx would be the next files saved, for example.  Press either the B or F12 key to save the tile.

Important: Editart will only allow you to have 256 compatible image files (bmp, pcx, or gif) in the directory.  If the number meets or exceeds 256, it will not allow you to save any more tiles until you’ve cleared some of them out of the Duke3D folder.  It will also refuse to display more than 256 tiles in the list of available images for importing.

Important: If you have trouble seeing tiles clearly in tile selection mode, you can use the / key on the numeric keypad to decrease the number of tiles displayed.  To increase the amount, press the * key on the numeric keypad.  There are three settings, the default setting being medium.

V. Creating Import-Ready Images ^

Before you begin trying to import images into Editart, you should know the various limitations on the file formats allowed by the program and how you can adjust your image to make it look its best. 

A. Dimensions.  If you’ve read through this guide from the beginning, you already know that the maximum tile size is 1024x512 and that rotating sprites, wall-aligned sprites, and wall textures should not exceed 256 pixels in height due to a shading “bug” (or limitation, as I like to call it, as it was limited intentionally by the programmer to keep the frame rate high).  You should also have read that non-parallaxed floors and ceilings will be glitchy if their width and/or height meets or exceeds 512.  If you’re an experienced level creator, you’ve probably also noticed that graphics whose heights are powers of 2 (1, 2, 4, 6, 16, 32, 64, 128, 256, 512, or 1024) tile properly on walls, floors, and ceilings, while those with other height measurements cause glitches when they repeat on a wall or are skewed when applied to floors and ceilings.  Tile 3407 is one such example.  It’s dimensions are 128x127, leading to a slight seam and a particularly glaring “phantom pixel” (beneath the arrow that I’ve drawn in).  Its repeat seam isn’t visible in this low-resolution image, but you can test it out for yourself.  I certainly don’t have to draw arrows for you to see the skewing effect when this tile is applied to the floor.

Generally, a safe practice is to make wall, floor, and ceiling textures have dimensions that are powers of 2.  This allows these textues to be used safely on any surface or as any type of sprite.  However, wall textures and floor-aligned sprites can break this rule.  Wall textures will tile properly with any width, so long as their y dimension is a power of 2.  Floor aligned textures will also display correctly at any width as long as their height is a power of 2.  Rotating (default) and wall-aligned sprites can be any width and any height up to 256 (unless for some reason they will never be shaded, such as the explosion or fire actors; these could then safely reach the maximum height of 512).

Palette Conversion.  So now that you have the dimension limits down, you’ll have to worry about the palette.  While I provided a zip file with palettes and instructions for use, you may wish to know how to get the default palette yourself.  Simply save a tile in editart, then open the pcx file in your favorite paint program (unless your favorite paint program is as primitive as MS Paint, in which case you should download one of the suggested paint programs in Section XVII).  Most paint programs have an option to save the palette of the current image.  If you cannot find this function, check your paint program’s help file. 

Many paint programs won’t allow you to use all of their features if your image is in 256 color mode.  You may wish to increase the color depth to 24 bit and then load the Duke3D palette once you’ve finished editing.  If your image contains colors that simply cannot be matched properly in the Duke3D palette, you may be able to use a simple program called Texture Colorizer (available in the RTCM download section) to adjust your colors.

Texture Colorizer Tutorial

Texture Colorizer was developed by Jaimi McEntire at Eldermage Software. It allows you to select any number of colors from a 256-color palette and change all or part of an image's colors to only those colors you've selected. According to the program's readme.txt file, TC uses the luminance values (brightness) of the pixels to determine which of the selected colors to match it to.

The program works with bitmap files only (bmp), so you will need to convert the image you wish to modify. The palette is read from a second bitmap. For your convenience, I've prepared one for you <link>here</link>, along with a sample image. The next section will guide you through "colorizing" the sample image.

Open Texture Colorizer. You'll see two windows. The blank gray window is the image window where your the file you wish to colorize will be opened. The other is the main window, and it houses the controls and the palette. Begin by clicking file/open palette (or click the get palette button) in the main window, then choosing your palette image (Duke3d.bmp if you're using the one I supplied). Click OK. Now open the image you wish to colorize (sample.bmp if you're using the one I supplied) by clicking file/open bitmap (or click the load bitmap button). You can increase the size of the image window by selecting a size from the dropdown box in the main window (1x, 2x, 4x, or 8x). Now let's assume we want to make the image green. Select the two rows of green shades from the palette using the left mouse button. You can either hold down the button and select adjacent colors to the first one you picked, or you can hold shift and click on each color. Try both to be sure you have the hang of it. Now you'll see three different colorizing tools in the main window, the brush, the box, and the image filler. Select the brush. You can change the size of the brush tip by clicking on one of the brush size boxes below the tool buttons. Left click on the image and, holding the left mouse button down, drag the tool along the image. Note the way the color changes. Now click the undo button. Select the box botton. The box tool lets you colorize rectangular sections of the bitmap. Click and hold the left mouse button on the image and drag the tool around the picture. Once you've seen how this tool works, click undo. Now click on the image fill button. This will convert the entire image instantly to the new colors. You can adjust how light or dark the colors are replaced by adjusting the slider-bar.

 

Special Palette Colors and Transparency Issues.

A common problem when converting images to the Duke3D palette, even if they appear to convert properly, is the existance of fullbright colors in the image. Fullbright colors are indexed as 240-254 in the palette, and are located in the last row of the palette when viewed in Editart and most paint programs.  These colors do not shade in-game—ever.  An example of fullbrights can be seen in the eyes of the Pigcop.  You can see during the game that his eyes never darken, no matter how dark the rest of the sprite appears.  Fullbrights can be useful for making permanently lit objects, but they can also be bothersome when converting images to the Duke3D palette.  The zip file of palettes I provided includes one that replaces the fullbrights with a single unique color similar in shade to the transparency color, making it easy to spot.  

Transparency is determined by the last color on the default palette.  This purple color happens to share the same properties as one of the fullbright colors; that is, it contains the same amount of red, green, and blue values.  <continued>

File Types.

Usurper’s Recommendations:

  • For standard walls, floors, and ceilings, make sure their dimensions are multiples of 2.
  • Rotating/wall-aligned sprites and wall textures should not exceed 256 pixels high due to a shading bug.
  • For sprites that are floor-aligned only, dimensions can be any multiple of 2 up to the maximum tile size.
  • Maximum floor dimensions should not exceed 256x256 pixels.
  • Save files that you intend to import in 8-bit, non-interlaced gif format.  Consult your paint program’s help file if you need to.
  • Load the Duke3D palette on your image prior to saving.
  • Use a modified palette to prevent your transparencies from being solid.

VI. Importing Tiles ^

This section assumes you are aware of the following:

  • When importing images, it helps to have prepared them as described in the previous section.
  • Editart _can_ convert images to the current palette, but usually does not do as good a job as a proper paint program.
  • You won't need to do any preparation to import images that have been saved from editart and haven't been modified.

Find the tile you wish to import your image to. Set the size of the tile to the dimensions of the image by pressing the S key. First type the width (x dimension) and press enter. Then do the same for height (y dimension). <image>

Press U to begin importing. This will bring up a directory listing. Files that can be imported appear in white text, while folders and incompatible filetypes appear in yellow. Choose the file you wish to import and press enter. Select .. to move up to the parent folder and look for the image in another folder. Press escape to cancel.<image>

You should see the image along with a flashing white box. The box represents the dimensions you set for the image. If the box is the size of or larger than the image, it will surround the edges of the image perfectly. <image> If the image is larger than the box, you will only be able to import a portion of the image. This can be useful at times. <image1 not so useful> <image2 useful>

If your tile has a height larger than 200, you may get smeared pixels in your tile. <image> The solution is to move the cursor to the top row of pixels prior to importing the image. The program imports the tile from the top row of the image, but apparently if that top row is off the screen, it takes the topmost row that is onscreen.

Sometimes, editart will cut tall images off at the 256 pixel mark.  This is most noticable when importing new sky textures.  Using editart's native copy and paste commands, you can get around this problem with a little extra work.

First, import the top half of your image.  Then find an empty tile and import the bottom half.  Now you must copy the bottom half of the image.  Move your cursor to the top-left corner and press 1.  This defines the top-left corner of the selection you wish to manipulate.  Move the cursor to the bottom right corner and press 2.  This defines the bottom-right corner of the selection you wish to manipulate.  Now press 3 to copy the selection.  This functions in a like manner to the Windows clipboard, save that the image is not stored in memory after you leave editart and is not available to other programs.  Now <continued>