 | Creating scenery for Micro Flight |  |
|
The tile based
scenery is the most common scenery type in Micro
Flight, it is defined by a large bitmap which
holds the DEM ( Digital Elevation Model ) , and
another which holds the objects information.
Inside the scenery directory
of Micro-Flight there are one or more sub
directories, each of them containes one scenery
area, inside each scenery area there are several
file types.
 | Scenery.ini |  |
|
The Scenery.ini file is a very simple file that
containes the basic scenery parameteres, these
parameteres are:
Sample:
|
1000
[land_size]
4 [num_div]
12 [k_alt]
256 [tile_size]
6.4 [east_coord]
-44.35 [south_coord]
@
European Flavor:
Based upon the digital elevation model of
the southern part of france, the European
Flavor scenery offers an amazing variaty
of topography and gliding conditions.
From the mediterrainian sea in the south
to the snowy peaks of the Mont Blanc.
stretches on of the most beutiful and
peacefull places on earth.
This scenery is the perfect place to
start your MicroFlight experience using
gliders, ultralights and other micro
aviation vehicles. |
Explanation:
|
| Land_size |
the
size in meters of each tile in the
scenery, a tile is defined as a
rectangular segment of the height
elevation matrix of the scenery, a tile
may have two or more points of elevation
along each side. |
| Num_div |
the
number of elevation segments
along each tile side. |
 |
| K_alt
|
factor
by which to multiply values in the
map.bmp to get real height. |
| Tile_size |
the
size in pixels of the texture which may
be associated with each tile, this
parameter is used only when a large
scenery image called photo.bmp exists,
this image will be divided according to
tile size. |
| East_coord |
the
east coordinate of the left side of the
scenery. |
| South_coord |
the
south coordinate of the bottom side of
the scenery. |
| @ |
a
seperator, after which the description of
the scenery follows. |
 | Map.bmp |  |
|
The map.bmp file is a simple
bmp file with 1024x1024
pixels and 256 colors, the file was made similar
to an ordinary map on purpose, each pixel has a
color which is directly related to it's height
above sea level.
Here is a small portion of
the map file enlaged to make the pixels
visible,and the color palette used to make it
appear as a topographic map.
As you can see the blue
color which marks the sea is also the first entry
in the palette ( the zero value ) and the
following colors are more and more green then
yellow then brown just as you would expect in a
map.
Each color value is directly
related to the hight of this point above the sea
level which is the zero value, the ship itself
can sail only in the blue areas.
To create your own map you
can either import a DEM ( Digital Elevation Map )
into some image editing tool and save it as a
map.bmp, or you can simple draw the image or
modify it yourself with any image editing tool.
special care must be taken
to work on the same palette as this file so as to
keep elevations related to their palette values.
 | Nav.bmp |  |
|
The nav.bmp file is a simple bmp file with any
size and color count, this file is used for only
displaying inside the map view and can be made as
a navigation map.

If this file does not exist
the obj.bmp or the map.bmp will be displayed
instead on the map view.
 | Obj.bmp |  |
|
Since each tile in the
scenery has num_div
points of elevation along each side, and the
elevation matrix file map.bmp is 1024x1024 pixels in size, there will
be 1024/num_div
tiles along each size of the scenery matrix.
The obj.bmp file dfines the
objects that will be used for each tile, therfore
is a bmp file with (1024/num_div)
x (1024/num_div)
pixels and 256 colors, the file sppears to be
similar to an ordinary map but actually containes
different pixel values, each pixel has a color
value which specifies which types of objects are
located on that location.
The palette of this file is
made of colors 1 - 200 which are used for objects
definition purposes and of colors 201 - 255 and 0
for the purpose of making it look like a map and
have no other purpose.
Here is a small portion of
the obj file enlaged to make the pixels
visible,and the color palette it uses.
As you can see on the part
of the obj file, there are several pixels with
red, blue or white colors, these are color values
that are in the range of 1 - 200 and therefore
are used for creating objects in that place, the
rest of the map is ignored by the program and is
used only for visual purposes of showing the map
view inside the program.
What the colors mean:
When a color value of 1 -
200 is detected , the program searches for a file
called p###.def where the number is the color
value, for example p200.def for color value of
200.
These files are located
inside the models directory and have very simple
structure which is explained in the following
section.
 | Texture.bmp |  |
