Terrain Design for Flight Simulator X

April 2007



Flight Simulator X introduces new methods for creating terrain scenery elements. This document presents the basic concepts and illustrates the use of SBuilder (Scenery Builder) for FS X by Luis de Sá for making new terrain.

While the sections dealing with concepts contain much valuable information, the use of SBuilder does not necessarily require knowing all this. So, inexperienced, and even experienced, designers who wish to skip these sections can go directly to the tutorial on SBuilder and refer to them later as needed.



Contents


 - What is new

 - Backwards compatibility

 - QMID

 - shapefiles

 - GUID

 - Shp2Vec


 - Using SBuilder for FS X

    - Examine the default scenery


    - Getting a background


    - Create a new project

    - Display background

    - Excluding default terrain

    - Drawing a Hydro Polygon

    - Making an island

    - Airport bounds

    - Parks

    - Roads

    - Freeway traffic

    - Shorelines

    - GPS Hydro Polygons

    - Sloping polygons

    - Compiling scenery

    - Final result

 
- Common Problems

 - Support


 -
Appendix: Exclusion GUIDs

 - Appendix: QMID extents






What is new


The new FS X terrain tool, Shp2Vec, requires input in the form of shapefiles. Terrain elements can be of the following type:

 1. EXX - Exclusion Polygons (these only exclude the terrain elements in this list, not objects such as autogen or buildings or runways);

 2. FLX - polygons that can have multiple functions: flatten the airport perimeter, remove autogen objects, and/or display a mask, usually some type of grass. If this type of polygon is used to flatten an airport perimeter, then its shapefile must have an elevation value;

 3. HPX -  Hydro Polygons that define the location of water, such as ocean, lake, river. All Hydro Polygon shapefiles must have an elevation value;

 4. HGX - GPS Hydro Polygons, for performance reasons, a simplified version of the regular Hydro Polygon that is displayed only in the GPS gauge;

 5. HLX - Hydro Lines, shorelines, a decorative texture representing some type of beach, sometimes with a wave effect attached to it;

 6. PKX - Parks, a polygon with any shape that displays a ground texture of your choice (not necessarily a park), with associated autogen;

 7. RDX - Road lines, displaying just a texture such as asphalt, concrete, dirt, or gravel;

 8. FWX - Freeway Traffic, a simple line defining where road vehicles should appear;

 9. RRX - Railroad lines, like roads, just a texture representing a railroad;

 10. STX - Stream lines, not really water, but a texture that looks like a stream;

 11. UTX - Utility lines, the large electrical pylons with their grass corridors.




All terrain elements are defined in the terrain.cfg file that is located in the Flight Simulator X root folder. There are many small, and also large, differences with the FS 9 terrain.cfg file. (You will find a complete list of terrain elements in the FSX_modified_terrain_cfg.zip file in the Avsim library.)

For example, all line widths are now fixed in that file -  it is no longer possible to make lines (such as roads or shorelines) of different widths.

FS X default shorelines are now limited to a very small number, all displaying the same tan rock or tan sand texture.

A new feature is the freeway traffic line that does not display a road texture, but can be placed anywhere in the terrain where moving vehicles are desired.

New to FS  X, the GPS Hydro Polygons are supposed to be simplified versions of the normal Hydro Polygons, and should only display in the GPS where they will provide better performance for this gauge.

Also, PKX (Park polygons), unlike the VTP2 of FS 9, will now no longer display over water. This means that drawing an island is no longer as simple as drawing a land polygon (although it is not complicated by any means in FS X).

In addition, the FS X Park polygons now display a different land class depending on the slope of the terrain, and so may not be reliably used in hilly or mountainous areas. For informational purposes, a gradient mapping table is included with this document.

Finally, and most importantly, the new Hydro Polygons and their associated height value can be excluded in their totality - no more stray water flattens as in previous versions of FS.




Backwards compatibility


Generally, all FS 9 terrain seems to work correctly in FS X, except for some minor exceptions:

 - As mentioned above, VTP2 will no longer display over water;

 - FS 9 terrain exclusions are supposed to work correctly in FS X, but initially they only seemed to exclude FS 9 terrain elements, not FS X terrain. This requires more testing;

 - all lines (roads, shorelines, streams, railroads) will display with a uniform width that is defined in the FS X terrain.cfg file.


QMID


FS X now makes reference to the Quad Mesh Identifier (QMID), a grid that determines the bounds of the different terrain elements. If you know the old LOD grid, then you can easily make the transition to QMID - just add 2 to LOD to get QMID. That is, LOD 13 (Area) is quad level 15, LOD 5 (Cell) is quad level 7.

This last example is particularly important because default terrain is now contained within a quad level 7 file, the cvx####.bgl that are found in the scenery folders.

For a table of QMID extents, please see the appendix.

To view the QMID grid, use TMFViewer (the Terrain Model File Viewer, located in the Terrain S.D.K.). As mentioned in the Terrain S.D.K., it is quite easy to find the quad i.d. for your project. Just load one of the image_globe##.bgl files that cover 90º of latitude and 120º of longitude (they are found in the Scenery/World directory):

image_globe00.bgl = North and Central America, and Colombia

image_globe01.bgl = the Western part of South America,

image_globe10.bgl = Eurasia, the Arabian peninsula, and the Northern and Central parts of Africa

image_globe11.bgl = Brasil, and the Southern part of Africa,

image_globe20.bgl = the Indian subcontinent, and most of Asia

