Designing an R.F.O.

It's time to build the true thing! During this "training" session, you will be prompted to perform some operations which are very useful to design the R.F.O. but somewhat boring... Sorry guys! It won't be that bad.

You have been appointed Chief Engineer of the R.F.O. project.
What is an R.F.O. ?
An R.F.O. is a Rubbish Flying Object.
Let's go!

Before we go into the design, it would be better to reset Aircraft Designer 2000. While you are in the Graphic Editor, click on the first button of the tool bar. This one with a white sheet on it. An input window is displayed on the right of the screen. Enter "MyRFO" in the input data field, check the master project check box and validate. A dialog box will ask you if you want to clear the existing data (unless you are just starting a new session). Accept it. Check then that you are in the front view and enter -3.500 as the current plane "y" coordinate in the input data field in the bottom-right corner. Don't forget to validate your input by pressing the enter key.

Create a new sub-assy and call it "DICE". We will build a cubic form in this DICE sub-assy. Create a square (Draw/Shape.../square menu option). Enter 7.000 as the length of the square side in the temporary input window which is displayed on the right of the screen. You can see that the front radio button is the default setting for the plane of the shape and that the center of the shape is located in:
      0.000  -3.500  0.000
Validate by clicking on the Draw button. A square is drawn on the screen.

We will use this square as the basis of our DICE. Select the Draw/Build a cylinder menu option. The default setting for the axis of the cylinder is the vector one: it sounds good to me. The coordinates of the vector are not fitted to our purpose, replace them with the following:
      0.000  7.000  0.000
The destination sub-assy is correct (DICE): validate the input by clicking on the build button. Congratulation, Mr. Chief Engineer, you have built your first 3D volume! Select the 3D view option in the bottom-right corner of the screen and press several time on the Q key to see it in 3D. Isn't that great?


I am sure you want to see it on the tarmac. Be patient, it shouldn't take a long time. I promise. Go back to the side view and then launch the Model Editor. The main code page is pretty short:
MYRFO   MASTER
DICE    SUBASSY,T click to open sub-assy
        ENDBLOCK

There is a general rule with the Model Editor. You always need to call a sub-assy to have it displayed by Flight Simulator. The simplest way to do that is to use a GOSUB instruction. Insert a GOSUB instruction and a RETURN one before the sub-assy instruction. Have the GOSUB instruction pointing at the sub-assy:
MYRFO   MASTER
        GOSUB      DICE
        RETURN
DICE    SUBASSY,T  click to open sub-assy
        ENDBLOCK

It looks like a small piece of programme, doesn't it? The entry point is the MASTER instruction. Then it calls the subroutine called DICE and enventually it ends with a RETURN instruction. Let's have a look at the DICE subroutine. Double-click on the data field of the SUBASSY,T instruction. The DICE code page is mainly composed of TPOLY instructions:
DICE    SUBASSY,T  click to come back
        TPOLY      4;...
        TPOLY      4;...
        ...
        RETURN

We will assign a shaded color to these polygons: insert a GCOLOR instruction (Color/Texture group, shaded color option) at the beginning of the list and assign it the pale-green color (index = 13). As I told you in a previous section, we also need to transform all the TPOLY instructions into GPOLY ones. Click on the first TPOLY instruction and then click on the last one while you press the SHIFT key. All the TPOLY instructions are selected. Activate the Code/Polygon type menu option or press CTRL+P (the F10 key displays a summary of the Model Editor shortcuts). In the input window which is displayed, select the shaded option. The instruction list should now look like this:
DICE    SUBASSY,T  click to come back
        GCOLOR     13
        TPOLY      4;...
        TPOLY      4;...
        ...
        RETURN

And now, ladies and gentlemen... the compilation of the model! Click on the tenth and last button of the tool bar (this one with the small aircraft). An input window is displayed asking you for the compilation options. Accept the default settings and validate by clicking on the OK button. Another window follows immediately for the panel selection. Yes, this is a reciprocal engine aircraft and there is just one engine. Click on the write button. That's it! The compilation was successful. As there is no texture associated with the model at the moment, decline the texture copy invitation (cancel button).

Whaou... you did it! Before we test it, I propose you to save the file. Select the File/Save as menu option and enter "MyRFO" as the file name. Validate. And Now, let's try it!