|
The Texture.bmp file is a simple bmp file with (1024/num_div)
x (1024/num_div)
pixels and 256 colors, the file sppears to be
similar to an ordinary map but actually containes
different pixel values, each pixel has a color
value which specifies which textures are located
on that location.
The palette of this file is
made of colors 1 - 200 which are used for texture
layout definition purposes and of colors 201 -
255 and 0 for the purpose of making it look like
a map and have no other purpose.
The file is similar in
structure and function to the obj.bmp file but
the the color indexes are used to determine which
custom texture to be used for the given land
pixel.
What the colors mean:
When a color value of 1 -
200 is detected , the program searches for a file
called txt###.bmp where the number is the color
value, for example txt200.def for color value of
200.
These files are located
inside the graphics directory of the program or
scenery and have and are used for land texture of
the given land tile instead of the default
txt#.bmp files.
 | Tex###.bmp |  |
|
These are a series of textures with the size of
256x256 and 256 colors which are mapped by the
program to different altitudes, the lowest values
are the ones near the coast and the highest
values are the taller mountaines.

Threre are three additional
textures : cliffs.bmp is
assigned by default to the highest value, waves.bmp is
assigned to sea level, sand.bmp is
assigned to transition between sea and land.

You can choose different
textures to customize your scenery appearance and
adapt it to different locations in the world, for
example you can choose ice textures for
antarctica, or sandy beaches for tropical
islands.
In addition to the standard
land textures, the txt###.bmp
files can be used as optional ground texture
files with the texture.bmp
layout file, you can have as many as 200 specific
textures associated with each sceney and use them
to carefully construct an area made of actual
aerial photography.
 | P###.def |  |
|
As there are 200 possible
color values for object definitions, there may
also be 200 different types of def files from
p001.def to p200.def located inside the models
directory, and also inside each scenery
directory.
Each def file defines a
single collection of objects and actions that may
be located inside a rectangular area that is
defined by one tile in the scenery ( each tile is
composed of num_div x num_div pixels of the
elevation matrix ).

| The structure of the def file
can be seen in this sample: |
11 number of objects
buildrw1 0.25 0.25 0.0 0.0 3 3 4 object parameters
buildrw1 0.25 0.75 0.0 0.0 3 3 4
buildrw1 0.75 0.25 0.0 0.0 3 3 4
buildrw1 0.75 0.75 0.0 0.0 3 3 4
tree_5 0.375 0.375 0.0 0.0 5 5 5
tree_5 0.375 0.875 0.0 0.0 5 5 5
tree_5 0.875 0.375 0.0 0.0 5 5 5
tree_5 0.875 0.875 0.0 0.0 5 5 5
Light 0.5 0.5 0.25 0.0 255 255 255
Sphere 0.5 0.5 0.08 1.5 255 255 255
pole 0.5 0.5 0.0 0.0 10 4 10
0 |
| Object names can be any name or
one of the following |
Patch - a flat runway segment
with lights using a texture called patch##.bmp , the
parameters are:
pos_x, pos_y, pos_z, width, angle, delta_angle, height.
At night lights will be created on both sides of patch,
with white color.
|
DarkPatch - a flat runway segment using a texture called patch##.bmp , the
parameters are:
pos_x, pos_y, pos_z, width, angle, delta_angle, height.
At night lights will be created on both sides of patch,
with white color.
|
Road - a flat road segment
with lights, using a texture called road##.bmp , the
parameters are:
pos_x, pos_y, pos_z, width, angle, delta_angle, height.
At night lights will be created along the road, with
orange color.
|
RoadRed - a segment
with red lights, the
parameters are:
pos_x, pos_y, pos_z, width, angle, delta_angle, height.
At night lights will be created along the path, with red color.
|
RoadGreen - a segment
with green lights, the
parameters are:
pos_x, pos_y, pos_z, width, angle, delta_angle, height.
At night lights will be created along the path, with green color.
|
RoadBlue - a segment
with blue lights, the
parameters are:
pos_x, pos_y, pos_z, width, angle, delta_angle, height.
At night lights will be created along the path, with blue color.
|
RoadWhite - a segment
with white lights, the
parameters are:
pos_x, pos_y, pos_z, width, angle, delta_angle, height.
At night lights will be created along the path, with white color.
|
RoadStrobe - a segment
with strobe lights, the
parameters are:
pos_x, pos_y, pos_z, width, angle, delta_angle, height.
At night lights will be created along the path, with strobe light
and white color.
|
RoadVasi - a segment
with VASI lights, the
parameters are:
pos_x, pos_y, pos_z, width, angle, delta_angle, height.
At night lights will be created above the start, with VASI lights
red/white color.
|
DarkRoad - a flat road or river segment
using a texture called road##.bmp , the
parameters are:
pos_x, pos_y, pos_z, width, angle, delta_angle, height.
At night lights will be created along the road, with
orange color.
|
Light, Sphere, Beam,
Night - illumination objects, the parameters are:
pos_x, pos_y, pos_z, object scale, r_color, g_color,
b_color.
|
Blink - blinking illumination
object, the parameters are:
pos_x, pos_y, pos_z, interval, x_scale, y_scale, z_scale. |
Object - Ordinary object with any
name, the parameters are:
pos_x, pos_y, pos_z , angle , scale_x, scale_y, scale_z.
At night file called object##_n.x will
be loaded, if found it will be illuminated. |
Surface - flat object with any name, the
parameters are:
pos_x, pos_y, pos_z , angle , scale_x, scale_y, scale_z.
At night file called surface##_n.x will
be loaded, if found it will be illuminated. |
Night - object that lights at
night, the object name is night_##.x , the
parameters are:
pos_x, pos_y, pos_z, angle , x_scale, y_scale, z_scale. |
Sphere- sphere that lights by
night, the name is sphere_##.x , the parameters
are:
pos_x, pos_y, pos_z, dummy , x_scale, y_scale, z_scale. |
Thermal- a thermal created at the
specified location, the parameters are:
pos_x, pos_y, pos_z, dummy , r_min, r_max, v_core. |
Smoke- a smoke created at the
specified location, the parameters are:
pos_x, pos_y, pos_z, interval , r_color, g_color,
b_color. |
Array- a wind flixible array of
surfaces at the specified location, it will use a texture
called array##.bmp, the parameters are:
pos_x, pos_y, pos_z, elements , width, height, size.
At night the array will use a texture called array##_n.bmp
if found, the array will then be illuminated. |
FixedArray- a rigid array of surfaces at the
specified location, it will use a texture called fixedarray##.bmp,
the parameters are:
pos_x, pos_y, pos_z, elements , width, height, size.
At night the array will use a texture called fixedarray##_n.bmp
if found, the array will then be illuminated. |
LightArray- an array of glowing point surfaces
at the specified location, the parameters are:
pos_x, pos_y, pos_z, elements , width, height, size. |
Windsock - windsock object, an
object that will be fully aligned with the wind, the
object name is windock##.x, the parameters are:
pos_x, pos_y, pos_z , dummy , scale_x, scale_y, scale_z. |
Windvane - windvane object, an
object that will be directionally aligned with the wind,
the object name is windvane##.x, the parameters
are:
pos_x, pos_y, pos_z , dummy , scale_x, scale_y, scale_z. |
Windflex - wind flexible object,
an object that will be flexible with the wind, the object
name is windflex##.x, the parameters are:
pos_x, pos_y, pos_z , flexibility , scale_x, scale_y,
scale_z. |
 | Default road files |  |