image_globe21.bgl = Malaysia, Australia, and Oceania


How to use TMFViewer? To move to a location, click on it. To zoom in and out, use the "+" and "-" keys on the numeric keyboard.

Once loaded, display the quad level 4 grid:






To determine the default file that covers your project, point to the location on the display and read the information on the status bar - the dir# is the scenery folder name (and this corresponds to quad level 4) and the File# is the quad level 7 i.d. for that point and forms part of the bgl name. By the way, this name is essentially the same as the FS 9 files, so it should be familiar to you from your previous projects.






In this case, the default terrain is located in the scenery folder named "0303", and the file is named "cvx3125.bgl". When loaded, it looks like this:







In order to more accurately determine the extents of the various terrain elements, it can be helpful to turn off polygon filling:







You can display the different QMID grids through the TMFViewer menu.

In the same way that FS 9 terrain was clipped by the LOD grid, the FS X terrain elements are limited by QMID, and clipped to various quad levels depending on the type of terrain.

According to Doug Matthews, who handles development of the FS X terrain:

Some QMID grid levels of note:

4 - corresponds to the scenery buckets on disk (i.e. 0405, 0302), as well as
some of the data files like NVX (nav aids), ATX (airways)

7 - corresponds to the individual APX (airport) OBX (obstruction), BRX
(bridge), CVX (vector) data files.

11 - is the level Shp2Vec clips at except for...

15 - is where Shp2Vec clips freeway traffic.

You don't necessarily have to line up with our 4 and 7, but you must use the
11 and 15.


This is important to keep in mind and we shall get to it a little later.

By the way, you can right-click on any terrain element displayed in TMFViewer in order to identify it and obtain its GUID description.




Shapefiles


The new FS X terrain and the tool used to generate it, Shp2Vec, use shapefiles as a source.

For a complete description of shapefiles, please follow the link in the FS X Terrain S.D.K. to the ESRI white paper.

Shapefiles are a simple means of using vectors to represent geographic features. This file format is less complex than the one used for FS 9 terrain, plus it is very widespread in the geographic community, thus simplifying the creation of FS X terrain.

Shapefiles come in many different varieties, including points, lines, polygons, with or without elevation information, etc. Shp2Vec only accepts line and polygon shapefiles, and the polygon files can be with or without elevations depending on the type of feature.

All shapefiles are, in fact, a set of  3 different files:

- a .shp that is the list of the vector coordinates,

- a .shx that is an index with offsets and that should only be used with its accompanying .shp, and

- a .dbf that is a database describing the attributes of the shapes within the file and that you can, and will, modify according to the needs of Shp2Vec.


Please note that a shapefile can contain more than one shape, although they should all be of the same type, for example, all lines, or all polygons. That is to say, you cannot mix different types of shapes in the file. For the purposes of Shp2Vec, you should not even mix different terrain elements within the same shapefile, so, for example, roads and streams should be in separate shapefiles, as should Hydro Polygons and terrain exclusions.




GUID


Everything in FS X depends on Globally-Unique Identifiers. These are the 32-character (alpha-numeric) identifiers for everything. They may not repeat and must be completely unique.

GUIDs are a subset of UUIDs, the Universally-Unique Identifiers. FS X terrain will refer to both GUIDs and UUIDs, depending on the property of the element.

GUIDs used in FS X are in Registry Format, that is, {8-4-4-4-12}, where each character should be an alpha-numeric character. For example, {560FA8E6-723D-407D-B730-AE08039102A5}.

The characters must be surrounded by the so-called "curly braces" as shown here, or they will probably not be accepted.

Microsoft's web site (not FSInsider) does have a handy GUID generator that will create them in the correct format (and hopefully, always randomly and unique!) - just search the site (or Google) for GUIDGen. You may need it.



Shp2Vec


This tool accepts the set of 3 files that make up a shapefile, along with a control file - an .xml file - and outputs a cvx bgl that can be loaded in FS X.

All the files that are required by Shp2Vec must follow a certain naming convention.

First, all of them must be prefixed by the 3 letter identifier of the terrain element, for example, in the case of airport bounds, "FLX" - this stands for Flatten FS X, of course.