Minimize the Aircraft Designer 2000 window. Then, before you launch FS2000™, copy the MYRFO.AIR file which is in this "Tutorial" directory into the "Aircraft\Test" directory of Flight Simulator. Now, you can launch FS2000™. During this training session, I advise to use FS2000™ in a window. Thus you will be able to go easily from FS2000™ to Aircraft Designer 2000 and then from Aircraft Designer 2000 back to FS2000™. Load the MyRFO aircraft and look at it in the outside view.

- Hey! That's not what I was expecting! What's that hole in front of it? I wanna my money back...
OKay, keep cool, there is an explanation for that. Go back to Aircraft Designer 2000. Select the "Desk" by clicking on its icon in the sub-assy bar. Then click on the Show sel button on the tool bar. There is a square left in the desk. That could be the missing one.

Yes, it is. When you build a cylinder, it often occurs to you that you do not need the "upper" polygon. That's why it is stored in the "Desk" and that's why it was missing in our case. Any polygon stored in the desk is not displayed. As it is the only polygon in the desk, it is selected when the desk is selected. Therefore, you just have to activate the Sub-assy/Move to sub-assy menu option and then to select the DICE in the sub-assy list-box on the right of the screen to move it to the DICE.

There is another issue with that square: it is the exact replica of the initial one (this one that you built at the very beginning of the design). That means that it is oriented in the same direction: backwards... We want it oriented forward. To do that, activate the Draw/Flip option.

Well... let's try it now...
May I remind you that FS2000™ is still running and that MYRFO is the currently selected aircraft? If you try to compile MYRFO now, it will result in an error. Do we need to abort FS2000™? Hopefully not! You just need to select another aircraft in FS2000™ before you compile MYRFO...

Anyway: the compilation will abort. Look at the error panel which is displayed:
(8) DICE: corrupted texture file or shaded polygon ill defined
(4) master: error in sub-assy DICE
compilation aborted

What does it mean?
Simply that there is an error at the eighth instruction of the sub-assy DICE, resulting in an error at the fourth instruction of the main code page and that the compilation is aborted. Let's have a look at the DICE sub-assy code page. As you can see there is a TPOLY instruction at the eighth instruction. A TPOLY instruction defines a textured polygon while there is no texture support. It should be a GPOLY instruction: a "Gouraud shaded polygon" which supports a color defined by a GCOLOR instruction. To fix the bug, you just have to double-click on the TPOLY code field and select the shaded option. You can now compile the model: the compilation will be successful and you will be able to look at the complete dice standing on the tarmac.


This dice doesn't look very streamlined, does it? We have to do something. Go back to the Aircraft Designer 2000 screen. Select the Sub-assy/Select first chain menu option. If you are in the side view, you can see that the back side of the dice is selected (it is highlighted). Activate now the Draw/Copy/Translation menu option. The vector mode is the default setting, we will use it. Enter the following numbers in the vector coordinate input row:
      0.000  -3.000  0.000
Validate by clicking on the move button. The dice is no longer... a dice. It is now some kind of a parallelepipedic volume. Press now several times the C key. The C key makes you cycle through the polygons of the currently selected sub-assy (if yout want more details on the available Graphic Editor shortcuts, press the F10 key). Do it as many times as needed to select the front side of the former dice. Activate the Draw/Copy/translation menu option and enter the following numbers in the vector coordinate input row:
      0.000  3.000  0.000
Validate by clicking on the move button.

The canopy and the pilot's head

That short beam that we have designed will be used as the main part of the fuselage. I suggest you that we add a canopy on the top of it and, after that, the head of the pilot inside the canopy. To build the canopy, we will use a half-section template class. Then to achieve a semi-transparent aspect of it, we will assign to the canopy polygons a transparency index.

Select the Template/New class menu option. Click on the half-section radio button and select the top option. Give the half-section class a name ("CANOPY" sounds good to me) and enter the number 8 in the number of sides data field. Click on the set parameters big green dot. It brings the template editor input window on the right of the screen. This template editor window asks you for the parameters of the first template of the class. Think to this template as one of the cradle of the canopy. For this particular design, I propose you to start with the rear cradle. We want this template on the top of the fuselage beam. Enter the following values in the coordinates of the origin of the first template data fields:
      0.000  -3.000  3.500

Check the U-shape checkbox at the bottom of the template editor window. Enter the following values into the height and width input data fields:
      height = 3.000
      width = 4.000
We will use the other parameter settings as they are. Validate the creation by clicking on the OK button and then again on the OK button of the class window.

Creating the front cradle of the canopy is a piece of cake. Activate the Template/New template option. Enter the following values into the height and width input data fields:
      height = 3.000
      width = 4.000
