My first night textures Fokker 70









Contents:


1. Someday in the future.......
2. Introduction.
3. Let's begin.
4. Converting the Mdl file to Scasm source code (Step 2).
5. Editing Scasm source code (Step 3).
6. Converting the Scasm source file to an mdl file (Step 4).
7. Making textures (Step 5).
8. First flight (Step 6).

Some remarks.
Background information on the V.O.F. Zaat Fokker 70.



1. Someday in the future......


The world is becoming a global village, internet has shorten the distance between the continents, shopping abroad haven't been easier.
So imagine, you want to move from Washington to New York. You can call Allied and ask them to move you stuff. But why should you look for a "local" mover. Now ordering abroad is so easy, why not take the Dutch oldest moving company. We gladly fly over, for by then they have probably an aircraft of their own!

2. Introduction.


Unfortunately Zaat is not fortunate enough to buy its own aircraft, so we have to do with a simulated one. Making an aircraft is not too difficult, but adding night effect to it is.
The lesson is meant to guide you to the process of adding night effect to a Faker 70. I clearly explain what to do. Please try to understand what you are doing, with should make adding night effect to you own aircraft a lot easier.
Look at this Chinese saying:

To hear is to forget.
To read is to remember.
To do is to master.

And that is want I'll try to do, teaching you how to use the night effects.

3. Let's begin.


For the Night Light Effects For FS 2000.html only handles the night effects, I'll concentrate on that. I'll only discuss how to edit the source code, the aircraft and textures are already been made.

To install the aircraft, unzip the F70_Zaat.zip to your FS 2000/aircraft directory.

On this moment, the Zaat Fokker 70 has come fresh form the Aircraft Factory 99 and is ready to be edit. On this moment is good to realise what you want to do with your aircraft. I have decided what to do. I want the fuselage to have shining windows at night, and a spot light on the tail. Second I want landing lights shining on the fuselage as soon as the lights are on (L-key).
First we have to identify the textures that have to be replaced. This can simply been done by viewing every ?af file in the F70_Zaat_v1\texture directory of the aircraft and identify them. Here a list of my findings:

F70_zaat.0af
F70_zaat.1af
F70_zaat.2af
F70_zaat.3af
F70_zaat.4af
F70_zaat.5af
F70_zaat.6af
F70_zaat.7af
F70_zaat.8af
F70_zaat.9af
F70_zaat.aaf
Fuselage part 2
Fuselage part 3
Fuselage part 4
Tail
Fuselage part 1
Left wing
Right wing
Fuselage part 5
Engine left
Engine right
Wheel
->replaced by Fuse2 and Fuse2_LL.bmp
->replaced by Fuse3 and Fuse3_LL.bmp
->replaced by Fuse4.bmp
->replaced by tail.bmp
->replaced by Fuse1 and Fuse1_LL.bmp


->replaced by Fuse5.bmp




So we want landing light, therefore Fuselage part 1, 2 and 3 (F70_zaat.0af, 1af and 4af) have to be replaced. For the shining windows we need to replace Fuselage part 4 and 5 (F70_zaat.2af and 7af). Finally for the tail spotlight, we have to replace F70_zaat.3af.
Now we know what have to be done we can start editing the source code.

4. Converting the Mdl file to Scasm source code (Step 2).


New it is time to use M98toBgl. Open the program and select the F70_zaat_v1.mdl in the F70_Zaat_v1\model dirextory and save it as F70_zaat_v1.wri.
If you have difficulties converting the aircraft, please read Step 2 in the Night Light Effects For FS 2000.html again.

5. Editing Scasm source code (Step 3).


Open the source file and start looking for Bitmap. This is the command that add the textures to the aircraft. The first one you find is:

...... SurfaceColor( 04 F0 )
...... Bitmap( F70_ZAAT.3AF 0 0 0 0 )

Bingo, this one belongs to the tail and have to be replaced, but by what?
For we do not want extra features on this bitmap, replacing it with a LoadBitmap command. So delete the SucfaceColor( 04 F0 ) and Bitmap( F70_ZAAT.3AF 0 0 0 0 ) and replace it by this:

...... LoadBitmap( 0 L1 EF 255 255 255 Zaat_Tail.bmp )

Let's move on to the next one:

...... ShadedColor( 09 F0 )
...... Bitmap( F70_ZAAT.3AF 0 0 0 0 )

Another one for the tail, replace also this one with:

...... LoadBitmap( 0 L1 EF 255 255 255 Zaat_Tail.bmp )

The next one is:

...... ShadedColor( 04 F0 )
...... Bitmap( F70_ZAAT.5AF 0 0 0 0 )

This is a part of the left wing. For we don't want any effects on the wings, we leave this one alone and go to the next one:

...... ShadedColor( 04 F0 )
...... Bitmap( F70_ZAAT.6AF 0 0 0 0 )

And this is the right wing, no changes here. After this one we find:

...... ShadedColor( 04 F0 )
...... Bitmap( F70_ZAAT.5AF 0 0 0 0 )

and:

...... ShadedColor( 04 F0 )
...... Bitmap( F70_ZAAT.6AF 0 0 0 0 )

We also leave these two alone. Fortunate the next one is more interesting:

...... ShadedColor( 04 F0 )
...... Bitmap( F70_ZAAT.0AF 0 0 0 0 )