(Note that an autogen exclude is part of the Airport Bounds attributes (FLX - not ABX, unfortunately), and it is not an "EXX" (which are terrain excludes only, for eliminating terrain elements, like Hydro Polygons, Roads, Hydro Lines (shorelines), etc. Autogen excludes should always be "FLX".)

So, all 4 required files will have names something like this:

- FLX_St_Barths.dbf
- FLX_St_Barths.shp
- FLX_St_Barths.shx
- FLX_St_Barths.xml


Everything after the "FLX" part is the common name and is the name that will result when Shp2Vec has finished compiling the files.

Let's take a look at each file's contents.

1. The .shp and .shx will have the vector elements that represent your shapes. They can be created and modified by any program that handles shapefiles.

2. The .xml file is a control document and should not be modified. It is always the same for each type of terrain element - for the various xml control files, please see the Terrain S.D.K.

3. The .dbf file that contains the description of the terrain elements, including:

    - The UUID is an unique identifier that is given to each individual shape and that allows Shp2Vec to identify each individual shape within the file (and to know which parts share the same attributes if they have been clipped to various quadrants.) It is the "name", if you will, of the shape, and resembles the GUID in format (but is not the same as the GUID.) This UUID is not compiled and so does not appear in the compiled bgl. Therefore, it can be re-used in different database files if desired.

    - The GUID field refers to the type of terrain element that you have chosen for that particular shape. As mentioned, the various terrain elements are defined in the terrain.cfg, where you will find the GUID for each.

    - any other information relevant to that particular type of terrain element, for example, freeway traffic shapefiles should indicate the number of lanes and direction of traffic.


These are some examples of database (.dbf) files for various types of terrain elements.

 - EXX - terrain exclusion:

UUID GUID
{00000001-0000-0000-0000-000000000000} {00000000-0000-0000-0000-000000000000}

Here, the exclusion polygon is identified (named) as number 1 by the UUID, while it is defined by the GUID. This GUID (all zeros) stands for a global terrain exclude and will remove all terrain elements, but it could be a  type of terrain element (for example, roads or shorelines) or even a specific terrain element (such as 2-lane asphalt undivided roads.) The GUID field should be that of the type of element to be excluded. The different types of exclude GUIDs are indicated in an appendix.

 - FLX - flattens, autogen excludes, airport skirting masks:

UUID GUID
{00000001-0000-0000-0000-000000000000} {18580A63-FC8F-4A02-A622-8A1E073E627B}
{00000002-0000-0000-0000-000000000000} {6C0C6528-5CF1-483A-A586-2C905CF2757E}
{00000003-0000-0000-0000-000000000000} {6C0C6528-5CF1-483A-A586-2C905CF2757E}

In this example, there are 3 different FLX polygons in the shapefile. The first polygon both flattens and excludes autogen as defined by its GUID, {18580A63-FC8F-4A02-A622-8A1E073E627B}. The second polygon only excludes autogen, as does the third, as can be seen by their having the same GUID.

 - FWX - freeway traffic lines

UUID GUID NumberOfLa TrafficDir
{00000001-0000-0000-0000-000000000000} {54B91ED8-BC02-41B7-8C3B-2B8449FF85EC} 1 F
{00000002-0000-0000-0000-000000000000} {54B91ED8-BC02-41B7-8C3B-2B8449FF85EC} 1 T

Here, there are 2 traffic lines, each having 1 lane of traffic. In the first line, the traffic begins FROM the first point of the line, as defined in TrafficDir, while the second line has traffic going TO the first point of the line. There is also supposed to be a 2-way traffic option (B, for BOTH) but it was not working correctly at the time this document was created. Perhaps it will be fixed for the FS X patch.

 - HPX - Hydro Polygons (water)

UUID GUID SlopeX SlopeY
{00000001-0000-0000-0000-000000000000} {2D103429-89EB-4CB3-A61E-E188E79C77E7} 0 0
{00000002-0000-0000-0000-000000000000} {BCD5C182-9C8B-4C57-97BD-272CF492CBFF} 0 0
{00000003-0000-0000-0000-000000000000} {BCD5C182-9C8B-4C57-97BD-272CF492CBFF} 0 0

This table illustrates an interesting feature of FS X water. It can have a slope defined for it. You should please note that the slope of the water polygon is not the same as its height. The height value is part of the shapefile itself - water, for lakes or the ocean, can have a uniform height defined there. In that case, the database file can indicate a slope of 0. However, in the case of rivers, a slope for the polygon can be indicated here, and should be understood as follows:

    SlopeX = Slope in vertical meters per degree of longitude

    SlopeY = Slope in vertical meters per degree of latitude

This can become excessively complex and lead to the creation of many small Hydro Polygons with varying slope values (as can be seen in the default rivers.) You will perhaps prefer to use mesh-clinging water (GUID = {5835459A-4B8B-41F2-ADC1-DEE721573B28}) for your rivers instead.


For examples of all terrain database files, please consult the Terrain S.D.K.



Shp2Vec is a console application and can be invoked in a Command Prompt window. The syntax is:

Shp2Vec [path] [common_name] [-addtocells]


The path indicates the location of the shapefiles. If they are in the same directory as Shp2Vec, then you can simply place a period (".") here, as the old DOS command for the present directory.

The common name is whatever follows the terrain prefix. In the above example, that would be "_St_Barths", but can be anything you wish. This will be the name of the compiled bgl. To avoid confusion among users, please use descriptive, not cryptic, names. Windows file names can have up to 255 characters, so there is no reasonable limit on this. By the way, you are free to change the name of the compiled bgl to anything that you wish and are not obliged to keep that name permanently.

[-addtocells] By default, Shp2Vec will compile terrain that will remove all default elements in the relevant quad 11 grid(s) of your project, (quad 15 in the case of freeway traffic).This seems excessive, as it will force you to re-create all terrain elements in the entire quad 11. Therefore, it is probably better to exclude unwanted terrain with specific exclusion shapes, draw new elements, and use the optional "-addtocells" when invoking Shp2Vec. This will draw your new terrain over existing default terrain.

So,  Shp2Vec can be invoked, in this example, as such:

Shp2Vec . _St_Barths -addtocells


Please note that all FS X terrain elements can now be contained within one unique bgl, the "cvx". This stands for Combined Vectors FS X. To compile all terrain elements at once, the terrain elements must have the same common name, for example:


The result of compilation will be a file named "cvx_St_Barths.BGL", containing all terrain elements.






Using SBuilderX


SBuilderX (Scenery Builder FSX) by Luis de Sá is a powerful, yet easy to use program for creating scenery for Microsoft Flight Simulator. This short document will show you how to use it to make modifications to the default FS X terrain.

Let's see how to create some of these elements in SBuilderX.

Our test project is the island of St. Barthélemy in the Caribbean, just South of the island of Sint Maarten/St. Martin that is so nicely depicted in FS X. It happens that St. Barths is a very challenging airport for pilots, much more interesting than TNCM - Princess Juliana, but it is not appropriately represented in the game





In real life, it looks like this:

:





It seems that the FS X version is much too flat, thus eliminating the challenging approach over the hills.




Examine the default scenery


The first step in terrain design should always be to take a close look at the default elements, so that you can see what needs to be removed and how to do it.





Another look without polygon filling:






Here,  the Hydro Polygons that must be excluded are numbered. It is important to remember that the Flight Simulator world is entirely made of land. Any water that displays is a Hydro Polygon, so if it is excluded, then the underlying land will show instead. Therefore, when excluding a Hydro Polygon, the designer must replace it by another that covers the same extent,  the entire area that was covered by the default water, or land will display in the uncovered parts, (unless, of course, you are replacing a lake or river, in which case, just remove the old and draw the new.)



Create a new project


You will create a new project in SBuilderX and give it a name:






This is the name that will be given to the compiled bgl. A word about file names. Some people give cryptic names to their scenery files, and this causes confusion among users. Windows file names can have up to 255 characters, about as many as this paragraph. So, please, be considerate of your users and make your file names as descriptive as possible.

Also, if you wish, the compiled bgl can be copied directly to the FS X scenery folder for you - just indicate this in the appropriate place.

While you are here, you may as well save your project right away. In the File menu, select "Save Project as...":



And give it a descriptive name:





Remember to save your work often.



Getting a Background

SBuilderX is a drawing tool, so the procedure is usually to display a background - a map or an image - on which to draw the vector elements. We can use:


SBuilderX contains a tile server function integrated directly into the program.

SBuilderX itself will not access any particular tile server, however, without the use of specific server dlls. There is a package of third-party image server dlls, that are in the public domain, that can be used by the SBuilderX tile server in order to download images from various image server web sites: Ask, Google Earth, Microsoft Virtual Earth, and Yahoo. These dlls allow access to both the aerial (or satellite) image and map image servers of these image providers.

These third-party server dlls are made available to all users of SBuilderX. Please note that all images are licensed copyrighted material and may not be used without the permission of their respective owners.

To use the tile server function within SBuilderX, make sure that the various image server dlls are in the SBuilderX\Tiles folder.

After launching SBuilderX and starting a new project, or loading an existing project, go to the Edit-Preferences menu and you will see this:



Select the image server of your choice and make sure to check the "Use xxx server" option.

Then, select the View-Show Background menu, and if you have an active Internet connection, SBuilderX will immediately start downloading images at the location and zoom level indicated in the status bar.




TIP: You would do well to pan around and obtain the images for the entire coverage of your project. Also, it will be easier to zoom in to your area, and to create custom ground textures, if you obtain images of your project at various zoom levels.

If for some reason certain tiles are not downloaded, SBuilderX will display a "Failed to download" image in its place.




This can arise for different reasons:

- there are no images for that area, or at that zoom level;

- some problem while downloading. If you are sure that there are tiles available, you can force SBuilderX to re-load those areas by going to the Preferences window and confirming your choice of server by clicking "OK".

- certain image servers, such as Google, limit the quantity of images downloaded, probably for reasons of cost. In this case, just try again some other time.


IMPORTANT: There are different zoom levels for the pictures. SBuilderX will not interpolate any missing images, but only display those that are present in the cache. So, you should pan around to the full extent of your project area for all desired zoom levels, just to make sure that you are not missing any.

Also, if you zoom out and get images in lower resolutions,  you will more easily be able to progressively zoom into the image within SBuilderX and find the area of your project.

As soon as you have enough images for your project, you can start working in SBuilderX.




Display background


You can display the background image by selecting the View - Show Background menu:





At the lowest zoom levels, SBuilderX will display an image of the entire globe.

To zoom in and out in SBuilderX, use the mouse wheel, and to pan, press and drag the mouse wheel.

Once you are in zoom level 1 or 2 (can be seen below in the Status Bar), you can right-click anywhere on the image and select "Center" from the pop-up menu. The image will center on that spot and you can now zoom in until you find the cached images:







You can display the QMID grid within SBuilderX through the View - QMID grid menu.










Excluding default terrain


Exclude polygons do not need to completely encircle the terrain element to be removed; the polygon only has to intersect that element at any location. So, exclude polygons can, and probably should, be extremely small, in order to avoid removing extraneous elements.

Also, there can be as many exclude polygons in a project as one wishes, each excluding a different element. Or, there can be one exclude polygon that removes everything. It will all depend on your project.

To draw an exclude polygon, select the Polygon tool in the SBuilderX tool bar and click to draw:





Once you have finished drawing, right-click to exit the draw function, that is, to stop drawing that polygon.






I have chosen to make a large polygon, probably not a good idea, but then there really is not all that much in the default scenery and I shall have to re-create everything anyway. Also, you should carefully verify by reference to the default scenery in TMFViewer that the exclude polygon does intersect what you wish to remove and nothing else.

For reasons of efficiency, an exclusion polygon will not use the shape drawn to define what is removed. Instead, the bounding box for that polygon will be used. In this instance, the bounding box would be:






In fact, to exclude an element of terrain, it is only necessary that the bounding box of the exclude polygon intersect the bounding box of the terrain element. So, you should always keep this in mind, and it is probably better to make many small polygons, as regularly shaped as possible. You can even have very small exclusion polygons removing only specific terrain elements that you want to replace, instead of the global terrain exclude as illustrated in this project.

Once the polygon is drawn, it must be declared as an exclusion. To get the Properties window of a terrain element, right-click on the edge of the polygon (and only its edge) to bring up a pop-up menu, where you will select Properties:





You can optionally choose to give your polygon a name. This is not obligatory, but may be useful when you start to have a lot of elements in the project.

In the list, you can choose the type of exclude. It is possible to only exclude one type of terrain element, but I have chosen to exclude "All_Terrain_Items".

Then, confirm by clicking "OK".

Unfortunately, the polygon is opaque and it will be difficult to draw any features based on the underlying image. But, we can make the polygon transparent - right-click on the edge of the polygon and select "Set Transparency..." from the pop-up menu:





Then, choose the degree of transparency desired:







Some things to keep in mind:

 1. Terrain elements intersected by an exclusion polygon will be completely removed in the quad level 11 grid (quad 15 for freeway traffic lines), but note that:

    a) Hydro Polygons exist in sizes ranging from quad 11 to quad 15, and only the Hydro Polygon intersected by the exclusion polygon will be removed;

    b) the default roads are often made of many small parts within the same quad 11, and this means that, while they should in theory be removed in the entire quad 11, in fact, you may find that only part of the road is excluded. You may have to make more or larger exclusion polygons.

 2. Terrain exclusions (EXX) do not remove autogen. To exclude autogen, use airport bounds polygons (FLX) instead;

 3. At initial release of FS X, freeway traffic could not be excluded correctly. The FS X patch should fix this.




