Editart Corner:

 

Learn how to use editart in just a few steps! If you have questions about editart or something Duke editing related, please post on our forum and we'll try and see if we can answer it.

Maybe this section will be updated later, so stay tuned!

 

Chapters:

1. Editart
1.1 What is it?
1.2 How to install editart
1.3 The Keys
1.4 Wad2Art
1.5 Import art with editart
1.6 Creating and importing new skies
1.7 Animating tiles
1.8 Importing Enemies (and 3D sprites) into Editart
1.9 Changing weapon art

2. Other programs (combined with editart)
2.1 DukeRes Art Tool
 2.1.1 Animation in DukeRes
 2.1.2 Coordinate System
2.2 Paint Shop Pro (7)
 2.2.1 Palettes + Texture Adapting and Importing
 2.2.2 Standard textures
2.3 New Palette

 

What is it?

The name might suggest that Editart is a program to edit arts in but that's a wrong definition. Of course there are exceptions, some people DO you know how to edit arts in it in a great way but Editart is a good program to import (and export) arts with. 

 

How to install editart:

Go to the drive your Duke Cd is in. You will see a folder called GOODIES. If you enter the map you'll see more folders such as: ANW, BUILD, DOSWINKY etc... Enter the BUILD folder. The easiest way is to copy all files in that folder to your Duke Nukem 3D directory (e.g c:\duke3d\).

Now, go to your Duke Nukem 3D directory and run the following command (from dos):
kextract.exe duke3d.grp *.art
Now all ART-files will be extracted from the Duke3d group file.
You can also extract the dat files by running this command:
kextract.exe duke3d.grp *.dat
You should do this if you want to modify the palettes later on.

Try running editart.exe now. If everything went will you'll see the Editart layout and the first Duke3d texture namely:



To run editart.exe actually you only need:
Editart.exe, Palette.dat, Tables.dat all art tiles (Tiles000... etc) and Names.h if you want to see the tile names and 
Names.h (not necessary, but helpful; shows tile names in build and editart).

- Kuffi

 

The keys:

Written by: Allen H. Blum III and Richard "Levelord" Gray.

U - Use this to import a section of a 320*200*256 .BMP, .PCX, or .GIF.

Enter - Convert the image that is inside the rectangular selection rectangle to the BUILD palette.

Space - Convert the image that is inside the rectangular selection rectangle without remapping the palette.

P - If in the picture selecting screen (after pressing U and loading the picture), you press P, then the palette of BUILD can be replaced by the palette of the displayed picture.

PGUP/PGDN - Select tile to edit.

G - GOTO a tile by typing in the tile number.

S - Re-size tile. The X and Y sizes can be any unsigned short integer.

X ranges from 0 to 1024, and Y ranges from 0 to 240.

Delete - short cut key to set both the X and Y sizes to 0.

+,- Change the animation setting. (Default: NoAnm = 0.) To change the animation type, press - when the value is 0.

Example: If you want an object to have 4 tiles of animation, you can animate it in 4 different sequences: (0 is the current tile)

NoAnm=4 sequence: 0,0,0,0,0,0,0,0,0,0,0,... (no animation)
Oscis=4 sequence: 0,1,2,3,2,1,0,1,2,3,2,... (oscillate)
AnmFD=4 sequence: 0,1,2,3,0,1,2,3,0,1,2,... (forwards)
AnmBK=4 sequence: 0,-1,-2,-3,0,-1,-2,-3,... (backwards)

A - Set the animation speed of the tile. Press + and - to change the animation speed. There are 16 different animation speeds. The animation speed set here set the speed for BUILD and your GAME also. (Speed is proportional to (totalclock>>animspeed))

- This key (located just above the TAB key) allows you to center a sprite. Simply use the arrow keys to get to the desired position.

N - Name a tile. Naming a tile simply changes the #define statement in NAMES.H. You should include NAMES.H when compiling so you can easily refer to sprites by name rather than by number.