Enter the following values in the coordinates of the origin data fields:
      0.000  2.000  3.500
You cannot validate the template creation without editing the template parameters. Actually we will accept the default settings so you just have to click on the edit button and then on the OK button to close the template editor window. Validate by clicking on the OK button.

Now that we have two cradles, let's generate the polygons that will figure the canopy. Before we do that, create a new sub-assy and call it "CANOPY". Activate then the Template/Cover template menu option. The CANOPY template class is the only one which is available at the moment, it is therefore the only choice proposed in the input window associated to this menu option. Check that the cover section option is selected. As there are only two available templates in the class, they are automatically selected for this operation. Validate by clicking on the cover button. A set of polygons is automatically generated to cover the canopy.

To complete the design, we would like to figure a windshield in front of the canopy. A convenient way to do this is to create a third half-section template before the front cradle of the canopy and inside the fuselage. Aircraft Designer 2000 allows you to automatically generate the polygons joining the canopy to this third template and truncate them with the upper surface of the fuselage. Create a new template with the following parameters:
      height = 2.000
      width = 3.000
      origin = (0.000, 4.500, 1.000)
Accept the default settings in the template editor and validate. Activate then the Template/Cover template menu option and select the instersection with a plane option. Select the appropriate templates thanks to the Up/Down buttons beside the coordinate rows which display the coordinates of the template origins:
      #1 : 0.000  2.000  3.500
      #2 : 0.000  4.500  1.000
When you are finished with the template selection, click on the small OK button just below. You have now to select the instersection plane. To do this, click on one of the vertices of the dice (whichever you want!). One of the side of the dice will be highlighted with an olive color. Press then on the C key as many times as needed to select the proper side (this one on the top of the dice). When the appropriate side appears in olive, click on the small OK button in the input window. Make sure that the CANOPY sub-assy is selected (if not, click on the CANOPY icon in the sub-assy bar) and validate by clicking on the cover button. Have a look at the result on the Graphic Editor screen.


The canopy is not fully completed. We still need to cover the rear part of it. Activate once again the Template/Cover template menu option and select the cover selected template option. Select the appropriate template thanks to the Up/Down button beside the coordinate row which displays the coordinates of the template origin:
      0.000  -3.000  3.500
Click on the small AFT button at the bottom of the input window and validate by clicking on the cover button. That's it for the canopy!

To design the pilot's head, we will use a pair of horizontal section templates. Create a new template class that you will call "PILOT". Click on the xOy radio button on top of the class input window in order to select an horizontal section class. Accept the default side number (which is 12) and click on the set paremeters green button. We will accept the default parameters except for the height and width:
      height = 1.100
      width = 0.900
Exit the template editor by clicking on the OK button. Enter now the three coordinates of the origin of the first template:
      0.000  -1.000  4.000
Validate by clicking on the OK button.

To create the second template, we will use the template copy feature. Activate the Template/Copy template menu option. Enter the following values in the coordinates of the origin data fields:
      0.000  -1.000  5.500
Validate by clicking on the copy button.

Let's now generate the polygons that will figure the pilot's head. Create a new sub-assy and call it "PILOT". Activate the Template/Cover template menu option. This time, you may select one of the two existing classes or the other in the select template class list-box. Accept all the default settings (the PILOT class, the cover section option and the selected templates, the EXT button) and validate by clicking on the cover button. To be finished with the pilot's head, we still have to generate a polygon on the top and at the bottom of the head. Activate the Template/Cover template menu option. Select the cover selected template option. Select then the template defined by the following coordinates:
      0.000  -1.000  4.000
Click on the BOT button and validate by clicking on the cover button. Activate once more the Template/Cover template menu option. Select the cover selected template option. Select the template defined by the following coordinates:
      0.000  -1.000  5.500
Click on the TOP button and validate by clicking on the cover button.

Good job! Let's have a look now at the instruction lists. Launch the Model Editor. The two new sub-assies appear in the main code page.
MYRFO   MASTER
        GOSUB      DICE
        RETURN
DICE    SUBASSY,T  click to open sub-assy
CANOPY  SUBASSY,T  click to open sub-assy
PILOT   SUBASSY,T  click to open sub-assy
        ENDBLOCK

As I told you before, they need to be called from the main instruction section. Insert two GOSUB instructions and have them pointing at these two sub-assies:
MYRFO   MASTER
        GOSUB      DICE
        GOSUB      CANOPY
        GOSUB      PILOT
        RETURN