Drawing a Hydro Polygon


If drawing a lake or river, you can exclude the default element and simply draw the new water body. But, in the case of a sea or an ocean, the new Hydro Polygon must cover the same extent as the excluded default water, or land will display in the uncovered parts.

In this project, the first thing to do is to replace the excluded Hydro Polygons. By reference to the default terrain in TMFViewer, you should determine exactly what must be drawn.

To draw a Hydro Polygon, select the Polygon tool in the SBuilderX tool bar and click to draw:





Once you have finished drawing, right-click to exit the draw function, that is, to stop drawing that polygon.

Note the shape of this Hydro Polygon - it exactly replaces all the excluded default water (and even overlaps slightly, but since it is just water on top of water, this does not create any problems.)

Then, right-click on the edge of the polygon to bring up the Properties window where you can choose the type of Hydro Polygon (water) desired:





You will find different options for Hydro Polygons - lake, ocean, river, bay, etc. - but you should know that for the moment they all display the same water. Flight Simulator X does not yet make a distinction between the different types of Hydro Polygons. Still, it is probably best to choose the correct type as future versions of FS may display different textures (or not, who knows?)

Also, there are "Perennial" and "Non-Perennial" types of  Hydro Polygons. The "Non-Perennial" Hydro Polygons do not yet seem to work, so there is no point in using them.

 As before, make the polygon transparent so that you can see the background image beneath it.

