
Last revision of document: July 9, 1996


Supplementary Game Utilities
----------------------------

In the $GAMES_LOCATION/plugin directory there are a number of game content
creation support tools. These are generic tools that are meant to help in
games content creation for any platform. So far all the tools listed below
are plugins that will appear (once setup for loading them has been completed)
in the 'Polygon Edit' section of the main Alias tool Palette.

NOTE: feedback from these tools will be displayed on the promptline - it is
      recommended that when using them you keep the promptline history window
      open.


Adding these tools to Alias
---------------------------

This note assumes that the game system has been installed into the default
location of $ALIAS_LOCATION/ODS/Games/.... ($GAMES_LOCATION).
Installation notes are provided separately. To add these tools to
the 'Polygon Edit' set of tools in Alias do the following:

1. Set the plugin search path to include the $GAMES_LOCATION/plugin/lib 
   directory.  Use the Plugin Manager found under the Utility menu to add
   in the plugins wanted.

2) Use the browse feature of the Plugin Manager to locate and load the
   wanted plugins.


3) Plugins should now appear at the bottom of the Polygon Edit section of 
   the Alias tool palette.


Special Per Polygon Tagging Tools
---------------------------------

Polygons in Alias now have special 'Games oriented' data fields (called
GamePoly data fields). These fields store special "Quad Texturing" information,
as well as two "User Tag" fields to store your own special data. The Quad
Texturing fields will affect how polygons are displayed (in toggle shade) and
how polygons will render in Alias (it is a feature which allows a texture
swatch per polygon for toggle shade, rendering, and for output to game plat-
forms).

NOTE: to see file textures in toggle shade you must ensure that 'Fast Options'
      is OFF in the Toggle Shade option box when executing Toggle Shade.

The fields used for Quad Texturing in Alias are:

   Quad Texturing
   Tile X
   Tile Y
   Texture rotation
   Texture flip

Further documentation will be provided separately to detail the Quad Texturing
mode for polygons.

A number of tools have been provided to assign and access the GamePoly data
fields (the Quad Texturing and User Tag fields). These are described below.


1. Game Poly data Editing (single polygon)
------------------------------------------

gamepoly.plugin

  * A continuous function - select this tool then use mouse to select polygon
    to edit GamePoly data fields. Selection occurs for a single polygon at a
    time.

  * Once selected a GamePoly data edit window pops up. Changes in any of the
    data fields are applied immediately to the polygon.

  * Click on another polygon to edit it or use the PREV and NEXT buttons on
    the edit window to edit the previous or next polygon in the polyset.

  * If the polygon has been assigned a shader that contains a file texture
    use the SHOW PALETTE button to display the file texture gridded to
    swatches. Click on a swatch to change the X/Y tile assignment for the
    polygon.

  * If the Quad Texturing flag is ON the polygon will render and toggle shade
    with the assigned Quad Texture fields applied. This flag is checked by
    toggle shade and the renderer no matter what kind of shader is applied ...
    however, this mode is only meant for file textures that are compilations
    of smaller texture swatches.

  * If in toggle shade mode and some assignments don't seem to be taking
    affect toggle shade mode off then on again.


2. Game Poly data Assignment (multiple polygons):
-------------------------------------------------

tagPolys.plugin

  * A momentary plugin that allows assignment of GamePoly data fields on
    all 'active' polygons. An 'active' polygon is one that has all of its
    vertices picked (i.e. active). Also, any Polysets that are picked means
    that all of the polygons in those polysets are 'active'.

  * Double click on the TagPolys icon to pop up its option box.

  * Adjust the GamePoly fields as desired. Click on each 'Updt' check box
    to switch ON or OFF. Only if a specific field has its associated 'Updt'
    check box ON will the fields value be assigned to the same field in the
    polygons GamePoly data. For example if you only wish to assign a 'Quad
    Tex Flag' to all 'active' polygons then set all other Updt check boxes
    OFF and set the 'Updt Quad Tex Flag' ON, then click on GO to execute.

  * The User tag fields 'User1' and 'User2' are assigned 8 bit numbers here.
    These can mean whatever you want them to mean. These are useful for any
    game specific tags you need to assign. If you want to break this down into
    smaller units (and consequently get more user tag fields) you can use the
    companion 'uTagPolys.plugin' specified below.

  * Single click on the TagPolys icon to execute assignment without popping
    up the option box. Whatever values were saved or were set from the last
    execution of the plugin are used.

  * To see what has been assigned, via this plugin, to polygons you can use
    the companion 'chkGameTag.plugin' specified below.


3. Display Texture Group Image (single polygon):
------------------------------------------------

showTexGrp.plugin

  * A momentary plugin that will generate a Texture Group (swatch palette)
    reference image and display it for the first 'active' polygon found;
    where 'active' polygon is as described above - except this plugin only
    looks for active vertices (no active polysets) to determine an active
    polygon.

  * To use, select all the vertices of the polygon you want the reference
    Texture group image for then click once on the ShowTexGrp icon.

  * A Texture group reference image is generated only if the 'active' polygon
    found has a file texture assigned to it. Also, the reference image will
    only make sense if the file texture assigned is a compilation of texture
    swatches.

  * X and Y tile numbers are displayed on the reference image to assist in
    assigning these Game Poly data values on polygons, via the TagPolys
    plugin.

  * Once the reference image is displayed you can drag it's widow around,
    minimize it or close it. Clicking in the image area of the window will
    close it.

  * Double clicking on the ShowTexGrp icon will open an option box for you
    to specify the color (in R, G, and B) of the background on which the
    texture group swatches are displayed.