O - Optimize the size of an individual piece of artwork. Use this for tiles with invisible pixels on the sides.

V - View and select a tile to edit.

Space - To swap 2 tiles simply press space bar on the first tile, then space bar on the second. 1,2,3 - To swap a group of tiles, press 1 on the first tile, press 2 to remember the region between where you pressed 1 and 2. Press 3 at the place to where you want to swap all the tiles.

ALT+U- Re-grab artwork from original pictures according to the CAPFIL.TXT file. If you press ALT-U in the main screen, everything will be re-grabbed. If you press ALT-U in 'V' mode, then you should first select the range by pressing '1' and '2' on the range boundaries.

ALT+R- Generate a Tile frequency report by scanning all maps in directory. Use in 'V' mode only.

F12 - Screen capture (saves image as a *.BMP file, starting as file name CAPTUR00.BMP and incrementing by 1 each time F12 is pressed.

ESC - Quit.

Extra features: (if you actually want to do the artwork in EDITART or if you want to touch-up some imported art.)

C - Change all pixels on the tile having the same color under the graphics cursor to to selected color.

Arrows / Mouse - Move graphics cursor.

Shift + Arrows - Select color. (on bottom right corner of screen)

Space - Plot a pixel with the selected color.

T - Turn drawing trail on / off.

Tab - Select the color under the graphics cursor.

BACKSPACE - Set the color to color 255 (transparent color).

F - Floodfill a region with the current color and with the current color as a boundary.

M,P - Use M to back up a tile into a temporary buffer in memory and P to restore it. It may be wise to press M before a floodfill (F) (because sometimes you miss encapsulating the region by 1 pixel, and the whole picture gets killed, etc...)

J - Randomly plots dots of current color over any pixels having the same color as the color under the tile cursor.

[ - Random antialias of colors in color band under graphics cursor.

] - Non-random antialias of colors in color band under graphics cursor.

; - 3-Dimentionalize an image. Makes colors in different rows of the color bar either appear to stick out or stick in to the wall.

' - 3-Dimentionalize the other way.

R - Rotate the tile in a specified direction.

1 - Mark the first corner of a rectangle for a copy/paste operation.

2 - Mark the other corner of a rectangle for a copy/paste operation.

3 - Paste the selected rectangle (Note: You must press 1 and 2 in that order first before pressing 3. Pretty simple 1-2-3 for copy & paste)

4 - Flip the copied rectangular region x-wise.

5 - Flip the copied rectangular region y-wise.

6 - Swap the x and y coordinates of the copied rectangular region.

,.<> - Change the shade of the selected region.

\ - Move the cursor to the center or the tile.

| - Get the coordinates of the cursor.

 

Wad2art:

Wad2art is a nice program with which you can convert art from both Doom I and II to Duke3d. Don't try converting art from other games that use WAD files to Duke3d since it will not work!

Wad2art requires the following files:
Wad2art.exe, Editart.exe and Tables.dat.
Editart.exe can be found in the GOODIES/BUILD dir on your Duke Nukem 3D CD and Wad2art.exe can be found in the GOODIES/WAD2MAP directory. You have to copy both files to your Duke Nukem 3D directory and you have to extract the tables.dat file by running the following command:
kextract.exe duke3d.grp tables.dat

NOTE
: If you don't want your tiles in your Duke directory to be changed, put this file in another folder; for example: c:\duke3d\wadstuff\

To convert a wad use this command:
wad2art.exe NAME.wad
(or if the wad is in another directory)
wad2art.exe c:\blabla\name.wad)

The program will create 3 files while extracting:
Tiles000.art (The art file)
Palette.dat (The palette file to view the art file nicely)
Names.h (The tile names (if available))

Open the file in editart and do with it whatever you want to do with it. You can also press F12 on a texture in editart and it will be saved to Capt0000.pcx (Capt0001.pcx etc..).

- Kuffi

 

