This section will help you to get accustomed with the Model Editor.
During this "training" session, you will be prompted to perform some operations which
are quite useless... Sorry guys! It won't be that bad.
Before calling the Model Editor, you need to declare a few "texture limits".
You will see a little bit later on how to do that.
This is not mandatory but you will better understand the Model Editor
operation if you do that. It would be also preferable that you have two or three sub-assies
available (not including the Desk). Populate these sub-assies with a few polygons in
each of them: some triangles that you build by clicking randomly on the screen in the create a chain
mode. And... I don't want to bother you but... what about moving a texture bitmap
(128x128, 256x256 or 512x512) file into the Project directory?
OK. So, I assume it didn't take you long to do that.
Select one of the polygon you have created by clicking on one of its vertices and
then select the Utilities/Define as texture support menu option. Do it
again for a couple of other polygons.
Launch the Model Editor (10th button of the tool bar or File/Model Editor menu
option or F9 key). The Model Editor window is now displayed on the screen.
The Model Editor window is composed of:
Clicking on an instruction selects it. If you click on an instruction and then
click on another one while pressing the shift key, you select
several instructions.
At the moment, the instruction list is pretty small: a few lines. It is the high
level instruction list, also called the main code page. You should see the
following instructions (I assume you called the project MYNAME and the sub-assies MYSUB1, MYSUB2...
Yeah, I know, I told you to call them TOTO and TOTO1...):
MYNAME MASTER
MYSUB1 SUBASSY,T click to open sub-assy
MYSUB2 SUBASSY,T click to open sub-assy
MYSUB3 SUBASSY,T click to open sub-assy
ENDBLOCK
Of course, if you didn't check the master-project option when you named the
project, you would see something different:
MYNAME ASSEMBLY
MYSUB1 SUBASSY,T click to open sub-assy
MYSUB2 SUBASSY,T click to open sub-assy
MYSUB3 SUBASSY,T click to open sub-assy
ENDBLOCK
Double click on the data field of a SUBASSY,T instruction: the Model Editor now
displays the instruction list related to the given sub-assy:
MYSUB1 SUBASSY,T click to come back
TPOLY 3; 1, 2, 3
TPOLY ...
...
RETURN
Each TPOLY instruction represents a polygon of the selected sub-assy. Let's take a few minutes to play with these instructions. Select one of the TPOLY instructions by clicking on it. Then click on the fourth button of the tool bar (the button figuring scissors). Nothing happens, except a warning message in the status bar. You can't delete a polygon in the Model Editor. You can't delete the first instruction of the list or the last one either. Try now to move a TPOLY instruction. Select it and click on the Move To button of the tool bar (the third one). The cursor is changed: you are in the move to mode. Click on another instruction. The previously selected instruction is inserted just before the instruction you clicked on. Try to do that with the first or the last instruction: nothing happens and a warning message is displayed in the status bar. In the Model Editor, there are different category of instructions:
Insert an instruction
Click once on the second instruction of the list. The field you clicked on is
highlighted. Now click on the second button of the tool bar. An instruction
selection panel is displayed in an input window. The following options are
available:
The Insert Assembly option is only available if you are in a master-project. Click on the different radio buttons to see more on the various options. For instance, click on the Jump radio button. The following options are made available in the right part of the input window:
Insert now another instruction: let's go for a RETURN for instance. If you are not
happy with that RETURN instruction you have just inserted, double-click on the code
field of it: the instruction selection panel is displayed again and you can modify
your choice.
Clipboard
The Model Editor features a clipboard. It can be activated through the Edit
menu or by clicking on the appropriate buttons of the tool bar.
To put instructions into the clipboard, you can cut them or copy them. Then you can paste
the clipboard directly in place of the current selection or insert it just
before the current selection. The access to the clipboard follows rules which are
described in the Help file. Create a few instructions (RETURN, GOTO, GOSUB...) and
play with the clipboard options to get accustomed with them.
Jump addresses and labels
Many instructions of the instruction set require a destination address in their
data field. These are the Jump instructions or subroutine calls as well as the Flight
control instructions and advanced instructions. We will see later on how to use
these instructions. The point is, at the moment, how do we assign a destination
address to an instruction.
Let us insert a couple of instructions into a sub-assy code page. For instance,
insert the following sequence in the MYSUB1 sub-assy :
MYSUB1 SUBASSY,T click to come back
GOSUB ?
JUMP PROP ?
RANGE 0,60
RETURN
GCOLOR ?
GOTO ?
RETURN
TPOLY 3; 1, 2, 3
TPOLY 3; 4, 5, 6
TPOLY ...
...
RETURN
Once again, the meaning of this sequence does not matter, it is just a way to make
you understand how Aircraft Designer 2000 deals with labels and destination addresses.
Double-click on the data field of the first GOSUB instruction in the list. The
cursor appearance changes: it was a small arrow, it is now a finger pointing
upward. The Model Editor is in the addressing mode. To exit this mode and resume
the normal mode, you must point at an existing label, or point at a non-labeled
instruction, or click on the first button of the tool bar. At the moment, there
is no predefined label and we have no reason to resume the normal mode either: I
suggest you to click on the first TPOLY instruction in the instruction list. The
cursor goes back to its normal appearance and a label input window is displayed.
You must enter an alphanumeric label (8 characters maximum): let's go for MYLABEL.
Validate by clicking on the OK button.
MYLABEL looks good, but what if we need other labels ? I suggest we turn it into
MYLABEL1. To do that, double-click on the label field of the TPOLY instruction we
have just labeled MYLABEL. The label input window is displayed again, with MYLABEL
in the input field. Turn it into MYLABEL1 and validate by clicking on the OK button.
Have a look at the GOSUB instruction at the beginnig of the list: it is now
pointing at MYLABEL1. Aircraft Designer 2000 keeps dynamics links between the destination addresses
and the labels of the instructions which are pointed at.
Double-click now on the label field of the second TPOLY instruction and assign it
the MYLABEL2 label. Go back to the first GOSUB instruction and double-click on its
data field (it is presently pointing at MYLABEL1).
Aircraft Designer 2000 goes into the addressing
mode and the finger cursor is displayed. Click on the MYLABEL2 label. Look at the
result: the GOSUB data field is now indicating MYLABEL2 instead of MYLABEL1.
One more experiment ? Select the GOSUB MYLABEL2 instruction by clicking on it.
Copy it in the clipboard (sixth button of the toolbar). Insert and paste the
clipboard (eighth button of the toolbar) somewhere in the instruction list before the
MYLABEL2 TPOLY instruction. Another GOSUB MYLABEL2 instruction is created.
Double-click on the label field of the MYLABEL2 TPOLY instruction. Turn the
MYLABEL2 label into MYLABEL3. You can see that the destination address of both
GOSUB instructions is updated accordingly.
Color and Texture
If you followed the instructions I gave you, there should be a shaded instruction in the list.
If not, that's not an issue: insert one (COLOR/TEXTURE group, shaded color option)
somewhere in the list. Don't forget you cannot insert an instruction between the two instructions of
a combined pair...
GCOLOR ?
Double-click on the question mark: a color selection window is displayed on the
screen. Select one of them and validate. The question mark is replaced by the
index of the selected color.
Shaded colors only applies to shaded polygons (GPOLY instruction). All the polygons
of the sub-assy are presently of the TPOLY kind. To switch from the TPOLY to the
GPOLY status, you can either double-click on the code field of each TPOLY
instruction to select the shaded status or select all the TPOLY instructions and use
the Code/Polygon type menu option. Be aware that this is the source of
frequent errors. One often inserts a GCOLOR instruction without transforming the
related TPOLY instructions into GPOLY instructions. Moreover, if no texture were
defined this will result in a compilation error.
So, let us insert a TEXTURE instruction (COLOR/TEXTURE group, texture option).
The following combined pair of instructions is inserted in the list:
TEXTURE ?
LIMITS undefined limits
Double-click on the question mark: a texture selection window is displayed.
The left part of the screen features a white square and the right part a list of
texture files. If you have moved a BMP file of an appropriate size into the
directory file, you should see its name in the list. Click on it: it is displayed
in place of the white square. Play with the radio buttons in the lower-right part
of the window. Clicking on the half1 or half2 radio
button applies a mask on the texture. Thus, you can use the same texture file with
different parts of the model. Validate (OK button). Now, double-click on
the data field of the LIMITS instruction.
If you have defined texture supports in the Graphic Editor as I told you, an input window
will appear on the screen.
In the upper part of the window, three buttons can be seen: a left arrow,
a right arrow and a center button. By clicking on the arrows, you cycle through the list of available
texture supports. The limits of the texture they define are displayed on the input window. Validate
a selection: the limits of the texture they define are now displayed in the data field of the
LIMITS instruction. Not happy with the selected texture support? Double-click on
the data field to modify your choice.
Lines
Polygons are not the only parts that you can use in the 3D model. Sometimes, you
will have to figure a simple line. Close the Model Editor window and go back to
the Graphic editor. Select one polygon and edit it: in the chain editor panel,
click on the line button. You have transformed a polygon into a line. While you
are in the Graphic Editor, why not adding a new sub-assy and a few polygons? And
why not deleting some of the existing one? Hey! Don't delete the line, we will
need it.
Now, launch again the Model Editor. You will notice several things:
Advanced instructions
The Flight Control group and the misc. advanced group feature the
instructions used to animate the moving parts. I advise you to look at the Help
file to better understand how they work. At the moment, it's enough to say that
they are combined instructions. The VECTOR instruction which is associated to
them call for a vector, to be defined in the Graphic Editor, and three angles.
Vectors are defined with the Utilities/Make a vector menu option.
If vectors are available
in the vector list, double-clicking on the data field of a VECTOR instruction
displays an input window which allows you to select a translation vector and enter
the three angles.
The INSERT instruction allows you to insert an assembly in the master-project.
An assembly acts as a sub-assy. It is advisable to call it by a GOSUB instruction
rather than by any other jump instruction.
Close the Model Editor window.