DICE    SUBASSY,T  click to open sub-assy
CANOPY  SUBASSY,T  click to open sub-assy
PILOT   SUBASSY,T  click to open sub-assy
        ENDBLOCK

Double-click now on the data field of the CANOPY sub-assy instruction in order to display the CANOPY code page. As you will see, it is a list of TPOLY instructions. We want the CANOPY to be transparent. Insert a transparency instruction (color/texture group, transparency option) at the beginning of the list. Actually, it will be the second instruction in the list: don't forget you cannot insert an instruction at the very top of the list! Give it an index of 6. Transform then all the TPOLY instruction into GPOLY instructions (CTRL+P).
CANOPY  SUBASSY,T  click to come back
        GLASS      6
        GPOLY      4;...
        GPOLY      4;...
        ...
        RETURN

Select the Page/PILOT menu option to display the PILOT code page. It is also a list of TPOLY instruction and we will use them as they are. Insert a TEXTURE/LIMITS combined instruction pair at the beginning of the list (Color/Texture group, Texture option).
Before you go ahead, you will need to copy the "Pilot.BMP" file which is in this "Tutorial" directory into the "Test" directory that you have created in the "Aircraft Designer 2000" one. You can copy the "Wing.BMP" file and the "Tail.BMP" file as well since we will need them to texture the wing and the tail.
Double-click now on the TEXTURE data field and select the "Pilot" file. Click on the half2 radio button and on the front one. Validate. We need now a texture support polygon in order to assign the texture limits. Exit the Model Editor window and activate the front view of the Graphic Editor.

The pilot's head looks pretty small on the screen. Click twice on the Up/Down button which is beside the scale data display in order to get a 1 foot per 50 pixels scale. Activate the chain creation mode (fourth button of the tool bar). In the align mode (that is with the CTRL key pressed), click on the points located at the following coordinates in order to build a polygon:
      x = -0.4500   z = 5.500
      x = 0.4500   z = 5.500
      x = 0.4500   z = 4.000
      x = -0.4500   z = 4.000
Each time, Aircraft Designer 2000 will propose you to select among two possible "y" coordinates. Select whichever you want: it does not matter since we just want to define the limits of a front texture. Validate the creation. Once you are finished with the creation of this polygon, define it as a texture support (Utilities/Define chain as support menu option).

The polygon was created in the PILOT sub-assy but we do not want to have it displayed with our model. We could move it to the Desk but there is another way to conceal it. Launch the Model Editor and select the PILOT code page. The polygon we have just created appears at the end of the list. Double-click on the code field of this instruction. The polygon type selection window is displayed. Select the Hidden option and validate. The polygon will be ommitted during the compilation of the model. Double click now on the data field of the LIMITS instructions. Click on one of the arrows in the texture limit selection window in order to select the texture support we have just defined (it is the only one in the list). Validate. The instruction list should look like this now:
PILOT   SUBASSY,T  click to come back
        TEXTURE    Pilot
        LIMITS     -0.450,0.450,4.000,5.500
        TPOLY      4;...
        TPOLY      4;...
        ...
        ...
        TPOLY      12;...
        HIDDEN     4;...
        RETURN

Let's try it! Launch FS2000™ if it is not. If it is, make sure MyRFO is not the currently selected aircraft. Compile the model. When you are asked for the aircraft panel file, click on the Keep button since we have already selected one. As we have assigned a texture to the model, click on the OK button when you are asked to copy the texture files. Here we are! Have look at the result.


Ugly, isn't it? Especially the pilot. He looks like an alien. A dummy one. Well, we are not competing for a contest, are we? It's nothing more than a tutorial... Exit the Model Editor. As you can see, the texture support is highlighted. To switch it off, you can either select the Utilities/Show no utilities menu option or press the F6 key.

The wings

It's time to add the wings. To do that, we will follow the following steps:

That shouldn't be that long... Let's go. Create a class of profiles and call it "WING". The default plane of a profile class is the yOz plane, that's fine. Two options are available: simple and biconvex, accept the default simple option. Enter the following values in the coordinates of the origin data fields:
      3.500  -4.500  0.000
Click on the set parameters button and enter the following data into the cord and thickness input data fields:
      cord = 9.000
      thick. = 1.400
We will use the other parameter settings as they are. Validate the creation by clicking on the OK button and then again on the OK button of the class window.

We will create the second profile with the template copy menu option. There are now three available classes in the select a class list box. The default one is WING: of course we will accept it. Enter the coordinates of the origin of this new template:
      20.000  -4.500  0.000