VERY IMPORTANT: All Hydro Polygons (and Airport Flattens) must have an altitude value that defines their height. Generally, you can determine the height of terrain by slewing in FS X and using Dick Ludowise's TCalc X, or simply by loading the relevant altitude mesh in TMFViewer, pointing to the desired area, and reading the altitude value in the Status Bar. The default mesh file is in the same scenery folder as the default terrain scenery (the "cvx" file) and is called "demxxxx.bgl", with xxxx being the name of that folder, in this case, "dem0303.bgl".

Once you have determined the height of the location of the Hydro Polygon, right-click on the edge of the polygon and select "Set altitude...":








In the "Constant altitude" section, indicate the height in meters of the Hydro Polygon, click "OK", then click "Close". For sea-level water, the SBuilderX default value of 0 meters will be correct.

In the case of a lake, you can draw a polygon:





And in the Properties window, define it as such:





Here, I checked the altitude of this area by loading the mesh in TMFViewer, and then set the height of this polygon in SBuilderX:






If you do not give your Hydro Polygon (or Airport Flatten) an altitude, then SBuilderX will assign a default height of 0 meters, and your polygon will most likely display as a depression in the terrain.

Please notice, however, that there are some feeder channels into and out of this lagoon, and since they fall on sloping ground, setting a constant altitude for those polygons would create a depression in the terrain. You could create sloping water by setting the height of each individual point in the polygon, but I took the easy way out by making them mesh-clinging water:





In that case, there is no need to set the polygon height.





Make an island


The entire Flight Simulator world is made up of land. There is only water where a Hydro Polygon has been drawn. If you view any ocean or sea in TMFViewer, you will see that it is made of thousands (perhaps much more!) of Hydro Polygons covering the underlying land. A Hydro Polygon will always cover land, and will prevent it from displaying.

So, how to make an island in the midst of water? A Hydro Polygon can have one, or multiple, holes that let the underlying land show through. It is easy to make a hole - all you need to do is draw a polygon within the water and declare it as a hole;

Therefore, you should first draw your new Hydro Polygon as shown above. Then, as indicated previously, make a new polygon within that Hydro Polygon that covers the island you wish to create:





Then, right-click on the edge of this island polygon and select "Set as hole" from the pop-up menu (make sure to right-click on the edge of the polygon and NOT on one of its points - you may have to zoom in order to do this). Please note that "Set as hole" will only function if you have selected the Polygon tool from the tool bar.







