SITOOLS Documentation

Adrian Stephens 12th November 1991

1.        Overview of the Editor

The editor comprises three subeditors which control:

a) Shape design

b) The hierarchical structure describing the placing of shapes

c) The hierarchical structure describing island shape and features

It is possible to design shapes totally independently of the island, or to enter the shape design stage from within object placing mode.

As a first stage, I shall only describe the first of these shape designing modes.

2.        The Control Screen

This is the screen that is entered on start-up.  It provides routes to the different parts of the editor, sets various options, and allows loading and saving of individual shapes.  I will describe the buttons in turn:

Pt/Ln

Switches to Point/Line mode. In this mode the object is displayed as a wireframe model with each point represented by a circle for easy selection. This mode is used for point generation and joining points to make polygons.

Filled

Switches to Filled mode. In this mode the object is shown in its final form. This mode lets you colour and edit polygons, lines, and spheres.

StkEd

Enters the 'Stack Editor'. This provides access to the hierarchical data structure which defines the layout of the island and the objects on it. This is not documented here.

Coll

Sets the collision information for an object. This includes information about drawing other objects inside this object, which parts of this object can be landed on, and which parts can be crashed into.

NoSort

This disables/enables 'sorting'. 'Sorting' is the name given to the process of ensuring the various parts of an object obscure each other in the right way. When this button is disabled the editor makes no attempt to include 'sorting' information with the object. When NoSort is enabled (sorting disables) this button has a green border, otherwise it will have a red border.

TryHrd

When enabled (with a green border) the program runs some more advanced algorithms to determine the sorting. Some shapes cannot be sorted with the simpler algorithm.  The program recalculates the sorting information whenever the user enters 'Filled' mode and when modifications are made in that mode. With TryHrd enabled this can take a long time.

SetRej

When enabled (with a green border) the program tries to generate more efficient sorting information.  This also takes longer to generate, and is often not possible.

BlkAdd

When enabled (with a green border) the program tries to detect 'block' instructions where it performs the same operation on a range of points. This should speed object drawing in the final program. It doesn't seem to work correctly at the moment, so I advise you to leave it for now.

Write

There are two formats for object data: One is for the editor to use internally, and the other is used for displaying the object and for inclusion in the game. The latter format can be written out in two different ways: In raw binary format, or as a form of pseudocode which can then be assembled using a suite of macros. This is useful if it is necessary to hand-modify part of a shape that was generated using the editor. This is what Write does. I can't see any reason for you to ever use this feature, but you might find it interesting to use it on a simple shape to see what is written out.

FWrite

Is the same as Write, but enables TryHard, SetRej and BlkAdd first. I do not recommend you use it!

BSave

Saves out the raw binary format for inclusion in the game.

ObjDir

Sets the directory that BSave uses. It defaults to \STUNT\OBJECTS\, so such a directory and subdirectory should be set up.

ReLoad

Reloads the shape that was last Loaded.

SaveAs

Saves the current object in editor format. Objects must be saved in this format if they ever need to be reloaded into the editor.

Load

Loads an object which must be in editor format.

Save

As SaveAs, but saves using the filename that was used to Load the object.

New

Clears out the current object so that you can start a new one.

Exit

Exits the editor.

3.        Point/Line Mode

On this screen the object is displayed as a wireframe model with each point represented by a circle for easy selection. This mode is used for point generation and joining points to make polygons.

The object is shown in the left part of the screen. When the mouse pointer is moved to this area the object can be moved around and points can be selected. When the pointer is over any point the point's reference number and 3D coordinates are displayed at the top of the screen.

Beneath these are the 3D coordinates displayed in feet.  There is no fixed scale between the internal 3D coordinates and feet.  The internal coordinates are kept as large as possible to maintain accuracy, and then scaled by an appropriate factor.

The first, or X coordinate is the distance to the left (if negative) or right (if positive) of the centre point.  The second, or Y coordinate is the distance above (if negative) or below (if positive) the centre point.  The third, or Z coordinate is the distance in front of (if negative) or behind (if positive) the centre point.  Initially there is just one point at 0,0,0. This is the centre of the object.

By holding down the right mouse button in this window you can look at the object from different angles by moving the mouse. If the left button is held down as well then moving the mouse up and down will bring you closer to or further from the object.

Pt/Ln

Selects this mode, so will have no effect.

Filled

Selects Filled mode. See Filled description above.

MidPt

This is the main point generating technique. After clicking on this button selecting two points on the object will generate a third point exactly between them. MidPt will continue to be selected (shown by a green border) until another button is pressed.

Diff

Generates a 'vector' point that is the difference between two points. As the currently selected vector it will be shown as a green line from the zero (centre) point.

Set-V

Makes the current vector the vector from the zero (centre) point to the point you select.

Make-V

Prompts for three coordinates to generate a new point from. The point will also be made the current vector as for Set-V.

Add-V

Adds the current vector to the next point selected and generates a new point. Add-V remains selected, so the vector can be added to several points quickly

Sub-V

Subtracts the current vector from the next point selected and generates a new point. Sub-V remains selected, so the vector can be added to several points quickly

Dble-V

Generate a new vector which is double the length of the currently selected vector, and make this the current vector.

Half-V

Generate a new vector which is half the length of the currently selected vector, and make this the current vector.

Neg-V

Generate a new vector which is the same length of the currently selected vector but in the opposite direction, and make this the current vector.