Enter then its cord:
      cord = 8.000
The thickness will be set automatically:
      thick. = 1.244

Create a new sub-assy and call it "RWING" (standing for Right Wing). Activate the Template/Cover template menu option and click on the wing tip / double radio button. The origins of the templates we want to use are the good one... but they are in the wrong order. Click once on the Down button of the Up/Down arrow pair which is beside the first coordinate row in order to set the right order:
      3.500  -4.500  0.000
      20.000  -4.500  0.000
Accept the other default parameters and click on the cover button to validate. You have built the right wing.

As we want to texture the wing, let us define the associated texture support right now. Select the Desk sub-assy and activate the chain creation mode. Select the top view and trim the scale in order to see the whole wing on the screen. Using the align mode, build a triangle which extremities encompass the whole wing:
      x = 3.500  y = -4.500
      x = 3.500  y = 4.500
      x = 22.400  y = 0.834
Validate and define the created triangle as a texture support.

Launch the Model Editor and go to the RWING code page. Insert a TEXTURE/LIMITS combined pair of instructions at the beginning of the list. Double-click on the data field of the TEXTURE instruction, click on the top radio button in the texture selection window and select the "Wing" file in the list (you did copy it in the project directory, didn't you?). Validate your selection and then double-click on the data field of the LIMITS instruction. Clicking on one of the two arrows in the selection window automatically displays the limits defined by the currently selected texture support (clicking again would cycle through the list of texture supports: don't do that now). Validate. The instruction list should look like this:
RWING   SUBASSY,T  click to come back
        TEXTURE    Wing
        LIMITS     3.500,22.400,-4.500,4.500
        TPOLY      3;...
        TPOLY      3;...
        ...
        RETURN

Close the Model Editor and go back to the Graphic Editor. Building the left wing is really a piece of cake. Select the RWING sub-assy. Activate the Sub-assy/Mirror sub-assy menu option. In the input window which is displayed on the right of the screen, enter the name of the left wing sub-assy (I sugggest "LWING"). Validate. That's it!


Launch the Model Editor and go to the LWING code page. You can see that the instruction list is the replica of the RWING instruction list. Go back to the main code page. We need to insert the sub-assy calls in the list. Insert two GOSUB instructions just after the other one and have them pointing at the RWING and LWING sub-assies. The instruction list should look like this:
MYRFO   MASTER
        GOSUB      DICE
        GOSUB      CANOPY
        GOSUB      PILOT
        GOSUB      RWING
        GOSUB      LWING
        RETURN
DICE    SUBASSY,T  click to open sub-assy
CANOPY  SUBASSY,T  click to open sub-assy
PILOT   SUBASSY,T  click to open sub-assy
RWING   SUBASSY,T  click to open sub-assy
LWING   SUBASSY,T  click to open sub-assy
        ENDBLOCK

It's time to have a look at the aircraft on the tarmac, isn't it? Check that the currently selected aircraft in FS2000™ is NOT MyRFO and compile the model. Accept the invitation to copy the texture files since we have declared a new one. Go to the FS2000™ screen.


OKay, it looks a little bit better. I am sure it would be perfect with a tail. Let's do that.

The tail

We could build the tail within this master project file but this is a tutorial and we will do it another way. Let us create an assembly that will be called by the master project. Before we do that, we will export a part of the present design in order to be able to load it into this future assembly.

Select the DICE sub-assy and activate then the Sub-assy/Select all chains for export menu option. Save the file you are working on (click on the third button of the tool bar). Click then on the first button of the tool bar in order to start a new job. Call it "TAIL" and clear the master project check box in the new project input window. Validate. Accept the invitation to clear all existing data. Activate the File/Import.../Import chains menu option and select the MyRFO file in the dialog box. Validate. An "Import" sub-assy is created in which are stored the polygons which compose the dice. That's a good start!

The TAIL assembly will be composed of

I suggest that you create immediately three sub-assies in which we will store the polygons figuring these parts. Let us call them "FUSE", "VERTFIN", "RSTAB". A fourth one, to be called "LSTAB", will be generated later by a mirror effect on the RSTAB sub-assy. Once you are finished with the sub-assy creation, select the FUSE sub-assy by clicking on its icon in the sub-assy bar. Select the side view.

We will use a section template class to build the aft part of the fuselage. Create a new class. Accept the default settings (xOz plane, section type, 12 sides). Call it "FUSELAGE". Enter the following data in the coordinate of the origin data fields:
      0.000  -6.500  -3.500
