

Subject: Tips for people doing graphics add-ons to DOOM!
From: zap@lysator.liu.se (H}kan Andersson)
Date: 14 Jul 1994 11:25:57 GMT

Introduction
------------

First, I must say *DO* have great respect for the people who has done
many of the different graphics patches for DOOM. This information is
just helpful tips for people that intend to do so in the future, as
well as for the people who has done such patches already.

I AM NOT TRYING TO FLAME ANYBODYS GREAT WORK, I JUST WANT TO HELP!
==================================================================


Product names
-------------

I will here be reffering to the following product:

3DS = Autodesk 3D Studio. A commercial rendering package
POV = Persistance Of Vision - a free raytracing rendering package
ANIPRO = Autodesk Animator Pro: A nice paint program I use


Tip 1: Aliasing
---------------

The Problem:

What the DOOM engine does a lot of, is bitmap scaling. To perform this
fast enough, it simply throws away pixel rows and columns to make the
bitmap smaller, or inserts copys of rows and columns to make it larger.

When the bitmap gets larger, there is no problem, but when it gets
SMALLER, we are tossing away information. Each screen pixel "covers"
more than one pixel in the sprite or wall bitmap. In high-quality computer 
graphics, bitmap reduction is quite complicated, averaging (or even more 
complex filtering) of the removed pixels - a checkerboard grid of alternate
white and black pixels will, reduced to half height and width, become
flat medium gray. BUT THE HUMAN EYE DOESN'T NOTICE THIS.

DOOM, naturally, cannot afford the computational expenses of this. Straigt
horizontal and vertical lines will completely disappear. But depending on
the scaling factor of the bitmap, these lines will flash in and out as the
bitmap shrinks.

The Sollution:

If you look at ANY sprite or wall bitmap in doom, you will see that they
avoid sharp edges, and "sharp" pixels, single-pixel wide lines. The
bitmaps are slightly "pre-filtered". This means that when the bitmap is
viewed at full size, it may be percieved as slightly "blurred", but this
aids to make the scaling look better! 

Technically: If some of the information in a particular horizontal
(or vertical) row of pixels has "leaked over" somewhat into the adjacent
row, then when this row is REMOVED by the DOOM engine in scaling, at least
SOME of the information remains.

The BEST way to make this correct is, that when you DRAW or RENDER your
graphic for DOOM, then do it in double resolution against a MEDIUM DARK
gray background (NOT cyan). Then reduce the picture to half size with
a program that AVERAGES your pixels, so 2x2 pixels will be averaged into
one. AFTER this step, repaint the background to CYAN to allow DMGRAPH to
make it transparent (If you would have done this BEFORE, then you would
have had cyan pixels included in the averaging. Therefor the dark gray
background - because DOOM players are normally (statistically most often)
displayed against a dark gray background, and the anti-aliasing you get
from the averaging towards the dark gray background will look best. 
Using BLACK will give the players an appearance of having a dark border)

For RENDER software, such as POV RAY or 3DS, this is especially important!
The easiest way to do this is, instead of using double-resolution, to
use the render softwares anti-aliasing features. The more anti-aliasing, 
the better.

I have seen that almost all RENDERED add-ons for doom (The Aliens most
notably) do NOT use anti-aliasing. This is probably because they have 
rendered against a CYAN background. The snag is NOT to render against
cyan, but add the cyan AFTERWARDS!

Patches I've seen with these problems:

* ALIENS graphics, should use aliasing! Both the rendered aliens, and
  the weapon graphics suffer from this.
* Storm Troopers! I made my stormtroopers MUCH more handsome by going
  over them with a slight "unzag"-filter in ANIPRO.
* Many WAD's that add text to some wall tiles. If you want to add text,
  then follow the following tips:
  + Try antialiasing the text if your software can handle it. Or try
    scaling up the wall patch twice, add the text, and scale it down
    again with averaging.
  + Give the text a black "shadow" by first writing the text in black, and
    then, one pixel up and to the left, write it in the color you want it.
    I think FOREST.WAD has a few instances of text that is really hard to
    read because of lack of contrast.


Tip 2: Proportions
------------------

The Problem:

The DOOM world is a cartoon world. This means that people inside this 
world has cartoon proportions. There has been some discussion on the
meaning of a DOOM unit, and people complain about the fact that the
player is so wide compared to his height. Well, this is not so strange, 
since we are using cartoon proportions of the people. LOOK at the
sargents! Look at the troopers!

But some addons have not taken this proportionality into account. They
have used "real life" proportions of the graphics. (Most notably BAD one:
The stormtrooper for starwars) which makes their graphics look "wierd" 
when included in the DOOM world.

The Sollution:

Use the correct proportions when creating your gfx. I was able to "salvage"
the storm troopers my scaling them to 125% of their original width using
ANIPRO. After smoothing them up as mentioned in the last sections, the storm
troopers was viewable again! 

Tip 3: Motion
-------------

The Problem:

The DOOM figures is supposed to walk and run naturally around to follow you.
The graphics has 4 frames to make a complete "walk" cycle. This means that
we should have:

  Frame 1: Left leg straigt down. Right leg bent at the knee with thigh
           pointing forward but lower leg still pointing backwards.
  Frame 2: Left leg slightly bent pointing backwards. Right leg slightly
           more bent than the left, pointing forwards.
  Frame 3: Same as 1 with legs reversed

  Frame 4: Same as 2 with legs reversed

The stormtrooper graphics isn't walking. I dont know what he is doing, but
it ain't walking! Looks more like floating with spread legs....


Also, one of the most basic rules in animation (wether computer, cartoon,
or any kind) is: EVERYTHING SHOULD MOVE. If ANY part of ANYTHING does not
move AT ALL, this IMMEDIATELY looks "dead". Even when somebody in a 
cartoon stands COMPLETELY STILL, the artist often draws four or five 
different versions of standing still that is cycled through so the
image should look "alive". The ALIENS graphics is outstandingly bad in
this respect! The xenomorphs run by ONLY moving the legs!
Try walking yourself in front of a mirror, and you will verify a noticable
up-and-down motion of the body, as well as a motion of almost everything
else on the body!


The Sollution:

Well, this is difficult without the right tools. If you have 3D Studio, you
are lucky - there you can preview your walking animation and tweak it very
easily to make it realistic.

Using ANIPRO (or even non-pro animator which is cheaper) you can easily
view your 4 image animation to see if it walks nicely.

TIP for the ALIENS people: Shouldn't the xenomorph's be GALLOPPING instead?
THAT would look REALLY REALLY COOL!!!


Tip 4: Manual brush-up
----------------------

One of the neatest effects in the original characters is that the
players "light up" as they fire the gun. NONE of the patches I've seen
does this! This I added myself to my already much altered (poor?) 
stormtroopers with see-thru yellow ink in ANIPRO.

Remember when using transparency effects in paint programs NOT to have
the cyan background as cyan, because the program may attempt to smooth
and blend with the cyan color. Change the cyan palette entry to medium 
dark gray (Red Green and Blue at about 20%) and do your effects. Then
change it back when you're done!

The most important is to work against the dark gray! The human eye is
"fooled" if you have the wrong background color, and your graphics will
look too bright. EVEN if you dont do transparency or aliasing effects when
painting, turn the cyan down to gray while working to give the eye a "feel"
for how the graphics should look "in context". (The stormtrooper is really 
too brightly done, as well as the new weapons in Alien Doom, probably
because of this)


Tip 5: Organic look
-------------------

The Problem:

Rendered (or drawn) images can look really flat and boring.

The Sollution:

When rendering use TEXTURES a lot, even just to make the surface less
perfect! If your renderer supports bump-mapping (the simulation of
surface dents), USE IT! Not a lot, just a little, to add some realism.
Use texture maps! A gray texturemap scattered with random darker smooth
streaks and blobs could work wonders! The aliens is in bad need of
good textures, as well as completely different settings in the rendering
parameters, to give them that "insect" leathery exoskeleton look they
so badly needs! Now they look like flat, default-surface rendered, non-
anti-aliased aliens, instead of the slimy monsters they COULD be!


-----------------------------------------------------------------------

I hope you graphicists have use for the information given above. I 
have tried my best to be useful. I hope I will see these hints used
in future graphics patches!

Cheers!

/Z