At this point, SBuilderX will ask you to indicate the parent polygon of which this should be a hole:





Click (left-click) on the edge of the Hydro Polygon and the hole will be created.





This is how it looks without the background image:





The island, that is, the land showing through the water, will display the underlying land class values.






Draw airport bounds


Unlike airport bounds in FS 9, the new FS X variety is more flexible and has more functions:

 1. flatten the ground to a uniform height;

 2. or, remove autogen;

 3. or, draw a mask, usually some sort of grass;

 4. or, flatten and remove autogen at the same time;

 5. or, flatten and draw a mask;

 6. or, remove autogen and draw a mask;

 7. or, do all three at once - flatten, remove autogen, and draw a mask.


In fact, you can draw one polygon that only flattens the ground, and then another with a different shape to remove autogen, etc. And, of course, you can draw them anywhere in your new terrain, not just in the airport grounds.

The mask will display a ground texture, often some kind of grass, but not always. This will depend on the land class value in the underlying area. For your information, a table of mask values is included.

Here, we shall draw numerous airport bounds polygons with different properties:





As usual, once the polygon is drawn, assign the desired property:





In this case, the polygon will only flatten the ground and exclude autogen. There is another polygon, slightly larger, drawn over it, that displays a grass mask, and a couple of others that remove autogen only, particularly on the approach to the airport, where the FS X extremely large trees should not appear:





Any polygon that flattens must always have an altitude value:





But, the polygons that only exclude autogen or draw a mask do not need an altitude value.

There are a few problems:

 - Flight Simulator cannot handle sloping runways, so airport flattens must always have a uniform height in game. For many situations, this means that some sort of plateau effect will appear as the flatten modifies the surrounding terrain mesh. Nothing to be done for the moment, except to patiently wait for the next version of the game where sloping runways will hopefully be allowed;

 - in this case, the flatten is close to the water's edge and will raise the level of the water, creating a sloping effect within the sea. This is an old problem and existed in previous versions of FS. It can be solved by extending the coastline a greater distance from the flatten, at the loss of accuracy, or simply by accepting this limitation for the moment, and hoping that future versions of FS will prevent flattens from affecting water height;

 - in addition, the proximity of hills on the left of this flatten will modify their appearance in game. In reality, the hills slope gently down to the runway, that itself slopes gently down to the sea. The uniform height flatten will generate a sharp cliff at the edge of the hills, thus preventing a realistic re-construction of the terrain. The possibility of sloping runways would solve this problem.





Drawing a park

A PKX polygon can display any ground texture that is desired. This does not have to be a park and the polygon could just as easily be an urban area, or fields, or grasslands, or arctic ice!

With the polygon tool selected, draw a polygon covering the desired area:





Once you have finished drawing, right-click to exit the draw function, that is, to stop drawing that polygon.

To assign the desired ground texture, right-click on the edge of the polygon in order to bring up the pop-up menu and select the Properties window:





Give the polygon a name (if you wish) and select the type of ground to display, in this case, a Large City Urban Grid Wet land class.

Once you have confirmed its properties, make the polygon transparent by right-clicking on its edge and selecting "Set Transparency..." from the pop-up menu.

The park polygon can also be drawn over an airport bounds polygon - as mentioned above, an airport mask will display a land class value that varies with the surrounding land class. So, you may not always get grass. If you have this problem, simply draw a polygon over your airport and assign a land class of grass (or one of the airfield values, or any land class that you wish.)

PKX polygons in Flight Simulator X receive the same gradient map as normal land class (please see the included gradient mapping table ). This means that the land class displayed will change depending on the slope of the terrain, so you should keep this in mind when working in hilly or mountainous areas. There is no easy work-around to this problem at the moment.





Drawing a road


To draw a road, select the Line tool on the tool bar and click to draw:






Once you have finished drawing, right-click to exit the draw function, that is, to stop drawing that line.

The, right-click on the line to bring up the Properties window:





There are many types of lines from which to choose: beaches, stream line, railroad, many different types of roads, bridges, and even electrical pylons.

In this case, we choose an appropriate road type.

The line can be difficult to view in SBuilderX, since it is rather thin. You can set the display width of the line to anything you want by right-clicking on the line and selecting "Set width...":








Set the "Constant width" value, click "OK" and then click "Close".

Please note that this width only affects the display of the line in SBuilderX. Flight Simulator line widths, whether beaches, roads, streams, or others, are pre-set and fixed by the terrain.cfg file and cannot be modified by SBuilderX or any other terrain creation tool.






Drawing freeway traffic


Moving vehicles can be added to roads, at the expense of performance, so you will probably want to reserve this feature to the immediate area of an airport and only in small quantities.

There are supposed to be 3 different types of road traffic lines:

 - one-way going from (F) the starting point of the line;

 - one-way going towards (T) the starting point of the line;

 - two-way traffic (B).

At initial release of FS X, two-way traffic was not working. Hopefully, the FS X patch will fix this.

Also, traffic lines can display from 1 to 9 lanes of traffic.

To add vehicle traffic to your roads, simply draw a line directly over the road and assign it as freeway traffic in its Properties:






Make sure to remember to select the number of lanes and the direction of the traffic.

You should try to draw traffic as nearly centered on the road as possible in order to get the vehicles to move on the road texture, otherwise they may appear on the ground next to the road.





Drawing a shoreline