SetGnd

This is used to set the ground level of the object. This information ensures that the object is placed correctly on the ground. Select any point that is at ground level after clicking on the button.

Cube

This is how points are normally initially generated. You are prompted for x, y and z axis extents and the eight corner points of a cuboid are generated. For example, if you responded 5000,7000, and 10000 to the three prompts then the following points would be generated:

-5000,-7000,-10000

+5000,-7000,-10000

-5000,+7000,-10000

+5000,+7000,-10000

-5000,-7000,+10000

+5000,-7000,+10000

-5000,+7000,+10000

+5000,+7000,+10000

The numbers you choose must be less than 16000.  They should be kept as large as possible to maintain accuracy.  The editor does not have a facility to change the scaling used between feet and internal coordinates at the moment, but this information can be added to an object later.

Strch

When this button is pressed it will highlight (in yellow) a representative point of each cube in the object.  After selecting a cube you can modify any of the x,y and z extents of the cube. Any point that was generated by using a point in the cube will also be affected so that modifying a cube in this way will often have the effect of changing the aspect ratios of the entire object.

Poly

Lets you define a polygon by clicking on a succession of points. The polygon will only be displayed when the points comprising it are in a clockwise direction as you look at it. To colour the polygon you must go to Filled mode.

Poly2S

As above, but generates a double sided polygon so that something is displayed whichever way round you look at it.

Mark

Is used to select a group of points to perform a 'block' command on. Marked points are shown in green, and can be unmarked by selecting the point again. Marked points affect the behaviour of MidPt, AddV, SubV, DbleV, HalfV and NegV.

UnMark

Unmarks all currently marked points.

ShoHid

Enables the display of 'hidden' points (see below). Clicking on this button again will disable their display again.

Delete

Is used to delete any unused points. Unused points will be highlighted in yellow. It will not allow deletion of any points that are used, but as points are deleted other points may then become unused, and will be highlighted.

Hide

Allows selection of a number of points to be 'hidden'. Hiding points can make the display clearer. The points are NOT deleted.

Unhide

Unhides any hidden points.

Line

Lets you define a line between any two points.

Sphere

Lets you define a sphere. Clicking on two points defines a sphere with the first point as the centre and the second on the surface of the sphere. Clicking on the same point twice defines a sphere centred on the first point, and then prompts you for the radius of the sphere. In the first instance the sphere is displayed as a line in Pt/Ln mode, in the second the sphere is not displayed at all and can only be seen when in filled mode. Go to filled mode to colour the sphere.

Contrl

Returns you to the control screen.

4.        Filled Mode

On this screen the object is displayed as a solid filled shape. This mode lets you colour and edit polygons, lines, and spheres.

As in Point/Line mode the object is shown in the left part of the screen.  And can be moved around in the same way.  When the pointer is over any polygon, sphere or line that item's reference number is displayed at the top of the screen.

Pt/Ln

Selects Point/Line mode.

Filled

Selects this mode, so will have no effect.

Colour

Lets you set an item to the currently selected colour. Colours are normally chosen by clicking on the required colour at the bottom of the screen. The <<<< and >>>> buttons scroll through the total of 256 colours.

Edit

Lets you modify an existing polygon. First click on the polygon to edit. You will be taken to the polygon editing screen. By clicking initially on any point in the polygon and then the required subsequent points, sides of the polygon can be removed or added until you click on a point already on the polygon again. Click on Exit when you have finished.

Detail

This lets you add detail to be drawn on top of an existing polygon. After selecting Detail select the polygon. This will return you to Point/Line mode and 'DETAILING' will be printed at the bottom of the screen. Any polygons or lines you add while in this mode will be displayed on top of the selected detailing-polygon. To disable detailing click on the Detail button on the Filled screen again.

Front

Detail on a polygon may consist of several overlapping polygons or lines. Front lets you select one of these to be displayed as the front-most, and will obscure polygons or lines behind it.

Back

As Front, but forces a polygon or line to the back.

Unsort

It is possible for a shape to be unsortable. This means that the editor cannot work out a strategy for drawing the polygons and spheres in the correct order from any angle. Clicking on Unsort will display all the parts of the object it did not include in order to be able to sort it. Clicking on Unsort again will re-display the sorted portion of the shape.

Style

Style allows you to set the 'style' of a polygon. At present the only styles are 'Plain' and 'Invisible'. Plain polygons are normal coloured polygons. Invisible polygons are described under 'ShoInv' below. It is unlikely that you will want to use this feature.

ThickL

Displays lines as thin polygons. This is necessary to be able to select lines for colouring, deletion etc. Click on this button again to revert to normal line drawing.

ShoInv

There exist what are known as 'invisible' polygons. These may be generated by the editor if TryHrd is enabled (see above). They are used in the sorting of the object, but are not displayed. 'ShoInv' enables the display of these polygons in the editor. This feature is disabled by clicking on ShoInv again. Invisible polygons flash black and white.

Delete

Allows deletion of polygons, lines and spheres.

Hide

Works like Hide in Point/Line mode but hides polygons, spheres and lines instead.

Unhide

Unhides any hidden polygons, spheres or lines.

PikCol

Lets you select a colour from the screen. After clicking on this button click on any pixel on the screen and the currently selected colour will be the same as the colour of that pixel.

Contrl

Returns you to the control screen.