We identify this one as Fuselage part 2. To this one we want to add landing lights. Delete the SurfaceColor and Bitmap and paste there (please pay attentionto the label numbers):

...... IfVarAnd(:Else_1 76 1)
............ LoadBitmap( 0 L1 EF 255 255 255 Zaat_Fuse2_LL.bmp )
............ Jump(:End_1)
...... :Else_1
............ LoadBitmap( 0 L1 EF 255 255 255 Zaat_Fuse2.bmp )
...... :End_1

This piece of code will generate landing lights on the fuselage at night. If you want to why this works, I refer to Addendum2 in the Night Light Effects For FS 2000.html. Directly after this one we find the 3 times Fuselage part 5:

...... ShadedColor( 04 F0 )
...... Bitmap( F70_ZAAT.7AF 0 0 0 0 )

Simply replace these two line every time with:

...... LoadBitmap( 0 L1 EF 255 255 255 Zaat_Fuse5.bmp )

The next one is one for the tail:

...... ShadedColor( 09 F0 )
...... Bitmap( F70_ZAAT.3AF 0 0 0 0 )

Witch should be replaced with:

...... LoadBitmap( 0 L1 EF 255 255 255 Zaat_Tail.bmp )

The Fuselage part 3 is next. This is a special one because we want to add landing lights. Delete the SurfaceColor and Bitmap and paste:

...... IfVarAnd(:Else_2 76 1)
............ LoadBitmap( 0 L1 EF 255 255 255 Zaat_Fuse3_LL.bmp )
............ Jump(:End_2)
...... :Else_2
............ LoadBitmap( 0 L1 EF 255 255 255 Zaat_Fuse3.bmp )
...... :End_2

We can forget about the next 6 bitmap commands, for they are all for the gear. After those 6 we find:

...... ShadedColor( 04 F0 )
...... Bitmap( F70_ZAAT.2AF 0 0 0 0 )

Simply replace its one with:

...... LoadBitmap( 0 L1 EF 255 255 255 Zaat_Fuse4.bmp )

Leave the next two bitmap commands alone, for that are bitmaps for the engines.
Now we have arrived to the last one that have to be edit, Fuselage part 1. This one also has landing lights. So:

...... ShadedColor( 04 F0 )
...... Bitmap( F70_ZAAT.4AF 0 0 0 0 )

Becomes:

...... IfVarAnd(:Else_3 76 1)
............ LoadBitmap( 0 L1 EF 255 255 255 Zaat_Fuse1_LL.bmp )
............ Jump(:End_3)
...... :Else_3
............ LoadBitmap( 0 L1 EF 255 255 255 Zaat_Fuse1.bmp )
...... :End_3

Now we are finished. Don't forget to save the source file.

6. Converting the Scasm source file to an mdl file (Step 4).


Copy the Scasm source file to the Source2Mdl directory (if it isn't there already). Make sure Scasm is also present in this directory.

Run Source2Mdl and enter:
for input source file: F70_zaat_v1.wri
for output MDL file: F70_zaat_v1.mdl
Next press convert. When ready, press exit. You find now the F70_zaat_v1.mdl in this directory.
Copy it to the F70_Zaat_v1\Model folder.

If you still have problems read Step 4 in the Night Light Effects For FS 2000.html again.

7. Making textures (Step 5).


At this point you should start making textures for the aircraft. To save you some time, I already made them. You can now move on the last step.

8. First flight (Step 6).


Start FS 2000 and look at the result. Set the time/season to dusk or night to see the night light effects. Press the L-key to turn the landing lights on/off.

If you like you can add animation to the aircraft. You should use Aircraft animator 1.2 or higher (although version 1.1 also work in most cases). I have already made a moving parts ini file, so you only have to save the animated aircraft (make sure ignore old moving parts is unchecked).

If you don't posses Aircraft Animator, look at the unanimated aircraft in FS 2000 (some parts will disappear while flying). If you want to have animation, go to the F70_Zaat_v1\model directory, delete the F70_zaat_v1.mdl and rename the F70_zaat_v1_mp.mdl to F70_zaat_v1.mdl.


Some remarks.


Adding night lightning to an aircraft is only a small example of what can be done with the Scasm source code. Other things that can be done for example:
-Counteract aliasing by flipping the bitmap coordinates.
-Adding bright dots on the wingtips.
-Using 512 x 512 pixel bitmaps.
There is a lot more that can be done. My advise is to experiment a little with the source file and look witch extra's features you can use.

Background information on the V.O.F. Zaat Fokker 70.


The Zaat F70 originate form a practical joke between Andre and myself. Andre has worked by Zaat for about 8 years, until back problems forced him to look for another job. He works now on Schiphol (Amsterdam Airport), and drives a "Follow Me" truck.
Some time later that year, 3 more left Zaat and applied for a job on Schiphol. His response was: if it would go on this way, in the end everybody would work on the airport. He asked me what would happen than. I told hem, Zaat probably would sell all trucks and buy aircraft instead, for all workers would be on the airport already.
The F70 Zaat was intended to show Andre how it would look like.


This documentation was made by Marco Rensen.
For questions and suggestions, please mail me:
M.J.M.Rensen@student.tn.tudelft.nl or
mrensen@dds.nl or
mrensen@xs4all.nl

© 2000 Marco Rensen
The Hague
The Netherlands

I will not accept any responsibility for any damage caused by the use of these files.