
  Gafbuilder by Kinboat / TADD
---------------------------------
  (Docs by Blackthorn / TADD)


Gafs are a mysterious and wonderful thing. A gaf
in TA can be comprised of many forms: A build menu
picture for units, textures for units (animated
and non-animated), explosion animations for weapons,
feature images (death, reclaim and movement animations
or still images). Gafs make up over 35% of the TA engine
in importance.

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

THE RULES TO MAKING GAFS -

You MUST use the Gafbuilder.pal or act palette file to get
the correct colors set for TA. Also a color of INDEX 10 (light blue)
will show up as transparent in Gafbuilder and in the game, which makes
the animations real. All animation sets must be COMPRESSED or they
will show animated in unitview but won't work right in game! 
All map features MUST be compiled into 1 solo gaf to properly
work for a map feature code.

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

Making Unit Build menu pictures - 

Make 3 images each 64x64 bmps using the GAF.act palette file
in a program like Photoshop5. Make one normal, one slightly 
25% lighter (brightness) and one greyscale (desaturate).
Use BSR's GAFFER program to easily compile all 3 images into
1 gaf (GADGET.Gaf) file. 

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

Making Animated Images / Weapon Explosions -

Lets say you want to make a new explosion like the Hellfire
has... that funky pink laser effect. First I made about 10 images
(or frames we call them)... of the general size and animation...start
to finish. You MUST use the Gafbuilder.pal or act palette file to get
the correct colors set for TA. Also a color of INDEX 10 (light blue)
will show up as transparent in Gafbuilder and in the game, which makes
the animations real. Make sure your background images are all INDEX 10
for any images you do for explosions. Now... most nuke explosions are
250x250 pixels MAX...and a small explosion like a laser hit is around
35-50 pixels by 35-50 pixels max. The bigger the pixels the slower the
animation. It is hard to balance out sometimes due to screen refreshing
and animation speeds. Now... Once all your images are ready and saved as
BMPs using the correct Gaf builder palette, open GB and make sure you
have started a new gaf, and then IMPORT SEQUENCE to import your animation 
frames. Make sure 'center images' is checked if you want all your images
to center and your explosion is pre-centered. (If it is not centered and
your animation jumps around then you can move frames around later).
Now select your set of animations (use SHIFT or CNTL to select multiple
frame/images) and then click on the >> button to add them to a frame set.

You will notice that the first frame (image # 1) is your starting frame
and shows as the subframe. This is the "Animation set header" or the first
frame that starts the whole animation set. 

You can add or remove frames here from the set as needed... 

Click ok and then it will compile into 1 set.

You should now have a compiled animation of multiple images or frames. 
Here can see that it has the number of frames you added and is an animation.
You can click on the 'Preview animation' button to watch your neat animation
in action. If you want to edit (remove any frames or add any in) you can easily
click on the "FRAME>" button to edit frames there.

<<<<<<<<<<<All animations MUST BE COMPRESSED to work properly in TA!>>>>>>>>>>>>>>

That is about it for making an explosion. Just remember to add in the proper name of
the GAF file and the GAF sequence (the animation set) in the weapon tdf.

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

Making Map Features:

Use the same priciple as above for animated sets of images.

To make solo non-animated images, just import 1 image using the IMPORT SEQUENCE option
at a time.

To add in multiple images into 1 gaf... be sure to IMPORT SEQUENCE each image, then
exit the IMPORT SEQUENCE option then go back into it for the next image, to avoid
compiling it incorrectly.

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

Making multi-sequenced frames for Map Features (for shadows, explosions, etc)

This is very tricky and documenting this is complex. Lets take an TA "Tree" for example.
The theory here is that the "Trees.gaf" has many sequence sets compiled in it; tree images,
tree explosions, tree reclaims, tree burns, dead trees, etc. That is a whole helluva lot
of images! Ok what I am getting at, is to do a true CD like animtion of a feature, you 
must add a "shadow" mask image, showing the shadow of the main feature image sequence. Next
if it burns, then you must make sequences of the burn animations, and the dead image of the
unit if it shows a burnt image after the burn cycle. If it is reclaimable, then you must
make a sequence showing the image "reclaim" away into nothing. Next, if it blows up or can
be, you must show a sequence of the feature blowing up in some manner. Whew! If the feature
blows up to a smaller look or version then you must make images of that too. Gaf making
should not be taken for granted here, making a new feature set for maps is HARD WORK and
should be appreciated, it isn't easy at all. 

Now, the idea between making a feature and making a cool shadow for it is placement of the shadow
to look exactly to the 53 degree angle of the feature itself. 

If you make a complex feature like a gasplant like in TACC then #1 the feature is an animated
sequence, #2 the shadow is animated, #3 the burn animation is an animated sequence, #4 the 
death obviously is animated...as too is the reclaim. 

Making multi-sequenced frames allows you to "fit in" frames in sections to make the "look" of the
animation seem seamless. It is complex to put into words. If you want good examples on where to
begin, look at any rocks or the wetdesert spires (that are destroyable), or trees. Each of these
from CD show multiple sequenced sets and included very complex image sets per feature.

More docs on this later if someone wishes to document this very complex procedure...

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

Making Unit Textures:

Use the same principles as above for either multiple animated sequences or solo images.
Do not make images over 96 x 96 pixels or it will slow the engine down on display.
New animtions on units should be subtle and limited to no more than 10 frames MAX, with
no more than 3 or 4 animated objects on the unit, for LAG sake.

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

Removing Sets from a Gaf:

To remove an image / set /animation from a gaf, it is so easy to do...  Just click on the
set you want to delete and hit the delete button or click on 'Remove Sequence' from the top
pull down menu.


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

Renaming Sets in a gaf:

To rename a sequence, just click on the sequence on time... wait 3 seconds, then click on it
again...  Then the hightlite bow will show and you can rename it easily.

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

Moving Image positions in a sequence:

If you need to move an image or position (like matching up a shadow to fit a map feature)
just make sure the image is active and then move the image accordingly using the X and Y
positioning system....

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

Animations Speeds (slowing or speeding an animation sequence):

Once the animation speed feature is complete in Gafbuilder, you can speed/slow each frame
in a sequence to get the correct FPS for the "look".  Usually the speeds avg around 2000
to 4000 with a 3000 almost perfect for true speed. Each frame / image in the sequence must
be set in the overall animation sequence to work correctly..and also be compressed.
Animations too fast will look bad and too slow will look silly, so take some time to 
set your speeds right for animation sequences. Speeds all depend on the amount of frames
in the sequence also, so getting it to look perfect may require some effort in timing each
frame as needed. Try this theory for determining speeds=    fps*60*number of frames

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




SPECIAL THANKS TO KINBOAT FOR ALL HIS HARD WORK TO MAKE THIS PROGRAM, Please thank him!
(but subtle donations would be better ;)