Click on the set parameters button to set the height and width of the first template:
      height = 7.000
      width = 5.000
Accept the other parameters and validate twice.

Create another template in the class at the following origin:
      0.000  -22.000  -2.000
Give it the following height and width:
      height = 4.000
      width = 2.800
Accept the default settings in the template editor and validate the template creation. Activate now the template cover menu option. Select the section type and accept the proposed templates which are the two templates that you have just created before. Validate by clicking on the cover button.

To complete the aft fuselage design, we will now use another feature of the template cover menu option. Activate this option and click on the dual summit cover radio button. Check that the template defined by the following origin:
      0.000  -22.000  -2.000
is the currently selected one. If not, click on the Up/Down button beside the first coordinate row to have it selected. Enter the following data in the summit of the cone coordinate data fields:
      0.000  -24.000  -1.000
Accept the other default parameters, validate by clicking on the cover button and look at the result on the Graphic Editor screen.


We are finished with the 3D design of the aft fuselage. Let us build the vertical stabilizer now. At the moment, we will just design the fixed part of it. The rudder is a moving part and moving parts are addressed in another section of this tutorial.

Select the VERTFIN sub-assy. Activate the chain creation mode. Create two vertices located at the following positions:
      0.000  -19.000  7.800
      0.000  -21.000  7.800
The two other vertices of this polygon must be located on the top of the fuselage. We will build them through an intersection process. Click on the inter. button to activate the instersection mode. Click on one of the fuselage vertices and then on the C key as many times as needed to select the upper side of the fuselage. Validate. Select the point located at:
      0.000  -21.000  7.800
Validate. Complete the intersection process by entering the following data:
      0.000  0.000  -1.000
into the vector coordinate input fields. Validate twice. This operation generates the third vertex on the top of the fuselage. We will generate the fourth one by a similar process. Activate the intersection mode once again. Select the same upper side of the fuselage as you did a few seconds ago. Validate. Select the point located at:
      0.000  -19.000  7.800
Validate. Enter the following data:
      0.000  0.300  -1.000
into the vector coordinate input fields and validate twice. Complete the polygon creation by clicking on the poly button. This polygon figures one side of the vertical stabilizer. To create the other side, you just have to activate the Draw/Mirror.../right/left menu option.

As we want to texture the tail, let us define the associated texture support right now. Select the Desk sub-assy and activate the chain creation mode. Using the align mode, build a triangle which extremities encompass both the FUSE and the VERTFIN sub-assies:
      y = -24.000  z = 1.000
      y = -21.000  z = 7.800
      y = -6.500  z = -3.500
Validate and define the created triangle as a texture support.