Default beaches (HLX) in Flight Simulator X are limited to a small number:

 - Shorelines Default
 - Shorelines Generic Bay Harbor
 - Shorelines Generic Lake
 - Shorelines Generic River
 - Shorelines Generic Ocean (with wave effect)
 - Shorelines Generic Canal Channel

They all display either the tan sand or the tan rock texture, and only the ocean shoreline has a wave effect.

If you have installed the FSX_modified_terrain_cfg.zip file (available in the Avsim library), then you can also draw any of the old FS 9 shorelines, with their much greater variety.

However, shorelines in FS X, whether the default or the FS 9 beaches, will always display a fixed width, as defined in the terrain.cfg file.

To draw a shoreline, select the line tool in the SBuilderX toolbar, and draw it, then assign the desired beach in the Properties window.

Shorelines with an attached wave effect must be drawn clock-wise around the Hydro Polygon in order to have the waves on the correct side of the beach texture. So, when drawing this type of line, always keep the water on the right.

But, what to do when the beach is obviously not of a constant width?






Instead of using a shoreline (HLX), you can draw a polygon and assign a land class value, for example,  tan sand , white coral sand, black sand, etc.









Because PKX polygons no longer display over water, you can safely extend it into the Hydro Polygon with the assurance that the beach will only display on land:






Unfortunately, these polygons do not have wave effects attached. But, if you have installed the FSX_modified_terrain_cfg.zip , then you can simply draw a line where you want a wave effect and declare it as such:





Like any shoreline with waves, this type of line must also be drawn clock-wise around the Hydro Polygon in order to correctly display the effect.







GPS Hydro Polygons

This new FS X terrain element is a much simplified version of the normal Hydro Polygon. Because it has less detail than the Hydro Polygon, the GPS gauge will load it quicker and it will use less resources.

Due to the nature of data sources used in FS X, default terrain shows great discrepancy between the normal Hydro Polygons and the GPS Hydro Polygons. Generally, the previous FS 9 data sources were used for FS X GPS Hydro Polygons, and more detailed sources were obtained for normal Hydro Polygons if available. In fact, the result has been that some parts of North America, Europe, and Australia are more detailed, particularly in major urban areas, but much of the FS X world is sometimes less detailed than FS 9. Therefore, you may find that the GPS Hydro Polygons contain more detail than the normal HPX in some places. And, in many parts of the world, the normal Hydro Polygons and the GPS Hydro Polygons are exactly the same.

Nonetheless, it is to great advantage to make simplified GPS Hydro Polygons  - performance is already at the limit in FS X and every little bit will help.

To make a GPS Hydro Polygon, draw a simplified polygon and declare it as below. In the case of this project, the GPS Hydro Polygon will have the same initial shape as the normal Hydro Polygon, and the island holes and lagoons/salt pans will contain less vertices:






If you are drawing lakes or rivers, then you should make simpler shapes for the GPS display.






Sloped Polygons


There are some little-documented features in the new FS X terrain - one of them is the possibility of creating sloped polygons, just like the LWM3 of FS 9.

You may sometimes need to modify the slope of the terrain - for example, in another project, the near-by island of Saba, the road from the airport climbs up a slope to the top of the mountain:






The terrain mesh may not be able to reproduce this gentle slope correctly, and in any case, it will vary with the user's Terrain Mesh Complexity setting:






The solution is to draw a sloped polygon that will smooth this gradient;

How to do this? FLX flatten polygons can, in fact, be sloped, and do not necessarily require a constant and uniform height value for the entire polygon. SBuilderX allows you to assign a height value for every vertex of this polygon;

So, just draw the polygon as desired and declare it as a Flatten:







Then, you mush assign a height value to each of the vertices of the polygon - right-click on each of the points (and NOT on the edge) of the polygon and select Properties:






Then, assign a height value in meters to that point:






Continue to do this for all of the points of this sloped polygon:







The result in game will be a more realistic depiction of the terrain:















You can continue to add as many different terrain elements to your scenery project as you wish. When finished, it might look something like this:





To remove the background image, use the View - Show Background menu:





As can be seen, this scenery is moderately complex and should give a good representation of the real thing.





Compiling scenery



SBuilderX allows the selection of all or only part of the scenery that will be compiled. Terrain elements can be selected by choosing the Select tool in the tool bar (the arrow) and then clicking on the desired element. Shift-click to add to the selection.

However, Flight Simulator X terrain scenery is now completely contained within one unique bgl, the "cvx", that is, the Combined Vectors for FS X. So, you may as well select all the elements for compilation. You can either draw a selection marquee around everything or use the Select menu:





Once the terrain elements have been selected, the compilation window can be called up by clicking on the "Compile" tool (the green arrow) in the tool bar:





Normally, SBuilderX can be used to create many different types of scenery, such as altitude mesh, land and water class, photo-real ground textures, object placement, and others. The compilation window allows for selecting any or all of these types for compilation. However, SBuilderX for FS X is at the moment in its preliminary stage and only creates terrain vector scenery and that is the only option in the compilation window.

Make sure to check "Terrain Vector" in this window. If you have chosen to have the bgl copied directly to a scenery folder, then also check that here. Then, click "Compile".

A scenery bgl will be created, either in the folder you indicated, or, in all cases, in the SBuilderX\Tools\Work folder. Declare this bgl in the FS X scenery library as usual.

Remember that you are free to change the name of the compiled bgl to anything that you wish. Flight Simulator does not require the use of the "cvx" prefix at all.