4. Game Poly User Tags Assignment (multiple polygons):
------------------------------------------------------

uTagPolys.plugin

  * A momentary plugin that allows assignment of GamePoly User Tag fields on
    all 'active' polygons. An 'active' polygon is one that has all of its
    vertices picked (i.e. active). Also, any Polysets that are picked means
    that all of the polygons in those polysets are 'active'.

  * Double click on the UTagPolys icon to pop up its option box.

  * You can select the assignment mode for each of the two user fields. The
    two different modes are 'Two 4 bit values' and 'Eight 1 bit flags'. The
    first mode allows for setting 2 numbers (each has value between 0 and 15)
    for EACH of the 2 user tags. The second, 'bit flags', mode allows for
    the setting of 8 flags (ON or OFF) for each of the 2 user tags.

  * In either mode assignment will only occur on 'active' polygons, and only
    to the parts of the user tags that have their associated 'Updt' or
    'AFFECT flag' check boxes marked ON.

  * To see what has been assigned, via this plugin, to polygons you can use
    the companion 'chkGameTag.plugin' specified below.

  * If you wish to rename the names of the separate 4bit or 1bit user fields
    for the option box you can edit the field names in the file:

        $HOME/AW_Games/GameTools/TagPolys/uTagPolys_init.scm

    WARNING: be careful when doing this since editing the wrong thing could
             make the option box all messed up. There is a backup copy of
             this file in the same directory called uTagPolys_init.scm-bkup

             ... also for your changes to take affect you must restart Alias.


5. Checking Game Poly Data fields (multiple polygons):
------------------------------------------------------

chkGameTag.plugin

  * A momentary plugin that will read and display GamePoly fields values on
    all 'active' polygons. An 'active' polygon is one that has all of its
    vertices picked (i.e. active). Also, any Polysets that are picked means
    that all of the polygons in those polysets are 'active'.

  * If 5 or less 'active' polygons are found then the information is displayed
    on the promptline. Otherwise, a file is created containing the info and
    'jot' (a text editor) is launched to display it.

  * Double click on the ChkGameTag icon to open its option box. The options
    allow you to specify how you wish to display the User Tag fields. These
    can be displayed as single 8 bit values (0 to 255) each, or they can
    be displayed as two 4 bit values (0 to 31) each. Also, they can be
    displayed as eight 1 bit flags (0 or 1) for each of the two User fields.
    Click on Go to execute.

  * In 4 bit value mode the user field values displayed are marked with H or L
    with H meaning high 4 bits and the L meaning the low 4 bits.

  * In 1 bit flags mode the user field value is displayed with an H at the
    very left of the value shown in binary (ones and zeros) to denote the
    high bit is to the left and the low bit is the rightmost bit.

  * Single click on the ChkGameTag icon to execute without opening the option
    box.


6. Adjust Vertex Texture Coordinates (multiple vertices):
---------------------------------------------------------

adjTexCoord.plugin

  * A continuous plugin that allows you to shift/adjust texture coordinate
    values on all active vertices.

  * Pick all polyset vertices you wish to affect. Use Pick->CV or
    Polygon Edit->Pick->Vertex to do this. Then single click on the
    adjTexC icon to start its execution.

  * Use keyboard entry to adjust texture coordinates of all active vertices
    by those amounts. Always enter two decimal values separated by a space.
    A value of 0 means do not adjust in that coordinate. The first number
    is the adjustment in S (or U) and the second is an adjustment in T (or V).

  * Values are kept between 0.0 and 1.0 so anytime an adjustment puts a
    texture coordinate value out of this range the value is assigned the
    closest value of 0.0 and 1.0.

  * The mouse/left-mouse-button can be used to adjust the texture coordinates
    by mouse moves. Hold the left mouse button down and drag the mouse around.
    Texture coordinates in S (or U) are adjusted by increments based on
    mouse movement going left and right. Texture coordinates in T (or V) are
    adjusted by increments based on mouse movement going up and down (screen-
    wise).

  * It's best to be in toggle shade mode (with Fast Options OFF) when using
    this tool. This allows you to see the changes on the texture placement
    as you adjust.

  * NOTE: using the mouse to adjust is a little awkward to use - it is
          recommended that a copy of the object is made or you save the
          file before doing this. It may be wise to do this even if you
          are using the keyboard entry method.


7. Polygon Selection by Index (multiple polygons - single polyset):
-------------------------------------------------------------------

selectPolys.plugin

  * A continuous plugin that allows you to select or make 'active' polygons,
    by entering their index numbers, on the first active polyset found. Make
    'active' on a polygon means pick, or make active, all of its vertices.

  * First pick the polyset you wish to select polygons on. Use Pick->Component
    or Polygon_Edit->Pick->Polyset to pick a polyset.

  * The polyset to select polygons on is the first active polyset that is
    found on the pick list. If one is found it's name is displayed on the
    prompt line, along with instructions to:

        'Enter p or u & list of polygon #:'

    ... use the keyboard and enter p or u (this is for Pick or Unpick) and
    a list of polygon indices (starting at 0), separated by single spaces.
    Maximum of 15 polygon indices entered on the prompt line will be
    processed.

  * If an index entered is a valid one for that polyset then the polygon
    at that index will have all of its vertices picked (made active) if 'p'
    was entered or all of its vertices unpicked (made unactive) if 'u' was
    entered.

  * The picked polyset that is processed remains active until polygons are
    selected to be 'active'. The plugin will continue to process only the
    first found picked polyset until another polyset is picked and this tool
    is clicked on again.



[END]