Import art with Editart:

There are 3 art formats you can import with editart:
BMP, PCX and GIF. The picture can only be 256 colours and can't be bigger than 320x200 (you can import bigger pictures though but you are going to get certain problems with it).

If you have a picture that satisfies demands then open editart. Find an empty tile where you can import your picture (you can also overwrite the other tiles but I don't know if you want that). You should go to tile 3584 (press G and then 3584). That tile (Tiles014.art) and the tile after that (Tiles015.art) are made for user art.

Now press "S" to set a size. Is your image 64 pixels width then type 64 as X and if it's 128 pixels heigh, then type 128 as Y. The tile will be filled with a pink colour which is transparent in Duke3d. Now press "U" and select your picture (it will be in the standard list if your picture is in the Duke directory, if your images is in (e.g) c:\duke3d\img \ you'll see the folder IMG in red letters in editart, enter it by pressing ENTER on it and select your picture). If you did it right the picture will fit nicely in the frame. If it doesn't; press ESC a few times until the tile is black again and start all over (but now with a different size).

NOTE: Images with sizes of e.g 7x7, 19*37 will not work correctly. Mostly editart will mess them up and even if they DO get imported nicely they will look odd if you put them on the floor in your Duke Nukem 3D Level. So use coequal digits such as: 32*32, 64*32, 128*128 etc.

- Kuffi

 

Creating and importing new skies:

The first obstacle to overcome when importing skies is editart's tendency to resize images of heights greater than 256 down to 256 pixels high. For an explanation of how to get around this problem using editart, see section II.2: Importing tiles into editart. For information on other art programs that let you paste the image from the clipboard, circumventing this bug, see section IV: Other art programs.

Skies cannot be resized like other ceiling tiles. They follow a strict size and repeat order, and their total width always comes out to 1024. Unfortunately, Duke3d does not allow you to make skies from a single 1024 pixel-wide image. Nor will it accept skies that are 512 pixels wide. Since the sky tile must repeat and come out to 1024 pixels, its width should be a power of 2 up to 256 (1, 2, 4, 8, 16, 32, 64, 128, or 256). With sky heights, 400 is a common number among the default skies, and should work fine in all cases. (Though it may not appear to tile properly in build, it will work inside the game itself.)

Duke3d uses multiple frames for some of its skies. These "panoramic skies" are made up of several images of 128 pixels in width. Panoramic skies do not simply repeat in the order they appear in editart. Each panoramic sky has its own unique repeat pattern. You can make your own panoramic skies without having to replace the originals. You will have to mimic the repeat patterns of one of the original panoramic skies, however.

Clockwise, the sky patterns are:

LA Sky--1, 3, 4, 2, 3, 2, 4, 5.
Moonsky--1, 2, 1, 1, 3, 4, 1, 3.
Bigorbit--1, 2, 3, 4, 1, 1, 5, 1