IMPORTANT: Please remember that if you have installed the FSX_modified_terrain_cfg.zip, and created terrain with some of the additional terrain features in that file that are not available in the default terrain.cfg file, then your users must also have installed the modified file in order to display them. Therefore, you should instruct your users to install the file.



The final result


This is how the project looks in game:
















Common problems


This short list represents the issues that most designers will initially encounter.


Exclusions

    Problem: I excluded a Hydro Polygon and drew a new coast, but land displays out where there should be water
    Reason: Hydro Polygons cover the underlying land. When excluded, that land displays, unless it is covered again by a new Hydro Polygon.
    Solution: Make sure that your new Hydro Polygon extends as far as the default Hydro Polygon that was excluded.

    Problem: I drew an exclusion polygon, but the trees/buildings/runway still appear in FS.
    Reason: Exclusion polygons (EXX) only remove terrain elements.
    Solution: To remove autogen, use airport bounds (FLX) polygons. To remove other objects or airport elements, see the BGLComp documentation.

    Problem: My exclusion polygon does not remove freeway traffic.
    Reason: This was a bug in FS at initial release.
    Solution: The FS X patch will fix this.


Hydro Polygons

    Problem: My new lake creates a hole in the terrain.
    Reason: Hydro Polygons must have an altitude assigned to them, or SBuilderX will give them a default height of 0 meters.
    Solution: Assign the correct height to the Hydro Polygon.

Flattens

    Problem: My new Airport Flatten creates a hole in the terrain.
    Reason: Airport Flattens must have an altitude assigned to them, or SBuilderX will give them a default height of 0 meters.
    Solution: Assign the correct height to the Flatten.

    Problem: My FLX polygon will not exclude all autogen trees.
    Reason: At initial release of FS X, the autogen exclude function was not working correctly.
    Solution: The FS X patch will fix this.

    Problem: My new airport mask is not grass.
    Reason: Airport masks will display different textures depending on the surrounding land class.
    Solution: Either change the surrounding land class, or draw a PKX polygon over your mask and make it grass.

Hydro Lines

    Problem: I drew a beach line, but the wave effect is on the land side.
    Reason: Wave effects only appear on one side of the shoreline.
    Solution: Always draw shorelines clockwise around the Hydro Polygon, that is, with water on the right.

Roads

    Problem: My new road does not display any moving vehicles.
    Reason: Road lines are only textures.
    Solution: To add vehicles, draw a freeway traffic line over your road.

Freeway Traffic

    Problem: I cannot get two-way traffic to work.
    Reason: This did not work at initial release of FS.
    Solution: Perhaps the FS X patch will fix this.

Park Polygons

    Problem: I drew a polygon in the water and assigned a land class value, but my new island does not display.
    Reason: Land class polygons no longer display on water.
    Solution: To make an island, draw a Hydro Polygon and make a hole in it for the island.

    Problem: My land class polygon displays a different ground texture on sloped ground.
    Reason: Land class polygons now receive the same gradient mapping as normal land class.
    Solution: No easy solution for this at the moment.





Support


I am, unfortunately, unable to offer support of any kind for lack of free time. Please do not write as I cannot answer any messages.

But, if you do have any questions, please do not hesitate to visit the Avsim scenery design forum at:

http://forums.avsim.net/dcboard.php?az=show_topics&forum=123


For questions or problems concerning SBuilderX, you can consult the very excellent SBuilderX forum that is located at:

http://www.ptsim.com/forum/index.php




Appendix: Exclusion GUIDs


Exclusion polygons are extremely powerful and very flexible. This is the list of the various GUIDs that serve to exclude terrain elements:

 1. Global exclude -- {00000000-0000-0000-0000-000000000000} will remove all terrain elements intersected by the exclusion polygon

 2. Terrain types

    - EXX (Exclusions) -- {AC39CDCB-DB78-4628-9A7C-051DA7AC864A}  
        Note that excluding an exclusion may not work

    - FLX (airport bounds) -- {359C73E8-06BE-4FB2-ABCB-EC942F7761D0}

    - FWX (freeway traffic) -- {54B91ED8-BC02-41B7-8C3B-2B8449FF85EC}
         this type of exclusion did not work correctly at the initial release of FS X, but should be fixed for the patch

    - HGX (GPS water) -- {EA0C44F7-01DE-4D10-97EB-FB5510EB7B72}

    - HPX (normal water) -- {956A42AD-EC8A-41BE-B7CB-C68B5FF1727E}

    - HLX (shorelines) -- {0CBC8FAD-DF73-40A1-AD2B-FE62F8004F6F}

    - PKX (land class polygons) -- {91CB4A9B-9398-48E6-81DA-70AEA3295914}

    - RDX (roads) -- {560FA8E6-723D-407D-B730-AE08039102A5}

    - RRX (railroads) -- {33239EB4-D2B8-46F5-98AB-47B3D0922E2A}

    - STX (streams) -- {714BF912-F9DF-467E-80AE-28EB27374DBD}

    - UTX (utility lines) -- {C7ACE4AE-871D-4938-8BDC-BB29C4BBF4E3}

 3. Individual terrain elements -- to remove specific terrain elements, for example, a 2-lane asphalt undivided road, use the relevant GUID from the terrain.cfg file.




Appendix: QMID extents


This table, adapted from a previous FS Terrain S.D.K. indicates the extents of various QMID grid levels.