Launch the Model Editor and go to the FUSE code page. Insert a TEXTURE/LIMITS combined pair of instructions at the beginning of the list. Double-click on the data field of the TEXTURE instruction and select the "Tail" file in the list (you did copy it in the project directory, didn't you?). Validate your selection and then double-click on the data field of the LIMITS instruction. Clicking on one of the two arrows in the selection window automatically displays the limits defined by the currently selected texture support, which is the one you have just created before. Validate. Go to the VERTFIN code page and do the same thing.

Let's build the horizontal stabilizers now. Select the RSTAB sub-assy and select the top view. Activate the chain creation mode. Create two vertices located at the following positions:
      9.000  -19.400  0.000
      9.000  -21.600  0.000
As we did for the vertical stabilizer, we will create the two other vertices through an intersection process. Click on the inter. button to activate the instersection mode. Click on one of the fuselage vertices and then on the C key as many times as needed to select the right side of the fuselage. Validate. Select the point located at:
      9.000  -21.600  0.000
Validate. Complete the intersection process by entering the following data:
      -1.000  0.000  0.000
into the vector coordinate input fields. Validate twice. This operation generates a vertex on the right side of the fuselage. We will generate the last one by a similar process. Activate the intersection mode once again. Select the same right side of the fuselage as you did a few seconds ago. Validate. Select the point located at:
      9.000  -19.400  0.000
Validate. Enter the following data:
      -1.000  0.300  0.000
into the vector coordinate input fields and validate twice. Complete the polygon creation by clicking on the poly button. To create the other side of the stab, activate the Draw/Copy/Translation menu option. Enter the following data into the vector coordinate data field:
      0.000  0.000  0.000
Click on the dupl. + move button to complete this operation. The currently selected polygon is duplicated and moved along the given vector. As we entered a null vector, the duplicated polygon is created at the same location as the original one. Both polygons are oriented in the same direction: activate the Draw/Flip menu option in order to reverse the duplicated one.

We will paint the stab in red. Launch the Model Editor and go to the RSTAB code page. Insert a shaded color instruction (GCOLOR) and give it the "5" index (red color). Select then the two TPOLY instructions below and transform them into GPOLY ones (CTRL+P). Exit the Model Editor and create the LSTAB sub-assy with the Sub-assy/Mirror sub-assy menu option.

The 3D model is completed but we still have to generate the main code page. Launch the Model Editor and stay in the main code page. It contains the four sub-assy declarations. What we have to do is to insert four GOSUB instructions and a RETURN one just before the SUBASSY,T instructions. Assign the addresses of these instructions in order to point at each of the sub-assies:
MYRFO   ASSEMBLY
        GOSUB      FUSE
        GOSUB      VERTFIN
        GOSUB      RSTAB
        GOSUB      LSTAB
        RETURN
FUSE    SUBASSY,T  click to open sub-assy
VERTFIN SUBASSY,T  click to open sub-assy
RSTAB   SUBASSY,T  click to open sub-assy
LSTAB   SUBASSY,T  click to open sub-assy
        ENDBLOCK

That's it! We are finished with the Tail assembly. Before we go ahead, activate the File/Save as menu option to save the assembly file and call it "Tail".

Compile the assembly and insert it into the master project

We now need to compile the assembly. The compilation of an assembly creates a Tail.MD1 binary file which is stored into the project directory. Once the compilation is completed, open the MyRFO master project. Launch the Model Editor and stay in the main code page. Click on the last instruction of the list and insert an INSERT instruction. Double-click on the data field of this instruction. There is only one compiled assembly in the project directory. Select it and validate. The following instruction is added at the end of the list:
        INSERT     TAIL

This kind of instruction must be dealt with as we would do for a SUBASSY,T one. Insert a GOSUB instruction just after the GOSUB PILOT one. Have it pointing at the INSERT instruction. The code list should now look like this:
MYRFO   MASTER
        GOSUB      DICE
        GOSUB      CANOPY
        GOSUB      PILOT
        GOSUB      RWING
        GOSUB      LWING
        GOSUB      GOTAIL
        RETURN
DICE    SUBASSY,T  click to open sub-assy
CANOPY  SUBASSY,T  click to open sub-assy
PILOT   SUBASSY,T  click to open sub-assy
RWING   SUBASSY,T  click to open sub-assy
LWING   SUBASSY,T  click to open sub-assy
GOTAIL  INSERT     TAIL
        ENDBLOCK

You can compile it (well... if MyRFO is not locked by FS2000™!) and have a look at the result on the tarmac.


What about a short flight with it?
- Sorry, guys, F.A.A. ain't gonna give you any authorization to fly this R.F.O.!
- Why-y-y-y ?
- You've got no landing light.
- Geeeez... I forgot about this landing light.

Landing light and other stuff...

Adding a landing light is not that difficult. We will add it on the leading edge of the right wing. Launch the Model Editor and go to the RWING code page. Add a landing light instruction (lighting group, landing light option) at the beginning of the list. Double-click on the data field of the LIGHT LAND to set the color of the light (I suggest a yellow one). Then double-click on the data field of the LOCAVECT instruction to set the location of the light and the orientation of the cone. Enter the following data into the input data fields:
      x,y,z : 11.700  4.000  0.700
      vx,vy,vz : 0.000  1.000  -0.200
Validate by clicking on the OK button. You can compile the model right now if you want. Before you look at the result on the tarmac, I suggest you to exit the Model Editor and activate the View/Show light spots menu option in the Graphic Editor. The light location will appear as a cross into a square on the screen. Now, go to the FS2000™ screen.


Well... that's a little bit frustrating. It looks like the light cone is covered by the wing. It was supposed to come from the leading edge!

Actually, there is a reason for that. FS2000™ is using a technique called z-buffer to sort out the objects which are displayed on the screen. The data in the z-buffer allow FS2000™ to check whether there is an object before the one it is currently drawing or not. If not, the data in the z-buffer is updated. A light cone is not an object. It is not processed by the z-buffer. To be displayed properly, one needs to give some instructions to FS2000™.

The Flight Simulator 3D language provides an instruction to handle this kind of situation. This instruction is the JUMP PLANE one. Actually, it is a combined pair of instructions since the JUMP PLANE instruction is always used with the PLANE one. The JUMP PLANE instruction is a test instruction the result of which depends upon the position of the observer with respect to a plane. It was at the basis of any FS98™ design since FS98™ (nor CFS1™) did not use the z-buffer technique. The following example will show you how it works.

Let us suppose that the sub-assy MYTAIL represents the tail and that the sub-assy MYSTAB represents a stab. Depending upon where you are located, you will see the stab before the tail or behind it. That means that the image of the stab must be drawn after ot before the image of the tail depending upon your position. This is formulated by a conditional jump:
        depending upon the position of the observer with respect to a plane
        draw MYTAIL and then draw MYSTAB
        or
        draw MYSTAB and then draw MYTAIL

This can be achieved with the following instructions:
        JUMP PLANE LABELA
        PLANE      parameters of the plane
        GOSUB      MYTAIL
        GOSUB      MYSTAB
        RETURN
LABELA  GOSUB      MYSTAB
        GOSUB      MYTAIL
        ...

This example is no longer valid if you design for FS2000™: the sorting process between the stab and the tail is automatically performed by FS2000™ using the z-buffer. But when it comes to light cones, we will have to adapt it in order to get the light drawn at the right time. Several sections of the help file are dedicated to the JUMP PLANE instruction. If you intend to design aircraft compatible with FS98™, I strongly recommend you to have a look at it. In our case, it is not necessary to become a JUMP PLANE wizard since we will just use it in relation with the light cone.

To implement a JUMP PLANE, you need to define the plane which will be used to perform the test. With Aircraft Designer 2000, this kind of plane is called a seal. The seals are polygons which are enlisted in a dedicated utility list. Let us go back to our R.F.O. The plane which is to be used to perform the test is the plane including the leading edge polygon.


Select the RWING sub-assy and select the leading edge polygon with the C key. Activate the Utilities/Add chain to seals menu option. Launch the Model Editor and go to the RWING code page. At the beginning of the list, insert a JUMP PLANE sequence. A JUMP PLANE sequence is composed of a JUMP PLANE/PLANE instruction pair, two GOSUB instructions, a RETURN instruction, two other GOSUB instructions and another RETURN instruction. You can insert the whole block by pressing on the SHIFT+INSER keys. You also need to insert a RETURN instruction just between the LIGHT LAND/LOCAVECT instruction pair and the TEXTURE/LIMITS one. At the moment the instruction list will look like this:
RWING   SUBASSY,T  click to come back
        JUMP PLANE ?
        PLANE      undefined vector
        GOSUB      ?
        GOSUB      ?
        RETURN
        GOSUB      ?
        GOSUB      ?
        RETURN
        LIGHT LAND 4,20
        LOCAVECT   11.700,4.000,0.700,0.000,1.000,-0.200
        RETURN
        TEXTURE    Wing
        LIMITS     3.500,22.400,-4.500,4.500
        TPOLY      3;...
        TPOLY      3;...
        ...
        RETURN

Double-click on the PLANE data field. The seal selection window is displayed. Click on one of the small arrows to select the seal that you have just declared. The distance of the seal to the origin as well as the coordinates of a vector perpendicular to the seal plane are displayed on the selection window. This vector is presently pointing backwards. We would like to have it pointing forward (just for the sake of the demonstration). Click on the Reverse button and validate. You can see that the distance and the vector coordinates appear in the data field of the PLANE instruction. You just have now to assign the destination address of the JUMP PLANE and the GOSUB instructions. Do it in order to have the following instruction list:
RWING   SUBASSY,T  click to come back
        JUMP PLANE RW01
        PLANE      4.703;0.060,0.998,0.000
        GOSUB      WING
        GOSUB      LIGHT
        RETURN
RW01    GOSUB      LIGHT
        GOSUB      WING
        RETURN
LIGHT   LIGHT LAND 4,20
        LOCAVECT   11.700,4.000,0.700,0.000,1.000,-0.200
        RETURN
WING    TEXTURE    Wing
        LIMITS     3.500,22.400,-4.500,4.500
        TPOLY      3;...
        TPOLY      3;...
        ...
        RETURN

The meaning of this sequence is the following:
        position with respect to the leading edge plane?
        in front of it:
        draw the wing and then draw the light cone
        (so that the light cone can partly cover the wing)
        behind it:
        draw the light cone and then draw the wing
        (so that the wing can partly cover the light cone)

You can now compile the model and look at it on the tarmac.


That's a nice achievement for a beginner!


copyright Hervé Devred, 2001