|
Micro-Flight
comes with a basic collection of patch segements
which are defined in def files with the following
numbers and meanings:

 | The X files |  |
|
DirectX 3D model files are called X files , these files are used
in Micro-Flight for modeling the gliders and the static objects
in the scenery, such as trees and buildings.
To create an X file, use any 3D graphic software
that can export this format directly or use one that can export
3DS files and convert these files using conv3ds converter written
by Microsoft.
The most whidely known program to create 3DS
files is ofcourse 3D studio, but others exist which can be also
downloaded and evaluated to give you a quick lauch into the
fascinating world of 3D object creation, for example BCad .
The Conve3ds utility by Microsoft can be downloaded on MF Download Zone
Each of these objects uses textures which can be in any format
that the x files supports, for example bmp, jpg, gif.
In addtion to the texture itself some actions are applied by
the program depending on the name of the texture and on the
properties of the mesh that is using it.
These special actions are:
Color key - if the texture's name includes
"_" the texture is treated as having a transparent
color which is the first color index of it's palette, or the
black color if it has no palette.
Greyscale alpha - if the texture's name
includes "=" the texture is loaded as an alpha layer
only and not as a colored texture, such alpha layer can be used
for high quality smoke of transparent cloth.
Greyscale color - if the texture's name
includes "#" the texture is loaded as an alpha layer
with color, the strength of the alpha layer is taken from the
average value of it's color, such texture can be used for
rotating parts as rotors and propellers.
Chrome mapping - if the mesh using the
texture is 75% to 90% opaque, the mesh is applied with a chrome
mapping texture called refmap.bmp, this chrome mapping is making
a reflection map upon the mesh making it look shiny.
Transparent window - if the mesh using the
texture is 5% to 75% opaque, the mesh is treated as a window and
is drawn last in the drawing order, this allows the body to be
seen through this mesh properly without the need to build the
object in this order.
|