You will no doubt realize the complexity of creating skies with these patterns. In LA Sky, tile 3 will need to tile seamlessly on the left with tiles 1 and 2, and on the right with tiles 4 and 2. Consequently, you may find it difficult to construct a detailed cloud formation or mountain scene while retaining a seamlessly interlocking pattern. Cityscapes should cause little trouble, however, as you need only place buildings along the edge of tiles that border each other. Using a "landmark" image in a couple tiles is another way to make interesting panoramic skies. For example, using Bigorbit, you can make an ocean and sky background (similar to tile 94's dusk sky image) for all of the images, then place an island on tiles 2, 3, and 4. Since these tiles are not repeated elsewhere, simply make sure the repeating ocean and sky pattern touch the left edge of tile 2 and the right edge of tile 4. You could add a sun or moon in tile 5 as well, as that image also does not repeat elsewhere.

In order to make the new sky image work properly in your maps, you must first finish constructing the map. Place the first tile of your panoramic sky on all the areas where you wish the panoramic sky to appear, and parallax them. Now add one final sector to the map. In this sector, place the image of the sky you based your sky-pattern off of (LA Sky, Bigorbit, or Moonsky) on the ceiling and parallax it. Save your map. The game will force all of your skies to behave in the same way as the sky in the last sector placed in the map.

- Matthew S. Palmer

 

Animating Tiles:

Animating tiles in editart is fairly simple. Make sure you've imported the tiles you wish to animate into editart in order, then select the first frame of the animation. There are three types of animation to choose from: animate forward, oscillation, and animate backward. Animate forward runs the frames through in order from first to last, then starts over with the first frame again. Animate backward does the same thing, but starts with the last frame and ends with the first. Oscillation starts with the first frame, runs through the frames until the last frame, then moves back to the first frame from the last (if there were 5 frames, it would read 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, etc.). Assuming you want to animate forward or oscillate (animate backward has a good reason for being there, which I'll get to in a moment) go to the first frame of the animation and press either - key. This will change the animation setting from NoAnm to Oscil to AnmFD to AnmBK. Press - until you've selected Oscil or AnmFD and then press either + key. The + key changes the number next to the animation type, which indicates how many frames AFTER the first frame there are in the animation. If you have five frames of animation counting the first one, the animation number should be 4. Now press A to animate it. Select Y to save it when prompted, then use the + and - keys to increase or decrease the speed of the animation. When you have found the desired speed, press Enter. Save it when you exit or select another tile and your animation is complete. And the reason I suspect AnmBK exists is in the case of something like fire, which uses repeating animation that'll look all right whether it is moving forward from frame 1 or backward from the last frame. You might want a fire actor that burns continually, and one that dies after a a few moments. While Duke3D handles fire by animating it from the cons, the concept for using the same frames for two simple actors could be useful.

- Matthew S. Palmer

 

Importing Enemies (and 3D sprites) into Editart:

Importing enemies (or 3D sprites of any kind) demands a precise order of importation. Assuming your new enemy is 3D (having frames for side and back views of the enemy) then you'll have to place the frames in order not only of animation, but of sides. The first frame of each part of the enemies action (standing, walking, jumping, shooting, etc.) should be the frame that has the enemy facing you. The second frame should be the same pose, but facing more to the left of the screen. I've verified 4 kinds of 3D sprites in my tinkerings:

3-angles: I originally misreported this type. I'd verified that the cons accepted it as a value, but hadn't really tested it. This type uses 16 angles, but only 4 art tiles. The tiles are arranged in this order (where M means "mirrored" or "reversed") going clockwise from the front: 1M, 2M, 3M, 4M, 4, 3, 2, 1, 1M, 2M, 3M, 4M, 4, 3, 2, 1. Obviously this would only work on highly symetrical actors.

5-angles: angles range from front to left to back in 45 degree increments. Angles that face right are created by reversing the left-facing angles. Most enemies in the game use this

7-angles: smoother look, more realistic. I think this is the most realistic you can get. Angles range from front to left to back in 30 degree increments. I've tried using from 7-12 angles for homemade sprites, and other than 7, only the 8 frame method was recognized by the cons.

8-angles: the only way to get asymmetrical sprites. Angles range from front to left to back to right in 45 degree increments. If Duke's creators had used this on the first boss, for example, his gun wouldn't switch hands when you looked at him from his left side.

Alignment. Like weapon editing, enemy-importation sometimes requires adjusting the character's alignment. All images are centered automatically when imported, but sometimes this isn't always wanted. If you look at the Commander, you'll find he is not centered. By moving his alignment above the centerline, it gives the Commander the appearance of hovering, even if his sprite is Ctrl-PageDowned (moved to the lowest above-ground height in the sector--see Editart Keys section). It also seems that when an enemy shoots or spawns another sprite, the point of origin of the projectile or spawned sprite is the center-point (where the white cross's center is on the sprite in editart).

- Matthew S. Palmer

 

Changing weapon art:

A good Total Conversion always includes new weapons. Aside from editing the *.con files to change the strengths and functions of weapons, you'll want to change their appearance as well. (I'm referring to the weapons that Duke carries, rather than the ones he picks up) Keep in mind that the weapons frames have some quirks that make them more difficult to change than other tiles:

Alignment. Each weapon tile is set at a certain alignment in the tileset. For example, select a weapon frame and press the ~ or ` key (above the Tab key and next to the 1/! key). A white cross should appear in the center of the screen. You can move the image around with the mouse and arrow keys, using the cross as a way of judging how much you've changed the alignment of the tile. If you select the pistol sprite and move its alignment down, less of it will be visible in the game. Each weapon has a different alignment, and you'll likely have to play-test it a few times before getting your new weapon art aligned properly (assuming your not simply modifying the original frames). Note also that each successive frame must be aligned with the previous one, or the animation will be off.

Frame Limitations. Unfortunately, it seems that in most cases we are stuck using the same number of frames (or less) for each weapon (the exception being the RPG which has an extra unused frame; thanks goes to TerminX for showing me this). So if you want to replace duke's kick, you can only replace it with a two-frame image. Note that the mighty foot, while not animated within editart, is animated by the game in an oscillating fashion (1,2,1,2...). Some use the oscillating frames method, while others use the animate forward method (1,2,3,1,2,3...).

Overlap. Some weapons in Duke Nukem 3D use overlapping frames of animation when firing. A main frame designates the way the weapon looks when inactive, and subsequent frames alter only parts of the weapon when firing. My comrade Corv over at RTCM informs me that the purpose of this is to prevent slowdown in the game. If you replaced the whole image for each frame (of the RPG, for example), the game takes more time to process the info because it displays not only the current frame, but the first frame underneath it as well and it leads to a slower frame rate. So if you can change only parts of the weapon your game should run smoother.

Overlap also plays an important part in the Shrinker/Expander weapon, in which the crystal ammo animates at a different rate inside the weapon than the weapon does itself. The Shrinker/Expander has but 2 frames of animation, normal and firing, but its ammo runs through four frames of animation inside the weapon housing while pulsating in brightness. Keep in mind some of these quirks when editing the weapons.

- Matthew S. Palmer

 

DukeRes Art Tool:

Download it here!

DukeRes is a small art tool made by Peter Gerber. It has never been really finished but still a very handy tool. There's a few things you can do with it:
- Open GRP files.
- Load/ Extract or Modify files from a GRP-file. (modifying is only possible when it comes to art files).
- Import or extract tiles from Art-files (BMP or PCX).
- Use different palettes (you can save them as well in PSP or Windows format)
- Make animations.
- Changes X and Y-axis.

Bugs/ problems I detected:
- If you import a file it will be mirrored so invert it before importing!
- Loading palettes is not really useful.

 1. Animation in DukeRes:
This is quite easy with DukeRes.

In this example we have 3 images that need to be resized, should look well in Duke and last thing to do: the animation. For this example I used Paint Shop Pro (Paint might also do the job).

Step 1:
Okay, we got the following images:

The images are now 320*240 pixels but I want them to be much smaller. Go to Image --> Resize. The following window will pop up:

You have to tick "Percentage of original" on unless you want to resize the pixels (this is useful if you already know the original size and the size to which you want to resize it).

As you can if you fill in 50 x 50 the new size will be 160*120 (you can see that through the boxes of the "Pixel size". I decided to use 40x40 (%) so the image will be 128*96 pixels.

Resize all the images and now load the Duke palette on them as described HERE.

My images looked like the above pictures after those steps (pretty crappy eh, but ok). Mirror the images: 

Now, save the three pictures as PCX-files. For example 1.pcx, 2.pcx, 3.pcx. Import them in DukeRes (if you don't know how to do that, click HERE).

It should look like the image above now. Now on to the animation.

Start: The frame where the animation should start.
End: The frame where the animation should end.
None: No animation.
Oscillating: The animation will fluctuate (from front2back and back2front)
Forward: Animation will go forward.
Backward: Animation will go backward.
Speed: 0 = Won't move, 1 = Very fast, 2 = Bit less faster etc etc.

That's it, just be aware of the SPEED, the animation will probably move faster in DukeRes than it actually will in Duke Nukem 3D.

 2. Coordinate System

There's not too much to tell about DukeRes' coordinate system. It's just a nice feature that allows you to change the X and Y-axis for a specific tile. This option is handy for guns and enemies so they will fit nicely on the screen.


In the left menu you can see X and Y-Offset. These are changed for the shotgun so it'll fit nicely on the screen and the 2 sprites coming after the SHOTGUN sprite will fit well on this sprite if the X and Y offsets are right. You can change the X and Y axis by pressing the 4 arrows. 
Arrow right: +1 (X)
Arrow left: -1
Arrow up: +1 (Y)
Arrow down: -1

- Kuffi

 

Paint Shop Pro (7): 

Download it here! (demo)

Paint Shop Pro is a very easy to learn art program. You can't really make awesome looking textures in it but it's good (enough) for Duke3D. If you really want to make perfect textures use 3D Studio Max or Photoshop, but that's not what this part is about.

 1. Palettes + Texture Adapting and Importing:
First I will explain how you can load and save the Duke palette with PSP7.

First go to Editart, go to a texture (doesn't matter which one as long as it isn't an empty tile) and press F12. You can also do this by opening a Art-file in DukeRes (see the window above for more information) and then pressing the right mouse button and then Save as file... (see image).


Open one of these files in Paint Shop Pro. Now click on COLOURS and then on SAVE PALETTE. See the picture below.

Now create a new file:

Draw something you like (don't use too many colours!). Once you're done LOAD the palette you've made before.

Now your texture is done. Probably it doesn't like as nice as before. Save your file as a GIF, BMP or PCX. Go to editart and import it as the way described in the window "Import art with Editart".

If you want to import the texture in DukeRes you will first have to MIRROR the image in Paint Shop Pro. Click on Image --> Mirror

Now save it as a PCX file (BMP SHOULD also work but it can give errors).

Open DukeRes. Load an Art-file and on the tile you want to import your texture press Right Mouse Click --> Import. See image:

Done, that wasn't so hard was it?

 2. Standard textures:
Don't feel like learning the whole art of Paint Shop Pro? Use standard textures! If you check out the tool options of each tool you'll see they have some nice features to make textures with. There are also a few nice things in the menu that can help you:

Happy editing! If you think Paint Shop Pro is too easy for you, try Photoshop

- Kuffi

 

New Palette: 

Programs needed:
- Transpal.exe [ on your duke nukem cd ] 
- Bsuite.exe [ download ]
- Paint Shop Pro 7 [
demo ]

First you might want to click here to find info about Paint Shop Pro 7 and how to save a palette.

Okay. If you have enough of the current Duke palette and want to change it, read this. First you need to have a palette. I've uploaded the Duke Palette for Paint Shop Pro here. You can load it over an image by using:
Colors -> Load Palette

After it's opened you can edit it with Colors -> Edit Palette.
It's all pretty cushy and of course you can also make a screenshot in Shadow Warrior or Blood and then you can open the screenshot in Paint Shop Pro and save the palette as a *.pal file.

After you've made a palette it's time to convert it. Go to DOS and run Bsuite.exe (make sure the *.pal file is in the same dir as Bsuite.exe). After you've did this you will have to run Transpal.exe.

Use the standard settings namely: 32 170 30 59 11
The last three digits are otional and they indicate the RGB scales. The first two digits are the number of shades and transparency. 

Now run Duke and check out your new palette. 

Be careful though because the palette can screw up all the existing textures and the structure of the new palette should be the same as the original palette otherwise it will not work properly!

- Kuffi