Introduction to SBuilder

Scenery Builder, also referred to as SBuilder, is a scenery creation tool for FS2004.

Introduction


What is New

What is New in SBuilder 2.05

This is a major revision of SBuilder since version 2.02 was released in September 2004. The main additions to version 2.02 are shown below. Even if you use SBuilder regularly and visit the PTSim Scenery Design Forum, there should be 1 or 2 items that were not documented anywhere. If you never used SBuilder before, please read all the Help documentation.

  • SBuilder is freeware
  • SBuilder requires Registration
  • Point Properties window has changed
  • Automatic Insert mode
  • Multiple Joining of Lines and Polygons
  • Multiple Selection of Objects
  • Interpolation of Points in Lines and Polygons
  • New Procedure for Map Calibration
  • Special Key Functions Special
  • Auto Mode generation of Water Class Scenery
  • Higher Resolution Photo Scenery
  • LWM tilted polygons
  • Support for ASD Macro Objects
  • Support for API Macro Objects
  • Support for Rwy12 Objects
  • New Taxiway Signs
  • Automatic starting of FS9 after compilation
  • Support for LOD11 mesh generation
  • Appending Objects through Shape files
  • BLN exporting has changed
  • Support for HGT 1Arc Sec Dem files
  • Re-projection of Raster images
  • Find Tool supports Objects
  • More Display Grids
  • Show Labels (Lines, Polygons or Objects)
  • Several Options in BGL features
  • Many Other Options


CopyRight Notice

Scenery Builder (SBuilder) is copyright © 2005 Luis Sá & PTSim.

Scenery Builder can be posted, distributed or made available for download providing that it is distributed as a single ZIP file as found at:

http://www.ptsim.com/downloads/sb205.zip.

You can use Scenery Builder in free or commercial scenery projects providing that you make a statement in the documentation of your project similar to this one: "Scenery Builder, available at www.ptsim.com, was used in the making of <Your Scenery>"

Some SBuilder features are disable on non registered licenses.


Registration

In version 2.05 you can not SAVE, EXPORT or COMPILE the following type of projects unless you register SBuilder:

  • projects to which you Append a Polish Map file
  • projects to which you Append a BLN file

Registration of SBuilder is free if you do not use SBuilder in commercial projects. If you want to use SBuilder in commercial projects, registration costs 99.95 Euros (VAT included). Instructions on how to register are found in the SBuilder Help menu. Your registration for version 2.02 is fully valid for the present version.


Installing and Uninstalling

In order to install SBuilder create a folder where you want to install the programme and simply unzip the distribution package to that empty folder. To uninstall simply delete this folder as Scenery Builder does not use the Windows registry. After unzipping the contents of distribution package on a previous created folder with the name "SBuilder" you will get the following structure of folders:

You need to obtain the SCASM Scenery Compiler by Manfred Moldenhauer and place the file scasm.exe in the "Tools" subfolder of Scenery Builder. SCASM is not distributed with this package and can be obtained at:

www.scasm.de

Note that version 2.96 or higher is required.

Finally you need fsuipc.dll by Pete Dawson installed in the "modules" folder of FS2004.

All other tools used by Scenery Builder are distributed with this package and are placed in the "Tools" folder. Note that when SBuilder runs for the first time in a system, it takes some minutes to build copies of FS textures which are placed in the folder "Tools\Bmps". This will only happen during the first run. Afterwards, Scenery Builder starts much faster.


Requirements

SBuilder requires that FS2004 is installed in your system. SBuilder will not start if it fails to find FS2004.

SBuilder is a Visual Basic 6.0 application developed under Windows XP operating system. All DLLs files needed to run Visual Basic 6.0 should be installed in your system.

SBuilder hardware requirements depend on the complexity of your project. The main requirement will be memory to handle large bitmaps as backgrounds and speed if you are working with large quantity of data. As an example, the processor used in the developing of SBuilder was a 2.8GHz PIV with 512MB of RAM. We tested SBuilder with files with about 20 thousands polygons and big bitmaps. In order to get a good display refreshing we needed to partition bitmaps backgrounds and work with smaller projects. In the quoted system, bitmaps of 2000 x 2000 presented no speed problem.

Very Important Note: SBuilder only works if your decimal separator is the character "." (point). If you have the decimal separator defined as comma (as it is the case in Portugal) SBuilder will read/write wrong values. In that case you need to change the decimal character to "." (normal setting in most regions) through the Windows Control Panel.

Also very important note: a mouse with a wheel is almost mandatory to work with SBuilder.


Acknowledgments

I would like to thank to the author of SCASM, Manfred Moldenhauer, for his continuing support of SCASM. SBuilder uses SCASM for compilation of the BGLs and, without it, it would not be possible to develop SBuilder.

I am also grateful to Pete Dawson for providing a key for SBuilder such that you can communicate with FS2004 from SBuilder.

I also want to thank to Jeffrey Stanyer, a friend from Australia, for his efforts in providing tutorials for SBuilder, to Jan Nielson, Horst from Vienna, Arno from Holland, Anders Dahlqvist and many other SBuilder users for giving me feedback and making suggestions for improvements.

Finally I would like to thank all contributors of the MSFS Scenery Design Forum, at www.avsim.com, for exchanging ideas related to Flight Simulator scenery design.


Scenery Builder, also referred to as SBuilder, is a scenery creation tool for FS2004.

Working with SBuilder


Manipulating the Display

The first thing that you need to learn in order to work with SBuilder is how to use the mouse to control the display. If you are experimenting SBuilder for the first time we recommend that you press New on the Toolbar and then the F3 key.

The easiest way to manipulate the display is with the Mouse Wheel. You perform 2 basic functions with the Mouse Wheel: Zooming and Panning.

You can zoom in or zoom out by turning the wheel in or out. On the other hand you can move the viewpoint by pressing down the mouse wheel and drag (e.g. moving the mouse maintaining the wheel pressed down). When you want to move the viewpoint to a very distant location it is better that you zoom out first and pan afterwards.

Zoom and Pan do not change the position of lines, polygons or objects of your project. The cursor in Scenery Builder will indicate in which mode you are and, after some time, you will get used to it.

Very Important Note: When you pan (holding the wheel down and moving the mouse) you will see all the items moving in the SBuilder display. It is very important to understand that the locations of those items (lines, polys or objects) do not change when you Pan. What changes is the View Point. On the contrary (as you will see later on) you can move these entities by selecting them and dragging with the mouse.


Status Bar

It is important that you understand the meaning of the parameters shown in the Status Bar.

If you roll the mouse wheel you will see the Zoom to change in the status bar. Maximum Zoom is 2048 and minimum Zoom is 0.03125. Try to centre the display at several regions of the world by moving the mouse with the wheel pressed down.

The second and third parameters in the status bar are latitude and longitude. In the shown example we are using "decimal degree" format but you can change the format for displaying latitude and longitude in the Options > Preferences > Display menu. For an explanation on the meaning of the other parameters go here.

Note: Depending on the mode of operation you can see in addition to the shown parameters: the Land Class Index, the Custom Bitmap Name or the Altitude of the Mesh.


Working with Points and Polygons

Working with Points, Lines and Polygons

Creating a Line

If you have not yet done so, you can start Scenery Builder and press New on the Toolbar to start a new Project. The Project Property window with several sheets will appear. At this moment you can ignore all of these properties and press OK. Then press the Line tool on the Toolbar to start the creation of a Line. You will be creating your first line with SBuilder. As soon as you press the Left Mouse, one point (the first point) of your line is created. You can add more points by pressing the Left Mouse several times. To terminate the Line press the Right Mouse.

Accessing the properties of a Point in a Line

Once you have created a Line you can click with the right mouse over one point of the Line to have access to its Properties. Note that you need to click exactly over a point. If you click on a segment of the line you will get the properties of the Line, not the properties of a point in that Line. Here is an example that you can try:

If you click the last line in the pop-up menu, you get the properties of Point number 2 in Line number 13. Here is the Properties window of the point:

Note the Width parameter on the bottom. The default Line width is 1 so that number shows 1 when the window appears. If you change the width of the point to 255 (meters!) you line will look like:

New in version 2.05: when you access the properties of points you will get the following window:

By pressing "Expand", you will get the previous window.

Selecting, moving and deleting Points

Click with the Left Mouse over a point and hold to enter in moving mode. You note that the point changes its colour reflecting the fact that it became Selected. After selecting one point, you can press and hold the SHIFT key and click over a second point with the Left Mouse. If you do it in the right manner you will get 2 Selected points. You can move the 2 points simultaneously. Or you can delete the points by pressing the DELETE key. When you press the DELETE key a dialog box appears and you are asked to confirm deletion of selected parts.

Selecting and moving the whole Line

If you click with the Left Mouse on the segment of a line you select the whole line. Then you can move it (dragging with the mouse), delete it, copy it, paste it, etc. If you click with the Right Mouse the a segment of a Line you get access to its Properties.

Holding I D B and clicking

You can work very fast with lines by pressing and holding the keys I D or B while you click on points of lines:

  • hold the I key (I for insert) and click with the Left Mouse on a segment of a Line to Insert a new point.
  • hold the D key (D for delete) and click with the Left Mouse over a point of a Line to Delete the point.
  • hold the B key (B for brake) and click with the Left Mouse over a segment of a Line to Brake it into 2 parts.

You can Join 2 Lines by selecting one of the Lines and moving it so that the End Point of one of the Lines coincides with the Start Point of the other Line. By releasing the lines in that position they will join and become a single Line. Note that a line has a Start and an End Point. See more below about multiple line joins.

The End point has a different symbol. Did you notice it?

New in version 2.05: If you press (and release) the INS key while you are in Line (or Poly) mode you will enter a special insert mode. In this mode, you will insert a new point whenever you click in a segment of a line. If you want to exit from this mode you will need to press the mouse right button or the ESC key. This special inserting mode is very important to speed up some tasks.

Polygons are very similar to Lines

You can create a Polygon in a similar manner. You need to change to Polygon mode by pressing the Poly button in the Toolbar. Note that to terminate the construction of a Polygon you press the Right Mouse. You can use the I and D keys to insert and to delete points but you can not break polygons.

Note that when you are in Polygon Mode (the Poly button in the Toolbar is pressed) you cannot select Lines that may exist in the project. However, if you change the mode to Pointer Mode you can work with Lines and Polygons simultaneously. You can, for example, select some points of one Line and some other points of a Polygon and move (or delete) them simultaneously. Note that in Pointer Mode you can not Copy, Cut or Paste. These Edit functions only work in Polygon and Line Modes. Also note that when you paste a Line or a Polygon, the created Line or Polygon will cover the previously copied (or cut) Line or Polygon.

Joining polygons

We have seen that we can not break a polygon. But we can join 2 polygons if they have a common side. Here is an example:

You select the 2 polygons as described below under "Setting the properties of several Lines and Polygons". Basically you use CTRL instead of the SHIFT key. If you have both polygons selected in this special way and you enter the polygon properties the button "Check Poly" changes to "Join". You press "Join" and that is it. If the "Join" button does not show, then the 2 sides are not completely coincident. Increase Zoom to check this.

Multiple joining of Lines and Polygons

Starting in version 2.05, you can make multiple (simultaneous) joins. You can see the Preferences window (Other Settings) for the various possibilities. If you set Auto Join, after 2 polygons (or lines) are joined, the result item can be joined with other items until no more joins are possible. For example, say you have polygons A B C D E and F. Say that A and B become G. If G and C can be joined they will become the single item H. If H can be joined with D, they will become I. If no more joins are possible, you will end up with polygons I (=A+B+C+D) E and F.

It is important to understand "Display based Joining". For 2 polygons to be joined they need to have a common side. At high Zoom 2 polygons can have no common side but, at low Zoom, 2 sides of the polygons can appear as a unique one. In order to avoid unwanted joining at low Zoom settings, uncheck the box "Display based Joining".

In the case of lines you can instruct SBuilder to ignore the direction of the lines. You can also force SBuilder not to join lines if they have different names (labels).

The order of Lines and Polygons

The order of the polygons and lines can be changed. As you add more lines and polygons to your project, the new lines and polygons will display on top of the existing ones. If you want to change the order of a polygon you just click on border of the polygon with the right mouse. In this an example the polygon is the second in a trio:

In this polygon Properties window, you can send the polygon to the bottom of the pile (the first to be drawn in the Scenery Builder display and also in FS2004) to the top of the pile or you can move the polygon one position up or one position down the pile.

Setting the properties of several Lines and Polygons

In Line mode or Polygon mode you can select many elements and change the properties of all the elements simultaneously. To do that you hold down SHIFT key while you press (select) parts. If you release the SHIFT key everything gets unselected on the next mouse click. If you press the right mouse while the SHIFT key is down and if there are many selected items, the changes that you introduce in the property sheet will apply to all selected items.


Selecting Everything

You select All items of a type in the Select menu. You can also select items in Pointer Mode with a "Selection Window".

To do this you press the Left Mouse, move while holding and release it. All items that lie on the "selection window" get selected.

Polygons and Maps are selected by pressing the borders and not the interior. This is very important because, for example, you could wrongly try to select a Polygon by clicking on its interior.

Starting with version 2.05 you can select several Lines or Polygons or Objects with a window in Line or Poly or Object mode. In these modes you need to press and hold the CTRL key when you start the window selection.

Remember: polygons and maps are selected by pressing the borders and not the interior!


More about Lines and Polys

You can make polygons from lines and lines from polygons. This can be useful in an handful of situations. For example you have a lake and you want to make a shoreline for the lake. The shoreline could be made as line (with some width!) generated from the polygon. To achieve this, you have the button "Make Line" in the polygon property window and the button "Make Poly" in the Line property window.

You also note another button in the Line and Polygon Property window. The button is called CheckLine or CheckPoly and works in the same way for lines and polygons. The checking function is explained in this picture:

You can reduce the number of points in a line or in a poly by using an appropriate Distance parameter.

Important: In SBuilder 2.05 you can also use the Distance box to increase (!) the number of points using "Auto Check". This has an opposite effect to what is described in the window. We could call this function as Interpolation. Interpolated points will be inserted in Polygons and Lines if you set a negative value to the distance parameter and press "Auto Check" several times.

In the following figure, the polygon on the left was created and then it was copied and pasted to originate the polygon on the right. Just when this was done the polygons were identical. But, later, the interpolation feature just described was used on the polygon on the right to increase its number of points.


Working with Objects

If you go to Object mode and you click the display you will place objects. The picture shows the symbols used to represent objects:

You can see 5 objects. On the left you have 2 library (or macro or Rwy12) objects. Both library objects have a footprint with Length greater than Width (so they are thin!). You also have a taxiway sign, an effect and a windsock. The 2 objects on the bottom are in green meaning they that they have been selected. To select an object you left click a border or its centre point. To change the Width and the Length of the footprint you left click one of the 4 corners of the object and you move the mouse holding down the left button. If you left click the 5th point in the border (in the middle of the edge) you rotate the object (=change the heading). You can think of the heading as the direction that goes from the centre to that 5th point.

Note 1: To select objects you click the centre point or its borders (this is new in version 2.05).

Note 2: Starting in version 2.05, objects can be handled in the same way as lines or polygons. You can use the selecting window in Object mode by holding down the CTRL key when you start the window selection. You can also use "Find" for Objects as explained in the relevant section.


Selecting and Generating BGLs

One basic and central idea in Scenery Builder is that Lines, Polygons, Photo Tiles, Objects, etc have a Selected and a Not Selected (normal) state at any given instant. Actions, such us Deleting or BGL generation, only take place on Selected objects. You can, in this way, generate BGLs in a programmed manner. For example you can select some of your polygons to generate BGLs only for those selected polygons.

It is also very important that you set the BGL generation folders. Just right click an empty region of the display to enter the Project Properties Window. You have 2 folders. The first folder is the normal folder for SBuilder output. The second folder is the folder for Land class and VTP Photo BGLs. This second folder should not have a sister texture folder. You also need to activate both these folders (both these sceneries!) in the FS9 Scenery Library menu. Note that you can force FS9 to load the region that you are working on by choosing "Fly Aircraft to ..." in the View menu of SBuilder.

  • More information on BGL generation
  • More information on the settings of the BGL folders
  • More information on the Fly Aircraft to ... command


Working with Maps

Working in Scenery Builder is based on background Map sets. Background Maps guide you in the creation of shorelines, roads, rivers and so one. If are only making lines and polygons, you could, in principle, work without a background Map. However, for Photo and Mesh scenery creation they are mandatory.

You can have several Map sets in your Project but you must be aware that they require considerable amounts of system memory. Normally you have only one Map set per project.

Each Map set is a composed of 1 up to 9 individual maps. The basic Map of a set is the Summer Map. The next 6 maps are the Spring, the Winter, the Hard Winter, the Fall, the Night and the Alpha maps which are intended for Photo scenery creation. If you only loaded a Summer Map and you specify, for example, Spring Photo output, the summer map will be used instead of the missing Spring map. There are 2 more maps. One is the Land Class map which will only be used in very particular situations. The second and last map is the Mesh map. Summarizing: 7 maps for photo scenery; 1 for the Land (or Water) Class tool and 1 for Mesh scenery.

Maps can have one of the following bitmap formats: 8-bit with a palette, 24-bit or 32-bit. In the particular case of the Alpha or Transparency Map, the 8-bit format is mandatory. In Paint Shop Pro you should make the Transparency Map a Grey Scale map by using the appropriate command.

Although a Map can be selected and moved as any Point, Line or Polygon, Maps are supposed to be placed in its proper location to serve as a reference for the scenery work. It essential that you carefully calibrate your Map.

Map calibration

As soon as you insert a map on SBuilder (by pressing the Map button in the toolbar and then clicking anywhere the SBuilder display) you are prompted to calibrate it. You can do it at once by introducing the latitudes and longitudes of the 4 borders of the map. For example, with maps for mesh work you will probably know the north and south latitudes and the west and east longitudes of the map. You can also recalibrate the map at any stage by moving the mouse to a edge of the map and pressing the right button. Here is the calibration window that assists you in the calibration of a map:

The normal calibration has 3 steps:

  1. calibration of point 1
  2. calibration of point 2
  3. final calibration

These steps are described in the Help menu reproduced here:

You finish the calibration by pressing "Calibrate". If your 2 known points are almost vertically aligned could set "Use Latitude" only. Normally you should choose 2 Points well separated in latitude and longitude and set "Use Both".

Note: Once you calibrate a Map, you should create a "Data" or calibrating file. Use the button on the left bottom corner of the map properties window to do so:

This command creates a TXT file with the same base name as the bitmap, such that you do not need to recalibrate the map again if you need to use it in a different project. When you add a map to a project, SBuilder tries to read the calibration information from a TXT file with the same name as the bitmap. If the TXT file does not exist in the folder, SBuilder prompts you to the calibration process. This is essential when you use the same map across several projects.


Special Keys

Del - to delete selected items. A confirmation dialogue is invoked depending on the setting of the parameter "Ask Delete" in the INI file.

Esc - to end the creation of a Line or Polygon (as the right mouse) or to exit special modes as Automatic Inserting.

Ins - if you press (and release) the INS key while you are in Line (or Poly) mode you will enter a special insert mode. In this mode, you will insert a new point whenever you click in a segment of a line. If you want to exit from this mode you will need to press the mouse right button or the ESC key. This special inserting mode is very important to speed up some tasks.

Ctrl - you can select several Lines or Polygons or Objects with a window in Line or Poly or Object mode. In these modes you need to press and hold the CTRL key when you start the window selection.

Shift - if you press Shift while you make a selection, the new selected items will add to the existing selected items. Otherwise the previous selection is lost.

Space - this can be used in Line mode to create points in a very fast way. You can use it with or without a digitizing tablet. You start the creation of a line and, moving the mouse, you press Space. The result is as if you pressed the left mouse button.

I - to insert a Point on a Line or Polygon. See here for further information.

D - to delete a Point on a Line or Polygon. See here for further information.

B - to break a Line in 2 Lines. See here for further information.

P - if you press and hold this Key, the left mouse button will pan the display (useful for a digitizing pen or for a mouse without a wheel).

Z -if you press and hold this Key, the left mouse button will zoom in (if you move the mouse upwards) or zoom out (f you move the mouse downwards) the display (useful for a digitizing pen or for a mouse without a wheel).

R - if you press and release this key, the left and right buttons of the mouse will be reversed. You exit this mode with the Escape key. This is useful when you have a digitizing pen with a single button.

Add - to increase the width of a line. If you press and hold the "+" key and you click on a point of a line, the width of the point will increase by a factor of 1.5

Subtract - to decrease the width of a line. If you press and hold the "-" key and you click on a point of a line, the width of the point will decrease by a factor of 1.5

Up arrow - to scroll through Points when in Manual Checking of Lines or Polygons. If point N is selected and you press the Up arrow, point N+1 will be selected and the display will be centred on point N+1.

Down arrow - to scroll through Points when in Manual Checking of Lines or Polygons. If point N is selected and you press the Down arrow, point N-1 will be selected and the display will be centred on point N-1.

Left arrow - to scroll through Lines and Polygons in Manual Checking of Lines or Polygons. If you are checking Line N or Poly N, pressing this arrow will select point 1 of Line N+1 or Poly N+1.

Right arrow - to scroll through Lines and Polygons in Manual Checking of Lines or Polygons. If you are checking Line N or Poly N, pressing this arrow will select point 1 of Line N-1 or Poly N-1.


Making Scenery with SBuilder

Scenery Builder creates scenery for FS2004. SBuilder makes BGL files from source geographic data. The source data can be:

  1. made directly in SBuilder using the graphical interface
  2. imported data from GIS files
  3. imported from default LWM and VTP files.

You can make the following type of scenery with SBuilder:

  • Mesh Scenery
  • Land and Water Class Scenery
  • Photo Scenery
  • LWM masks and Flattens
  • VTP polygons and VTP lines
  • Exclude Regions
  • Exclusion Rectangles
  • Objects and Macros


Mesh Scenery

SBuilder can create Mesh scenery very easily. Before you start you need to get raw or DEM (digital elevation model) data for the region that you want to change. You can download DEM files from

ftp://edcsgs9.cr.usgs.gov/pub/data/srtm/

for most areas of the world. Each of these files covers an area of 1 degree of latitude by 1 degree of longitude. The files have an extension "HGT" (probably meaning height). You can not use "HGT" files directly in SBuilder. You need to make 2 conversions using the SBuilder DEM Tools. Firstly you need to convert the HGT file to an BSQ file. Secondly you need to convert the BSQ file into a bitmap map to be used in SBuilder. As soon as you convert the HGT into a BSQ you could use the BSQ Viewer to look to the file. The file can have "voids" (points for which an altitude is not available) and it could need some pre-processing. See the DEM Tools help for some possibilities.

Once you have a mesh bitmap you are ready to make scenery. It could be helpful to have at hand the latitudes and longitudes of the 4 borders of your bitmap. If you are working with SRTM data these latitudes and longitudes are integers (degrees with zero minutes and zero seconds). You press the Map tool and click more or less where the map should go. The Map Properties window will show.

As soon as the Map Properties window appears, you click the Mesh Map sheet and you enter the latitudes and longitudes of the 4 borders of your bitmap. You press OK to close the Map Properties window. The mesh map is calibrated. The summer, spring, ..., displays of this map will be ignored since you will only use this map for mesh creation.

Remember: go to the View menu and under Maps select the last entry - Mesh (Bsq2Bmp) !

Once you have the calibrated mesh bitmap you press the Mesh button on the toolbar and click on it to define a mesh tile. Here is a situation:

The map on the background (greens and blue) is a mesh bitmap. As soon as you pressed the Mesh button the Grid display changed to LOD8. In the example you see one LOD8 square painted with a type of diagonal grid. The reason is that the painted LOD8 square has been clicked on. You set the resolution of the mesh that you want.

Before generating the BGL, you need to go to Pointer Mode and select all the Mesh Tiles. Then press "Compile" and the BGLs will be generated automatically.

Note 1: your bitmap should cover at least one LOD8 square (one Cell). You may need to merge BSQs to cover your area of interest.

Note 2: the Check button will test if all painted LOD8 squares (the mesh tiles you want to generate) have a bitmap underneath. If there is no bitmap underneath (you could have deleted it accidentally) the mesh tiles are deleted.

Note 3: in version 2.05 you can generate tilted LWM polygons ("Make Flattens") that can help you in making high resolution photographic scenery. See this topic in the PTSim forum for further help.


Land and Water Class Scenery

With Class scenery you can change the generic textures that cover a particular region of the Earth. Each of these generic textures covers a square of 1.2 km by 1.2 km at the Equator and can have (trigger) autogen scenery. In order to make a Land Class scenery you press the Land Button and you insert textures with mouse clicks. You will notice that the grid display will change to LOD13 and that the textures are placed on the vertices of the LOD13 squares (see Further Reading below). You can have, or not, a background to guide you. You also can set an option to insert a texture as you move the mouse over the display (Insert on Raster). The Land (or Water) class Tool appears as in the figure:

Class Maps

A special feature of Scenery Builder is the capability of generating a BGL from a bitmap representing the use of land or the type of water. Such bitmaps is called Class Maps. These bitmaps have a number of different colours equal to the number of used classes. Furthermore Scenery Builder translates each colour of the "Class Map" in 1 up to 3 generic textures or classes. The 3 classes are defined in a probabilistic way in order to avoid continuously repeating textures for a region with the same class index. In order to use this facility you start to assign "colours to classes" by pressing "Edit". When you create all your definitions you press "Make" to generate the "Land or Water Class" tiles. To get a BGL you need to "Select All Lands or All Waters" and then press "Compile". For further information see PTSim topic on Global Land Classes.

Work with PolyView

You can use a programme called PolyView, available at the AVSIM file library, as a land class catalogue. You can easily examine 3 different pictures of each land class with PolyView and chose one for placing in your map. You can copy into the clipboard (while in PolyView) the index of the chosen land class. Then, when in SBuilder, you can paste from the clipboard the chosen index. To set PolyView to work with SBuilder, please see the INI file

Further Reading

The following is an excerpt of a topic that I wrote in the MSFS Scenery Design Forum at http://www.avsim.com.

The TMF Resampler programme, made available by Microsoft (and used by SBuilder), can create:

  • mesh scenery ( TYPE = ElevS16LSB )
  • land class scenery ( TYPE = ClassU8 )

In both cases a BGL file is generated covering a region that we specify in the destination section of the INF control file. This region can not be smaller than a certain size. This minimum size corresponds to 257 x 257 elevation points or 257 x 257 class indexes. The elevation points and the class indexes are the vertexes of LOD squares. In the Land class case the class indexes are the vertexes of LOD 13 squares (or Areas). Therefore the smallest region that we can have in Land class scenery is a LOD 5 region. In the case of the elevations points it depends on the LOD. For example for a "LOD 10 resolution" mesh, the elevation points are vertexes of LOD 18 squares. In this LOD table:

 | Sample Size Meters |  | Degree Boundaries |  | Span Meters
LOD | N/S | W/E | Latitude | Longitude | N/S | W/E
0 |  | 52087,50 | 90 | 120 | 10000800 | 13334400
1 | 19532,81 | 26043,75 | 45 | 60 | 5000400 | 6667200
2 | 9766,41 | 13021,88 | 22,5 | 30 | 2500200 | 3333600
3 | 4883,20 | 6510,94 | 11,25 | 15 | 1250100 | 1666800
4 | 2441,60 | 3255,47 | 5,625 | 7,5 | 625050 | 833400
5 | 1220,80 | 1627,73 | 2,8125 | 3,75 | 312525 | 416700
6 | 610,40 | 813,87 | 1,40625 | 1,875 | 156263 | 208350
7 | 305,20 | 406,93 | 0,703125 | 0,9375 | 78131 | 104175
8 | 152,60 | 203,47 | 0,3515625 | 0,46875 | 39066 | 52088
9 | 76,30 | 101,73 | 0,17578125 | 0,234375 | 19533 | 26044
10 | 38,15 | 50,87 | 0,08789063 | 0,1171875 | 9766 | 13022
11 | 19,08 | 25,43 | 0,04394531 | 0,05859375 | 4883 | 6511
12 | 9,54 | 12,72 | 0,02197266 | 0,029296875 | 2442 | 3255
13 | 4,77 | 6,36 | 0,01098633 | 0,014648438 | 1221 | 1628
14 | 2,38 | 3,18 | 0,00549316 | 0,007324219 | 610 | 814
15 | 1,19 | 1,59 | 0,00274658 | 0,003662109 | 305 | 407

there is no LOD 18 entry. But it easy to see that for a LOD 18 the Span in Meters would be 38,15 in the N/S direction and 50,87 in the W/E direction. We conclude that the minimum mesh region that we can generate at LOD = 10 is, precisely, a LOD 10 square (9,8 Km by 13 km) with elevation points at the vertexes of LOD 18 squares (38,2 m by 50,9 m). For a mesh (at LOD = 10 resolution) covering (spanning) 2 x 2 LOD 10 squares, we need 513 x 513 points. We can realize this mesh with 4 BGLs each covering a LOD 10 square and having 257 x 257 elevation points. Or we can realize it with a single BGL with 513 x 513 elevation points covering the same 4 LOD 10 squares. The 2 situations will produce the same result if Point 257 on the left (upper) square is identical to Point 1 on the right (lower) square. This will be more clear with the discussion at the end of this post for land class scenery.

We saw that a land class BGL spans a whole LOD 5 square (312 km by 418 km - so not really a square!). If we want to work a smaller area we use index = 254 (which is transparent) in the regions that we do not want to change (note: SBuilder will place this 254 index for you). Consider this example:

The big white squares are LOD 13 Areas. These Areas have small squares at the vertexes. In the figure we see 20 vertexes. For each of the vertexes we define a land class index. We have 12 white (say white means index = 254 or transparent) vertexes and 8 coloured vertexes. Since a vertex affects 4 squares we could expect a final result like this:

But the final result that FS shows is much better. Firstly a square is displayed only if all their 4 corners have significant land class indexes (different from 254). Secondly FS mixes the 4 textures that corresponds to the 4 land classes and blends them in a manner similar to what is shown in the following figure:

The rest of the post is in the AVSIM archives.


Photo Scenery

Scenery Builder can make 2 types of photos scenery - standard resolution scenery (approximately 4.8m/pixel) and higher resolution scenery (2.4m/pixels and 1.2m/pixel). The former is referred to as VTP photo scenery. The latter is a feature introduced in version 2.05. The first part of this section refers to VTP scenery only. Higher resolution photo scenery is addressed at the end of this section.

1 - VTP Photo Scenery

Scenery Builder can take a set of bitmaps and produce photo scenery BGLs. You can use a single bitmap to generate summer photo scenery that will be used in all seasons. Alternatively you can use 6 bitmaps (one for every season and another for a night texture) to have seasonal photo scenery. Finally you can add to the project a 7th bitmap representing a transparency map. This map must be a grey bitmap with white representing complete opaque and black complete transparent.

This will allow a very good matching between worked and non-worked areas. Scenery Builder generates BGLs and the required bitmaps, adding the alpha channels if necessary. Note that the "sliced" bitmaps are internally generated by SBuilder and not by the MS Resample tool. Completely opaque bitmaps will be of the so called DXT1 type with a size of 43KB. Transparent bitmaps will be of the 8-bit format with alpha type and will have a size of 87KB. Both will have mips.

Tip for creating a transparency map

One tip to generate the alpha bitmap is get a full view of the SBuilder display in Summer season, with the LOD13 grid display ON. The tip consists on copying the display to the Clipboard by pressing "Print Screen" and then pasting to a painting programme as a New Image. Then, with the Pen tool of the painting programme, you draw a line defining the contour of the area that you want to make visible. After this you change your picture to "2 colours": white inside the line and black outside the line. In this process your Summer picture, the LOD13 grids, and the contour line became either white or black. Then you make the picture "several colours" again and you use a "blur" filter to generate shades of grey as in the picture above. Finally you resize the picture to be exactly of the same dimensions as the Summer bitmap and you load it in SBuilder as the Alpha Map.

Defining the tiles

In order to create the photo scenery you press the Photo button in the toolbar and you click the LOD13 squares that you want to define as photo tiles. The display window is like this:

Note 1: your bitmap should cover at least one LOD13 square (one Area).

Note 2: the Check button will test if all photo tiles have a bitmap underneath. Photo tiles can only be placed on top of bitmaps. If there is no bitmap on a LOD13 location there is no way to generate the photo tile. If you try to place a photo tile in a region with no bitmap, SBuilder will issue an error message. If, by accident, a bitmap is deleted, and the photo tiles left, there could be an error when you compile the project. The Check command verifies if all the photo tiles cover a bitmap. Every photo tile that does not cover a bitmap is deleted. Before each compilation this command is automatically run.

Note 3: if the transparency map for a photo tile is 100% black, SBuilder detects this condition and skips the generation of tile.

Note 4: for VTP Photo scenery it is suggested that a resolution of about 4.8 meter per pixel should be used.

Note 5: at some viewing distances we can notice small gaps between the photo squares. This could be unpleasant in certain cases as, for example, snow regions, where the white textures will show darker gaps between them.

2 - Higher Resolution Scenery

The method described so far generates VTP scenery where the resolution is about 4.8 meter per pixel. If you have photographs of higher resolution you can try to make High Resolution photo scenery. In this method SBuilder builds textured triangles that can follow a mesh. Here are some tips.

The photo triangles correspond to a "LOD8 mesh". Therefore if you have a LOD9 or LOD10 mesh, it could be useful to generate a set of tilted LWM3 polygons (see the Mesh window). These tilted polygons force a LOD8 mesh! See the LWM section for more information on tilted polygons.

It is useful to generate the VTP photo scenery and the high resolution scenery from the same high resolution bitmap. This will improve the "gap problem of VTP photos".

Unfortunately you can not make AFCAD scenery to show over the high resolution scenery. The only way to solve this is to make a transparent zone at the runway and taxiways locations.

You can control the operation of high resolution scenery using a set of parameters found in the INI file. Here is the list:

[Photo]
HWinterEnd=-1
HWinterStart=-1
WinterEnd=76
WinterStart=356
FallEnd=355
FallStart=263
SpringEnd=169
SpringStart=77
MeshBias=0
FlattenBias=0
Zbias=0
PhotoRange=5000
PhotoCall=LayerCall( :lcall 4 )

The Season parameters define the start and end of the seasons. See a tutorial on http://www.scenerydesign.org/ about this.

If you set a non zero value to MeshBias, say 5, then the photo triangles will be 5 meters higher than the mesh.

If you set a non zero value to FlattenBias, say 5, then the photo triangles will be 5 meters higher than the 1st found LWM2 flatten. The reason is that when SBuilder generates the altitudes of the triangles vertices it first reads the mesh. Then it reads any LWM2 (constant altitude) flatten that could exist on the area. If a flatten is found under a vertex, the altitude of the flatten is taken for the vertex and the previous mesh altitude is abandoned. If more than one LWM flatten exist under a given vertex, only the first flatten is taken.

Zbias=0 <<< the normal Zbias parameter (see SCASM or the SDK)

PhotoRange=5000 <<< this is the V1 visibility parameter. The triangles will be displayed when we are in the range of 5000 meters.

PhotoCall=LayerCall( :lcall 4 )
PhotoCall=LayerCall( :lcall 0 )
PhotoCall=PerspectiveCall( :lcall )

These 3 options for the "PhotoCall" parameter can influence the drawing order of ground polygons. You need to refer to SCASM docs if you want to test these options. Unfortunately it is impossible to force FS to draw the VTP polygons in the first place, followed by the high resolution textured polygons and the runway polygons at the end. Normally the second option should produce acceptable results.


LWM Scenery

Brief Introduction of Masks

LWM (or Land Water Masks) are polygons that allow us to change the type of textures that FS uses. We may assume that there are 2 layers of textures that cover the whole Earth - a land layer and a water layer. In a particular region, Flight Simulator can use either the textures from the land layer or the textures from the water layer. What tells FS which texture to use is a kind of a flag or switch as explained next.

A very large default FS land class file, called worldlc.BGL and found at ..\Microsoft Games\Flight Simulator 9\Scenery\BASE\Scenery, defines the land classes for every LOD13 square that exists in the Earth. If you open this file with the Microsoft tool TMFViewer you will see that the land class index used in ocean areas is 100. In fact, this value of 100 is the flag referred to above. A value of 100 instructs FS to use a water texture whose index is found in another global file - worldwc.BGL. Therefore every LOD13 square is either a land or a water texture. If the index of the LOD13 in the file worldlc.BGL is different from 100, the LOD13 is land. Otherwise it is water.

We can now define a mask as being a polygon that modifies this predefined texture. If we draw a polygon in a continental region and we define it as a LWM mask of type land, the polygon will do nothing. If, on the contrary, the mask is of the type water, FS will switch the texture, from the land layer to the water layer. We will have a lake on a continent!

If we define a polygon as being a mask of type land in the middle of the ocean, we would expect it to become an island. But it will not. In fact, the mask of type land will instruct FS to take the texture from the land layer. But, as we have seen, on ocean areas the land layer has an index of 100, which means water. The solution will be to create a land class BGL with at least 4 indexes of type land at the vertexes of a LOD13 square. That will change the type of the LOD13 square to be land. If we do nothing else, a squared of island will appear in the ocean. In order to complete the island, we need to draw LWM polygons around the island that change the mask back to water.

In order to make an island on a lake in a continental region, we need to make the bigger lake (LWM = water) first and the smaller island (LWM = land) afterwards. In this case the land mask will make FS to use a land texture from the land layer since there is no index of 100 pointing to the water layer as in the previous case.

In conclusion: there are 2 layers of textures for the whole Earth and the mask (land or water) can switch from one to the other. While the water layer has water definitions for the whole Earth, the land layer has only land definitions for continental regions. This complicates the making of islands in the middle of the ocean.

Making LWM polygons

You generate masks by creating polygons and defining their type as being LWM. You can choose between 3 types of masks: land, water or flatten. In the 2nd and 3rd cases you need to assign an altitude to the mask. The flatten mask is a special mask that will not make any change in the texture. It will only set the altitude of the polygon. Here is the LWM Polygon Properties window for a lake with an altitude of 160 meters:

Before drawing the polygon we had set the meshes preferences so that the greenish colour associated to the altitude of 160 meters was shown in blue. By doing so, the manual insertion of the polygon points was very precise and very well matched to mesh:

Area Fills

You can also define LOD squares as being masks (the squares can have a size of 1X1, e.g. LOD13, up to 32x32 areas, e.g. LOD8, with one area being approximately 1.2km by 1.2 km at the Equator). The LWM squares are called Area Fills. Area Fills will allow you to define the type of large areas with just few clicks.

The Area Fills are treated as entities different from LWM polygons and, for example, you can generate separated BGLs for Area Fills. However, you can set SBuilder to generate both LWM polygons and Area Fills in the same BGL file.

LWM tilted polygons

Flatten and Water LWM polygons referred so far are constant altitude polygons. We refer to these type of LWM polygons as LWM type 2 or LWM2 polygons. SBuilder 2.05 allows you to work with tilted polygons. We refer to these polygons as LWM type 3 or LWM3 polygons. The following is an explanation about the use of tilted polygons adapted from a post on the PTSim forum.

Before Sbuilder 2.05, LINES were sets of XYZ points defined by:

  • longitude
  • latitude
  • width

and POLYS were sets of XY points defined by:

  • longitude
  • latitude

Now POLYS are sets of XYZ points defined by:

  • longitude
  • latitude
  • altitude

Important Notes:

a) point altitudes in polygons are ignored in all cases except in polygons of type LWM.

b) LWM BGLs are now generated with "Poly3()" style commands. Therefore they will not work anymore in FS2002.

c) when you generate a LWM mask you need to press "Change" in the altitude box in order to set the altitude. "OK" is not sufficient. The idea is to make the working with "altitudes in polygons" very similar to the working with "widths in lines".

Here is a illustrated example to create a tilted plane. You can use this for tilted runways or for LWM rivers that approach the sea (altitude is 0 when the river reaches the sea but not 0 when the river is far from reaching the ocean).

In the example I have a polygon with 9 points. I want Point 9 to have an altitude of 20 meters and point 5 to have an altitude of 60 meters. The line that contains points 9 and 5 makes an angle of alpha with the horizontal plane. I want all the remaining points of the polygon to belong to the tilted plane that passes through 9 and 5 and that makes an angle of alpha with the horizontal plane. Here is what I have to do:

I start by drawing a polygon in the normal way (yellow). Then I enter the properties page and define the type of the polygon to be LWM WATER. I enter an altitude of 50 meters which will be applied to all points as soon as I press "Change". I used the value of 50 as it is a value between the extreme values of 20 and 60 that I want to define for the 2 important points - point 9 and point 5!. Then:

I enter the properties of point 9 and I declare its altitude to be 20 meters as in this picture:

And then I do the same for point 5:

I skip the picture where I declare the altitude of Point 5 to be 60 meters and I show the what I get if I reenter the properties of the polygon. I go for the "Points" window which looks very similar to the one you get when you are setting widths in VTP lines. The main difference is that you set altitudes instead of widths:

The window shows the highest and the lowest point which is in accordance to the previous settings. Now if I press "Change" in the Progressive window, points 1 2 3 4 6 7 and 8 will get the altitude that places them in the target tilted plane.

That is all. Do not press "Change" on the left as it would make all points at 40 meters! Just press OK and compile to see the result.


VTP Scenery

VTP polygons (used for airport backgrounds) and VTP lines (used for roads, streams, coastlines, etc) have an extremely low impact on frame rates.

VTP Polygons

With Scenery Builder you can create a polygon and define it as a VTP polygon. Here is the VTP polygon Properties window:

You need to set the VTP layer for the polygon and the texture used by the polygon. The VTP layer number controls the order used by FS in drawing VTP items in the screen. If one VTP polygon has a VTP layer number of 5 and another has a layer number of 4, this last one is drawn first. The Layer 5 polygon will cover the layer 4 polygon even if this one was created after the layer 5 one. If 2 polygons have the same layer number, the order of creation (you can control this in SBuilder) controls the order they are copied in the the screen. Here is the layer number for default items in FS2004:

  • rivers and electricity pylons are in Layer 4
  • railroads in Layer 5
  • roads are in Layer 6
  • bridges and airport polygons in Layer 7
  • coastlines in Layer 8

VTP textures for polygons

There are 3 options to declare a VTP texture for a polygon. The first option is to declare one of the Land Classes textures. We will not refer to these textures anymore as you already have seen them in Land class scenery making. The second option is to use "named textures". The third option is to choose from a set of pre-assembled texture names. When you use "named textures" you set a texture for each season. Here is the window to define a "named texture":

You can add a named texture set to the "assembled set of textures". In this way, the next time you need to choose this set you will just pick it up from a list of pre-assembled textures. The assembled texture names are placed at the end of the file polys.txt found in the Tools folder of SBuilder. The first entries, in this list, are the standard textures used by FS2004 which correspond the standard file TERRAIN.CFG.

You should read the VTP and LWM Terrain SDK for explanations on the Texture types and Effects. The important thing is that for polygon textures, the type is 0. For lines type, should be 1 2 or 3.

VTP Lines

VTP lines can also be created. As with VTP polygons, you need to set the VTP layer for the line and the texture used by the line. Here is the VTP Line Properties window:

In this case a VTP layer equal to 5 was assigned to the line and the texture was taken from the assembled set of textures found in lines.txt (see Tools folder of SBuilder). Note that you can choose between 2 types of textures - Named and Assembled. Please refer to the VTP polygon case for an explanation.

It is important to look to the Widths of the Points of a Line. These properties are set through this window:

As you can see, you can set the width of the lines up to the maximum width of 255 meters. You can either define a constant width for the whole line or you can define a progressive width. You also use this window to reverse the orientation of a Line (e.g. the Start point becomes the End point and vice versa)

VTP Exclude Polygons

You can exclude default roads, polygons and other VTP scenery by using a polygon of type equal to "Exclude". The exclusion is on an Area and on a Layer basis. You should press F3 to display the LOD13 grid. Every LOD13 square entered by the exclusion polygon will be candidate for exclusion. The other thing that you need, is to set the layers to be exclude. In FS2004, default rivers are in Layer 4, roads are in Layer 6, railroads in Layer 5, coastlines in Layer 8, bridges and airport polygons in Layer 7 and electricity pylons in Layer 4.

In the shown example default rivers and railroads will be excluded in 4 LOD13 squares

Note: VTP exclusion has nothing to do with Object exclusion or Exclude Rectangles.


Exclude Rectangles

In addition to the exclusion of VTP scenery you can create exclusion rectangles to exclude scenery objects. You press the Exclude button in the toolbar to create an exclusion rectangle for objects. The cursor changes to:

and you draw a rectangle with the mouse. Clicking with the right mouse button, will destroy the rectangle just created. Clicking with the left mouse button will invoke the Exclusion Rectangle Properties window:

You can select the type of objects that you want to exclude by setting/resetting the check boxes.


Scenery Objects

In version 2.05 SBuilder can create scenery objects of the following types: FS9 library objects, FS8 library objects, Rwy12 objects, API macros, ASD macros, taxiway signs, effects and windsocks. Here is the General sheet of the Objects Properties window:

Using this window you can define the type of object, readjust the location of the object, its orientation, the complexity density of the object, the BIAS and so on. You can give names to the objects that you place with SBuilder. If you do so, you can see, later, the names to appear near the cursor as pass the mouse over the objects. You must set "Show Labels" equal to ON to enable this feature. Names will also be useful if you need to set a specific order to your objects.

You can also position your objects using FS2004 as a reference. In order to do so, you place your aircraft in slew mode in the location where you want to place an object. Then you switch to SBuilder and press "Position from FS". When you do so, the parameters in the frames "Geographic Position" and "Angular Orientation" are filled with the values taken from the position of your aircraft in FS2004.

Library Objects

The picture below shows the properties of a library object. You can use the scale parameter to adjust the dimensions of the actual object. The parameters Width and Length are only used to set up a footprint of the object in the SBuilder display (see working with objects). If you are the author of the object you may know the exact footprint dimension of the object and use it in positioning the object over the background bitmap map. The file named objects.txt placed in "Tools" folder of SBuilder defines the objects that you can have access through the SBuilder interface. Here is an extract of the TXT file which you can edit with NotePad.exe:

;lines started by ; are comments and are ignored
;no empty line may exist except the last one
;lines enclosed in [] are category designators
[General Objects]
6dc7e21e4f0c4d7395488dac102499a1 1 50 50 1 ag_barn
c12b53de46a14ac9c379b5a2f8708fd8 1 52 53 1 ag_barn_2
f214ae094ab15de83a5a22bc757b0c21 1 50 50 1 ag_barn_3
682406ce48e82e8bfaaf3e83a23cdfd1 1 50 50 1 ag_barn_4

You will notice that the file consists of several lines with one line per object. Each line defines 6 parameters separated by "spaces". The first parameter is the 128 bit Identifier of the object. The second parameter is the Type of library object. You can have the values of 0 or 1 for the Type parameter. Type=1 library objects refer to FS9 only compatible library objects. Type=0 library objects refer to FS8 library objects. The 3rd and 4th parameters are Width and Length that can be used in defining a footprint for precise object positioning. The 5th parameter is the Scale of the object. The "Update" command can update the file objects.txt with new values for Length, Width and Scale for a particular object. The 6th parameter is the Name of the object. The name cannot contain any space.

In order for a picture to appear on the left bottom corner of the window you need to add a bitmap with a filename equal to the identifier as, for example c12b53de46a14ac9c379b5a2f8708fd8.bmp (jpeg also works). The bitmap should be 256 colours and its optimum size should be 210 x 160 pixels. In the SBuilder Design Forum you can search for pictures for general objects. Here is a direct link to download a set of pictures

http://www.ptsim.com/downloads/sbuilder/bmps.zip

In order for the pictures to appear in the bottom left corner of the Objects Properties window they should be unzipped to the folder ..SBuilder/Tools/Bmps/.

Note: You can use Library Creator by Arno Gerretsen (http://www.scenerydesign.org/) to create library objects that can be used with SBuilder. Specifically Library Creator generates the entries to the SBuilder file objects.txt.

Macro Objects

You can add macro objects to your SBuilder projects. There are a number of available macro objects but you must remember that the objects use code for FS2002 and earlier versions of Flight simulator. SBuilder supports macros generated by FSDS (Flight Simulator Design Studio) both in the API format (macros used in the Airport for Windows scenery design program) and in the ASD format (macros used in the Airport and Scenery Design programme).

Before you start using macros, y ou need to set the folders where SBuilder looks for the macro objects that you are going to use. You set these folders through the "Preferences" menu. The folders must contains the macros and their pictures if you want them to be visible on the bottom left corner of the Macro Properties window as shown in the next figure.

ASD Macros

The shown macro with name HangarF2 appears under the ASD category "ASD - Hangares". You also note that there is an "Expand" command button to show the parameters that can be shown on the main window. The name of the parameters is taken from the Header of the macro file as explained in the ASD programme documentation. The "Edit" button opens a NotePad window with the macro contents. You can edit and save the macro before you place it. Here is the beginning of the HangarF2k.scm file

;ASDesign Compatible Macro
;Name=HangarF2k, Type=Hangares, Bitmap=hangarF.bmp, \
;FixedLength=30, FixedWidth=50, \
;Latitude, Longitude, Rotation, Elevation, Length=30, \
;Width=50, Height=8, Telhado=0, Color1=2, \
;Visibility= 2000, Density=2, Insignia0_1=0, \
;Base=0, Topo=255, Esquerda=0, Direita=255, \
;Texture2=htap.bmp, Texture1=hangar6.bmp,
;
; ------------------------------------------
; HangarA.scm SCASM macro for Flight Simulator
; ------------------------------------------

; This macro adds an hangar into your scenery.

; Author: Luis Vieira de Sa <luis@it.uc.pt>
; http://www.it.uc.pt/~luis/fltsim.html

; Parameters:
; 1 = latitude
; 2 = longitude
; 3 = rotation
; 4 = elevation
; 5 = length (front)
; if you enter a positive value you get a frontal door
; if you enter a negative value you get a side wall door
; 6 = width (side)
; 7 = height of base
; 8 = height of roof only
; enter 0 for a flat roof; enter a positive value for a triangular
; roof and a negative value for a round roof; example: enter 10 for
; a 10 meter triangular roof and -10 for a 10 meter round roof
; 9 = roof color
; 10 = visibility
; 11 = complexity
; 12 = if you want insignias enter 1 (0 is no insignia)
; 13 = bottom most pixel
; 14 = top most pixel
; 15 = left most pixel
; 16 = right most pixel
; 17 = name of the file with insignias
; 18 = texture

Area( 5 %1 %2 20 )
IfVarRange( : 346 %11 4 ) ;check complexity
PerspectiveCall( :pcall )
Jump( : )
:pcall
Perspective
UVar( $VIS [abs[%5] + %6] )
mif( %4 )
RefPoint( 2 :ret 1 %1 %2 v1= %10 v2= [$VIS] E= %4 )
SetScaleX( :ret 0 0 12 )
melse
RefPoint( 7 :ret 1 %1 %2 v1= %10 v2= [$VIS] )
SetScaleX( :ret 0 0 12 )
mifend

Note that Type= defines the category of the macro and that the default values for the macro parameters (for example: Width=50 and Height=8) are read and shown by SBuilder. Also note that Visibility parameters V1 and V2 from the main object window are read by SBuilder if the macro uses these parameters. In the shown case parameter %10 is taken from the V1 box.

Finally here is the original description of the ASD macro structure:

A macro file is recognized by Airport and Scenery Designer if the first line in the file consists of the following signature comment line:

;ASDesign Compatible Macro

Comment lines immediately after the signature contain keywords which are used to describe the macro and its arguments. The description lines are continued by ending them with a backslash (\). For example:

;ASDesign Compatible Macro
;Name=Freighter, Type=Ships, Bitmap=frighter.bmp, \
;FixedLength=160, FixedWidth=20, \
;Latitude, Longitude, Rotation, Color1=f001, Color2=f007, \
;Range=25, Density=3, Visibility=25000, Crane=0
;

The case of the keywords does not matter: 'Name', 'NAME', and 'name' are all the same keyword. The keywords that are used to describe the macro itself are:

Name Type Bitmap FixedLength FixedWidth Autoscale

'Name' is the name used by ASD to identify the macro. It can be up to 32 characters. 'Type' defines which tab of the Macro Palette that the macro appears on. It should be one of the (up to 20) types defined in your MacroTabs.txt file. 'Bitmap' names a bitmap file that can be displayed in the Macro Palette or the Macro Properties Preview page. The best appearance is achieved with a 225 x 255 pixel bitmap of 256 colors.

The two keywords, 'FixedLength' and 'FixedWidth', can be used to control the appearance of the macro icon on ASD Airport and Group views. The values of these parameters are not passed to the macro and they cannot be changed from their initial values. They are used only to display the macro icon at a representative size. If the 'Autoscale' keyword is given, the image of macros with FixedLength and FixedWidth attributes will be scaled according to the value of the Scale variables (described below). This allows you to see the actual size the macro will assume in your scenery.

The following keywords define macro arguments that are recognized and handled by ASD:

Latitude Longitude Elevation Rotation Length Width Height Color1 Color2 Texture1 Texture2 Priority Visibility Range Density Scale

API Macros

This is an extract of SCASM documentation:

Macro files for Airport have a standard file extension of ".API" and they are using a standard parameter set. Not all macros are using all parameters. That is why sometimes dummy values are passed to a macro.

%1 Latitude
%2 Longitude
%3 range (for the Area() command)
%4 scale factor (used in reference points)
%5 heading
%6 user parameter 1 (usually color 1)
%7 user parameter 2 (usually color 2)
%8 user parameter 3 (usually color 3)
%9 user parameter 4 (usually color 4)
%10 v1 value
%11 altitude for reference point
%12 scenery complexity code
%13 "v2="
%14 v2 value

The first thing that you should do is to place the images of the macros in the same file as the APIs. In the Airport for Windows programme the images are in the Resources folder and the macros themselves are in the API folder. So we copy the images from the Resource folder:

into the API folder. Then the API folder will kook like this:

as you see we will end up with a folder where each API file has a "sister" bitmap. If we do not make this copy we will be able to place the APIs but we will not see their picture in SBuilder. After this, we go to the Preferences menu and in the sheet called Objects we point to the folder where SBuilder will look to find the macros:

We can then press the button Object in the toolbar and I click the display where we want a macro to be placed. As soon as we do that the Object window will appear so that we can define which type of object we want. We choose Macro and we press a button labelled ">>>" to enter this window where we coose Antena3.API:

We can open the API using the EDIT command. If we do that and we add the line ;CATEGORY API - Antenas and then save the API (note that the API file is a plain TXT file!) we will create a category:

If we add this extra line to all antena macros, then if we close SBuilder and start again, all the antenas get organized in a group:

Rwy12 Objects

Rwy12 is a very popular and very easy programme to place XML objects in FS2004. A large number of objects is available and ready for use with Rwy12. You can place these objects in SBuilder. If you have Rwy12 working then you only need to tell SBuilder where to look for Rwy12. You do that using the menu "Preferences - Objects" as explained in the API macro section or you simply add a line to SBuilder.INI indicating the path like in this example:

[Main]
 Rwy12Path=C:\FS\RWY12
JoinCellLines=True
NameJoin=False
....

For this INI setting you need to have Rwy12 situated in C:\FS\RWY12 as in this picture:

Then you can place the objects through the following window:

Other Objects

You can create other objects with SBuilder like taxiway signs, effects and windsocks. Depending on SCASM, General Buildings and Beacons could be added to SBuilder in the future. Here is the window for setting the properties of taxiway signs:

Effects and Windsocks are very easy to set. For effects you need to specify the effect name and the effect parameters. For windsocks you can specify the pole height and the sock length, as well as the colours of the pole and of the sock. You can also specify if the Windsock will have a light or not.


SBuilder Reference

Scenery Builder, also referred to as SBuilder, is a scenery creation tool for FS2004.

Reference


File Menu

The file menu contains the commands to open and save SBuilder projects and many other as entering data from GIS (Geographic Information Systems) files or the generating BGL files for Flight Simulator.

Do you want to read any of these topics?

BGL Compilation

Project properties

Appending data files

DEM Tools

Coordinates Conversion


File New

Deletes all the data in the present project and opens a dialogue to setup the properties of a new project. You can use this command through the Toolbar.

File Open

Opens a existing project file. Project files are created by SBuilder and have a default extension of SBP (meaning Scenery Builder Project). You can use this command through the Toolbar.

Note: SBP is a binary file format that can only be read by SBuilder.

File Save

Saves the current working project in a file whose is the current working file name. The project is saved as a binary SBP file.

Important: you can use this command through a button in the Toolbar.

Note: you may want to read the topic File Export command of SBuilder.

File Save As

Saves the current working project in a file whose name and location you can setup through the "Save As" dialogue window. I


BGL Compilation

Opens a window where you can select which BGL files will be generated. If no items are selected on your project all the "Check Boxes" in the BGL Compilation window are disable. In that case you can not generate any BGL file.

Depending on which items are selected the "Check Boxes" can be enabled and several types of BGL files can be generated. The BGL files are generated in the folder ../SBuilder/Tools/Work/. Normally a file with the same name but with extension SCM is also created in that folder.


BGL - High Res Photo

High Resolution Photo Scenery

In order to enable this frame you need to create some photo tiles and, most important, you need to select those photo tiles before you press the BGL Compile button. You can set the following 2 options.

Make BGL

If checked BGL high resolution photo files are generated. The number of BGLs depends on the number of maps that have been used in the project. The BGL filename can be, for example, LISBON3_PHOTO.BGL is the project name is LISBON and if the 3rd map on that project was the one used for making the photo scenery.

Make Bitmaps

You normally check this box so that SBuilder makes the photo tiles from the map bitmaps. During development stages you may just test the BGL or you may have the bitmaps generated elsewhere. In that case you do not check this box. The names of the bitmaps are similar to 012110332100003_1024_Wi.bmp. The first set of digits refer to the location of the bitmap, "1024" means a 1024 x 1024 bitmap and Wi means Winter (you can have bitmaps terminated in Su for summer, Fa for Fall etc). Please also refer to this topic


BGL VTP2 Sceney

VTP2 Scenery

You can select which type of VTP scenery you want to compile through the following options:

VTP Lines

If you check this box a BGL with the name of PROJECT_VTPL.BGL is generated where PROJECT is the name of your project.

VTP Polygons

If you check this box a BGL with the name of PROJECT_VTPP.BGL is generated where PROJECT is the name of your project.

VTP Excludes

If you check this box a BGL with the name of 0EX_PROJECT.BGL is generated where PROJECT is the name of your project.

VTP Photo

If checked BGL VTP photo files are generated. The number of BGLs depends on the number of maps that have been used in the project. The BGL filename can be, for example, LISBON3_VTPH.BGL is the project name is LISBON and if the 3rd map on that project was the one used for making the photo scenery.

Make Bitmaps

You normally check this box so that SBuilder makes the photo tiles from the map bitmaps. During development stages you may just test the BGL or you may have the bitmaps generated elsewhere. In that case you do not check this box. The names of the bitmaps are similar to 012110332100003Wi.bmp. The first set of digits refer to the location of the bitmap and Wi means Winter (you can have bitmaps terminated in Su for summer, Fa for Fall etc). Please also refer to this topic


BGL Class Scenery

Class Scenery

You can select which type of Class scenery you want to compile through the following options:

Land Class

If you check this box a BGL with a name, say LD_4517.BGL, is generated where 45 and 17 are the LOD5 X and Y parameters that you can see in the Status Bar of SBuilder. Files with extensions INF and RAW are also created. You can ignore these files. For more information on these files you need to read the Microsoft SDK Terrain documentation.

Water Class

If you check this box a BGL with a name, say WC_4517.BGL, is generated where 45 and 17 are the LOD5 X and Y parameters that you can see in the Status Bar of SBuilder. Files with extensions INF and RAW are also created. You can ignore these files. For more information on these files you need to read the Microsoft SDK Terrain documentation.


BGL Other Scenery

Other Scenery

You can select generation of mesh, object and exclude rectangles through the following options:

Meshes

If you check this box BGL files with names like DEM08_365149.BGL DEM09_365149.BGL or DEM10_365149.BGL are generated. The numbers 365 and 149 are respectively the X and the Y coordinates of a Cell or of a LOD8 square. You can see these numbers on the status bar. If you press F8 you will see the borders of the Cells in Red colour. The total number of BGLs depends on the Cells for which you have created meshes.

Objects

If you check this box a BGL with the name of PROJECT_OB1.BGL (and/or PROJECT_OB0.BGL is FS8 code is used) is generated where PROJECT is the name of your project.

Object Excludes

If you check this box a BGL with the name of 000_PROJECT.BGL is generated where PROJECT is the name of your project.


BGL LWM Scenery

LWM Scenery

You can select which type of LWM Scenery you want to compile through the following options:

LWM Polygons

If you check this box a BGL with the name of PROJECT_LWM2.BGL (and/or PROJECT_LWM3.BGL if there exist tilted polygons) is generated where PROJECT is the name of your project.

LWM Area Fills

If you check this box a BGL with the name of FILLS_PROJECT_LWM2.BGL is generated where PROJECT is the name of your project.

Note: you can generate LWM polygons and Area Fills in a single BGL. Please read this.


Copy Files to BGL Folders

If you check this box all the files generated in the folder ../SBuilder/Tools/Work/ are copied to the Main BGL folder that you can set in the Project properties window. In the case of VTP Photo Scenery and Land Class Scenery the BGLs files are copied to a Secondary BGL folder that you can set in the Project properties window. This secondary folder can not have a "sister" Texture folder. In order to see the changes in FS2004 you need to make both these folders active in the FS2004 Scenery Library facility.

Copy Bitmaps to FS Texture Folders

This box applies to Photo scenery only and if the boxes "Make Bitmaps" (see above) are checked.

In the case of VTP photo scenery the bitmaps that were created in ../SBuilder/Tools/Work/ are copied to .../Microsoft Games/Flight Simulator/Scenery/World/Texture. If these bitmaps are not copied here and the BGL that refers to them is active, FS2004 will crash.

In the case of high resolution photo scenery, the bitmaps are copied to the local texture folder (the sister folder of the main BGL folder).

Start FS9

This will start FS9 immediately after compilation of the BGL. You need the close FS before compilation or an error will occur.

BGL Compilation - Compile

This command start the generation of BGLs. The files are created in the folder ../SBuilder/Tools/Work/ with extension BGL. In same cases files with extensions SCM are generated for SCASM experts. Also files with extensions INF and RAW are generated in the case of Land and Water class scenery, for use of experts. The BGL files are only copied into the target folders if "Copy Files to BGL Folders" is checked. Note that you can not copy BGL files to active scenery folders while FS2004 is running. You have to switch off FS2004, compile and start FS2004 again to see the changes.

BGL Compilation - Cancel

This just cancels any BGL compilation that is ready to start and closes the BGL compilation window.


Project Properties

You can access the Project Properties through the File Menu or by pressing the mouse left button anywhere in the main SBuilder display.

The Project Properties are features that are specific to a particular project. The properties are saved with the project. They should not be confused with SBuilder Preferences which are properties that affect all the projects and are saved in the SBuilder.ini file.


Project Properties - General

General or basic properties of a project.

Project Name

Every project has a name. The default name is PROJECT

Existing elements

The type and the number of all the items contained in the project are shown here. If you get lost in the display you can always check the numbers of lines or polygons or other items. If you do not see them in the display you need to change the display settings or look for the items in other location. When you create a NEW project the number of all the items is zero. If you append a non void project some of the items will increase their numbers.


Project Properties - Folders

The paths to the folders used to copy the BGL files generated by SBuilder. If you specify a non existing folder, SBuilder uses the following path C:\SBuilder\Scenery (assuming that C:\SBuilder is the folder where SBuilder is installed).

Main BGL Folder

The complete path to the folder where most of the BGL files are copied to. This folder has the name of Scenery and it normally has a sister Texture folder. This folder must be activated in the Scenery Library of FS2004.

Secondary BGL Folder

The complete path to the folder where VTP Photo scenery and Land/Water class scenery BGL files are copied to. This folder has the name of Scenery and can not have a sister Texture folder. This folder must be activated in the Scenery Library of FS2004.


Project Properties - Class Scenery

Properties concerning the generation of Class scenery.

Class scenery, being it Land or Water, needs to be generated for at least one complete LOD5 square. Whenever you set (change the default) the land class of a particular tile, then all the tiles in the LOD5 are set (1 to the desired texture and the remaining 65367 to transparent). If you are working on tiles in different LOD5 squares, the data involved in the generation of the BGL file can become very large. The maximum size of scenery that SBuilder can deal within a single project is a square of 5 by 5 LOD5 squares. This is called the Class Coverage Area.

If you roll the mouse until you see the minimum Zoom of 0.03125 and you press F5 you will see a grid of LOD5 squares. If the box "Restrict Grid Display to Class Coverage Area" is checked only 25 LOD5 are displayed. If you need to cover a larger area you need to make that in 2 different projects.

Centre Latitude for the Coverage Area

The latitude of the centre of the Class Coverage Area is adjusted through this box.

Centre Longitude for the Coverage Area

The longitude of the centre of the Class Coverage Area is adjusted through this box.


Restrict Grid Display to Class Coverage Area

This check box affects the display of SBuilder grids. If is checked, only 5 x 5 LOD5 squares are shown as in this picture:


Project Properties - Class

Project Properties - Class Map

Properties that refer to the generation of large areas of Land/Water class sceneries.

SBuilder can generate Land (and Water) class scenery from a calibrated bitmap. That bitmap is called the Class map and it is a bitmap with a limited number of colours. Each colour in the Class bitmap represents a land (or water) class index or a Class definition. The Class definition is a set of 3 class indexes that refer to a colour. When making Land (or Water) Class scenery in this way, SBuilder uses 1 of these 3 numbers every time it finds a tile with this colour. SBuilder chooses the index to use in a randomly way. 60% of the times it uses the first index, 25% the second and 15% the third index. When you have created several Class definitions they appear on the left bottom box of the window. You click on a particular line of this box to select a particular Class definition which then appears in the upper box. By double clicking that upper box you can change the colour that corresponds to the definition.

Class Map - Delete

The selected Class definition is deleted.

Class Map - Edit

The selected Class definition can be changed by pressing this button. The following window is shown:

Class Map - Add

You add another Class definition to the existing list by pressing this button. The above window is shown.


Project Properties - Photo

The properties of the project that concern to Photo scenery


Project Properties - Photo General

General Settings

You can select which seasons you want SBuilder to generate bitmaps for. You can select Summer alone or all the Seasons (5 plus the Nigh). You can not select, for example, Summer and Winter only. The alpha map should be set if you have an alpha map. The alpha map can be used to create photo tiles with different grades of transparency. White in the alpha bitmap will make opaque bitmaps. Black will make full transparent bitmaps. By using grades of B&W you can make your photo scenery to blend nicely to the default textures that it will cover. The alpha bitmap should be an 8 bit grey bitmap.


Project Properties - VTP Photo Scenery

VTP Photo Scenery

You select here the parameters that refer to VTP photo scenery.

VTP Layer

The first parameter is VTP Layer. This is is equivalent to the number that you find in Line or Poly VTP scenery. You can control what will be covered by your VTP photo scenery and what is visible over the photo tiles. If you set it to 5, then VTP Lines and polygons with a layer number greater than 5 will be visible on top of the photo tiles. Default roads, which have a layer number of 4, will be covered by the photo tiles.

Very Important: as with all VTP scenery, you should remember that VTP layers 1 2 and 3 will be applied on top of water only. VTP layer numbers 4 5 6 and 7 will be applied on top of land only. VTP layer numbers greater than 7 will be applied on top of water or land. This is why when you place a river or lake bank you should use a layer equal or greater than 8. In the same way if you are applying scenery on coastal area and if you want the water that appears on your photo to show on the sim, you will set a layer greater than 7.

Force 8-bit bitmaps

When a photo tile is completely opaque it will be generate as DXT1 bitmap of size equal to 43 KB. When the photo tile has at least one non opaque pixel it will be created as an 8-bit bitmap with alpha (87KB in size). If you set this parameter you will always generate 8-bit bitmap with or without alpha. This is useful when you want to match the textures of your photos with the default textures. If you edited your textures to become similar to the default textures near the borders of your photo scenery, you will not like the textures to be compressed to DXT1. In such cases you should try "Force 8-bit bitmaps".


Project Properties - High Resolution Photo Scenery

High Resolution Photo Scenery

There are 2 settings for the high resolution Photo Scenery: 2.4 meter/pixel and 1.2 meter/pixel.

1.2 meter/pixel

If you set this option bitmaps with the size of 1024 x 1024 pixels will be generated. The names of the bitmaps follow the same rules as VTP photo bitmaps as in the following example: 012110321322223_1024_Su.bmp

2.4 meter/pixel

If you set this option bitmaps with the size of 512 x 512 pixels will be generated. The names of the bitmaps follow the same rules as VTP photo bitmaps as in the following example: 012110321322223_512_Su.bmp


Project Properties - PMesh

Project Properties - Mesh

The properties of the project that concern to Mesh scenery

Resolution

You can set the level of detail (LOD) of the generated meshes. LOD10 corresponds to altitudes in every vertex of a 30 meters grid. LOD09 corresponds to a 60 meters grid and LOD08 to a 120 meters grid.

Check Meshes

Meshes are generated as tiles with a size equal to a Cell (LOD8 square). Every Cell for which you want to generate a mesh tile must be have a mesh bitmap underneath. The Check command verifies if all mesh tiles have that bitmap. If some tile has not a mesh bitmap it will be deleted. The command is automatically issued before the generation of mesh BGLs


Import SBuilder SBX

You can Import/Export SBuilder projects as SBX files instead of Open/Save SBP files. The "SBX format" is very easy to read as the files are standard TXT files. In the following you can see an export SBX file which refers to a project containing just one line with 2 points. See also the Export SBuilder SBX topic for further information.

[Main]
CopyRight=PTSIM
Name=PROJECT
NoOfMaps= 0
NoOfPhotos= 0
NoOfLands= 0
NoOfLines= 1
NoOfPolys= 0
NoOfWaters= 0
NoOfObjects= 0
NoOfFills= 0
NoOfExcludes= 0
NoOfMeshes= 0
NoOfLCIs= 0
PhotoSeasons= 1281
BGL1Folder=
BGL2Folder=
LatDispCenter= 40
LonDispCenter=-10
LatLandCenter= 40
LonLandCenter=-10
ClassGridVIEW=False
Zoom= 1

[Line.1]
Name=Some Line
Type=
Color=16711680
NoOfPoints=2
Lat1= 39.9883270263672
Lon1=-10.1900266348302
Wid1= 35
Lat2= 40.0473785400391
Lon2=-10.1326601035607
Wid2= 35


File Append

You can append 5 types of files:

  • SBuilder SBX files
  • Surfer BLN files
  • Polish Map files
  • LWM BGL files
  • VTP BGL files


Append - SBuilder SBX

The "SBX format" is very easy to read as the files are standard TXT files. Combining the facility to create a SBX file (using Export SBX) and the Append SBuilder SBX command you merge projects very easily.

If you want to merge 2 projects - Project1 with Project2 - each in its SBP files, you do the following:

  1. Open project1.sbp and export it as temp.sbx
  2. Open project2.sbp and append temp.sbx
  3. Save project as merged_project.sbp

Note: the difference between Import SBX and Append SBX is that, in the first case, the existing project is cleared before any data input.


Append - Surfer BLN

The BLN format is a very simple XYZ ASCII format used by many GIS programmes. There are also free converters that convert, for example, DXF files to BLN files. You can see an example of a BLN file here.

When you append a BLN file the following dialogue is shown:

As you can see you can specify a type for all the lines and a type for all the polygons that will be imported. In the shown example all the lines will be VTP lines with a layer number of 5 and the pre-assembled texture number 1024. The colour of the lines will be as shown. The widths of the lines as they exist in the BLN file (3rd parameter in every line of the BLN file) will be ignored. Instead all the appended lines will have a progressive width starting at 5 meters and ending with 50 meters.

In the same example all the polygons will be of the mask type equal to LAND with an altitude of 0 meters. If you check the box at the beginning of the window a closed line will be created with every imported polygon.


Append - Polish MP

Another way to enter data into SBuilder is to append a Polish Map file. Polish Map files can be created with MapEdit available at:

http://wwww.geopainting.com/

MapEdit is a very versatile programme. With MapEdit you can, for example, import ESRI shape files and save them as a Polish Map files. In this way it is very easy to use Shape files in Flight Simulator scenery creation. You can even make all graphical editing inside MadEdit and use SBuilder just as the final step in creating a BGL. In fact you can assign a type to each line, polygon or object in MapEdit. Later, when appending the file into SBuilder, you can instruct SBuilder to create BGL properties for each MapEdit object type.

You can append all items in a Polish Map file at once or you can set which items to append. Also you can build a translation table between "MapEdit types" and "BGL parameters". For example, in the following screen you are only appending Roads of type 0x03, Lakes of type 0x42 and Objects of type 0x2F01:

The roads will be translated to VTP lines with texture 1031, layer number 8, starting width 35 and ending width 35. The lakes will be translated to LWM water polygons at 0 altitude and the Gas Stations will be translated to a suitable Library Object.


Append - LWM BGL

In order to append a LWM BGL file to a project you only need to point to the filename and the folder where it is located. The specified BGL file must contain valid LWM data. You can either append files produced by you (with SBuilder or other) or default LWM BGL files. Default LWM files for Western Europe, for example, are located in the folder:

C:\Program Files\Microsoft Games\Flight Simulator 9\Scenery\Eurw\Scenery

Different regions of the world will be located in different folders like \Eure\ for Eastern Europe, \Afri\ for Africa, \Name\ for North America (East part) and so on.

Inside these folders you have several files. The following files are LWM files:

  • FL9XXYY0.BGL - these files refer to flatten polygons
  • HP9XXYY0.BGL - these files refer to hydro polygons (and/or hydro area fills)

All LWM files cover a complete LOD5 square. The XX and YY appearing in the filename refer to the X and Y coordinates of the LOD5 square to which the file refers to. In order to know which file applies for a given location you look to the LOD5 coordinates that appear in the status bar when you have the mouse in the desired position. In the south of Portugal, for example, the satusus bar shows LOD5 45 18. Therefore if you want to load the hydro LWM data for that region you look for the file HP945180.BGL. Note that there is a leading 9 and a trailing 0 in the sequence of digits that define the location.

You should be aware of the problems that you may cause if you distribute a replacement file for a complete LOD5 square. If several designers make modifications to the same area there will be incompatibility problems. Therefore it is best that you distribute files that can be used at the same time as the default files. Unfortunately there is a pair of situations where you may need to alter the complete LOD5. Consider the problem of remaking a simple lake that exists on some continental area. Let us assume that the lake is contained in a single Area (LOD13 square) and that there is nothing in that Area beyond that lake. You could make a small project where could place an AreaFill 1x1 of type equal to land. This AreaFill would simply switch the mask to land instructing FS to take the ground texture from the land layer. That would remove the water lake from the Area. Then you would place the new lake with its elevation. Apparently this is simple, but the problem is that you can not remove the altitude of the original lake. The AreaFill applied to the area only removes the "texture" part of the lake. The original altitude remains. If that remaining altitude bothers you, the only thing that you can do is to edit directly the original HYP9XXYY0.BGL file. See more on this in the next section.


Append - VTP BGL

The procedure to append a VTP BGL file is the same as described in appending LWM files. The default VTP files are located in folders like:

C:\Program Files\Microsoft Games\Flight Simulator 9\Scenery\Eurw\Scenery

VTP BGL files contain lines or polygons and their types are the following:

  • AB9XXYY0.BGL - these files refer to Airport base polygons
  • HL9XXYY0.BGL - these files refer to hydro lines, such coastlines and river banks.
  • RD9XXYY0.BGL - these files refer to roads.
  • RR9XXYY0.BGL - these files refer to railway roads.
  • ST9XXYY0.BGL - these files refer to river streams
  • UT9XXYY0.BGL - these files refer to electricity lines.

You can explore the default characteristics of VTP scenery by opening (appending) the files and examining the Properties of the Lines and Polygons.

With VTP scenery there is also a potential for conflict when several designers modify the same region. The problem here is related with the depressions of river streams. By using the "Coexist/Replace" flag you exclude the default items. However this exclusion will not remove the depressions of the original streams (something similar to the altitudes of lakes in LWM scenery).

If the only way to remove the left depressions is to alter the default scenery, you should provide a file for a complete LOD8 square (or Cell). This applies to both LWM and VTP scenery. There is a small programme that merges complete Cells with a default LOD5 VTP or LWM BGL. Search the AVSIM Scenery Design Forum for "BGLPatch". This programme is capable of installing and uninstalling the reworked Cell.

The following steps are suggested for working on a default BGL file. Append the LOD5 square of concern. Then, in Pointer mode, do a mouse window selection to select everything in the LOD8 square where you are going to make modifications. Then do an "Invert Selection" and press Delete and Save the working project. If you do this, you isolate a LOD8 square. You work on this LOD8 and, in the end, you generate a BGL file for this LOD8 (or Cell) square.

Note: you can instruct SBuilder to remove "hooks" when importing VTP lines.


File Export

You can export a SBuilder project in 2 different file formats:

  • SBuilder SBX
  • Surfer BLN

Note: Some export features are limited to registered versions of SBuilder


Export - SBuilder SBX

SBX files are standard TXT files and can be read with NotePad or a similar programme. An example of an SBX file is here.

Advantages of SBX files:

  • in many cases you can debug your project if everything goes wrong by examining the SBX file
  • the selected state of items is saved so that when you import the SBX file the same items are selected as when you exported the project
  • if you want to merge 2 projects - Project1 with Project2 - each in its SBP files, you open Project2 and export as temp.SBX. Then you open Project1 and you append temp.SBX. Note that you can not append SBP projects

Disadvantages of SBX files:

  • the files can be very large
  • you lost class scenery when you export a project with class scenery.


Export - Surfer BLN

The BLN file format is a very simple XYZ TXT format for data interchange. Many GIS programmes can export in this format.

Following is an example of a BLN file containing one Line and one Polygon. In this example the Line and the Polygon are coincident. What distinguishes the Line from the Poly is that the 7th point in the second set of data is equal to the 1st point in that set. This defines the second set of points as being a Polygon. Note the 3rd parameter in each line. This parameter is optional and SBuilder uses it to store width of lines (in the present case the 3rd point in the line has a width of 33 meters).

5,My_Line
-10.3459918917191,40.0494384765625,1
-10.3119305137778,40.0837707519531,1
-10.2581493907127,40.0851440429688,33
-10.2312588291801,40.0205993652344,1
-10.3119305137778,40.0205993652344,1
7,My_poly
-10.2097463799541,40.0563049316406
-10.1720995938085,40.0782775878906
-10.136245511765,40.0604248046875
-10.1434163281737,40.0288391113281
-10.1792704102171,40.0068664550781
-10.198990155341,40.0260925292969
-10.2097463799541,40.0563049316406

Note 1: you loose the BGL properties of lines and polygons when you export to a BLN file; also you are limited to lines and polygons.

Note 2: in version 2.05 of SBuilder we changed the header in order to make the format compatible with other GIS programmes. For example, in version 2.02, the line 5,My_Line was 5,0,My_Line. This caused problems with the header being interpreted as a point in some GIS tools.

Note 3: in this example the character "," is used as a separator. You change t his character through the SBuilder.ini file. If you want the numerical values in the BLN file to be separated, for example, by a tab you need to edit the SBuilder.ini file so that the following line is:

BLNSeparator=tab


DEM Tools

With SBuilder you have the following possibilities to work with DEM (Digital Elevation Model) files:

  • converting DTED2 files to BSQ files
  • converting HGT (SRTM) files to BSQ files
  • converting a bitmap to a BSQ file
  • converting a BSQ file to a bitmap
  • crop a BSQ file
  • merge 2 BSQ files
  • Up/Down Sample a BSQ
  • Process a BSQ
  • View a BSQ

Note 1: SBuilder BSQ files, simply referred to as BSQ files in this document, are files that can be used by the MS Terrain SDK. They are equal to BSQ files produced by many other programmes in the fact that they contain 2 bytes per altitude point. Each altitude point is coded as a signed 16 bit number with the least significant byte first. The points appear in the file from west to east and then from north to south. However at the end of the file there are 18 extra bytes with information about the latitude and longitude of the borders and information about the sampling arc. These 18 extra bytes are ignored by the MS SDK tools but can confuse other programmes.

Note 2: in DTED2 files, altitude points exist in a 1 ArcSec grid. Therefore a 1 x 1 degree DTED2 cell has 3601 x 3601 points. On the other hand, in HGT files, altitude points can exist in 2 grid spacing. SBuilder can recognize 1 ArcSec or 3 ArcSec HGT files. You should notice that a 1 x 1 degree HGT cell has 1201 x 1201 points (if resolution is 3 ArcSec) or 3601 x 3601 points (if resolution is 1ArcSec).


DTED2 to BSQ Conversion

DTED2 DEM files are Cells of 1 degree by 1 degree with a sampling distance of 1 ArcSec. When you invoke the command and you choose the file the following window appears with information about the file that you about to convert. You can at this stage crop the file. This means that if you would like, by some reason, the southeast half of the read file, e.g.. a smaller file with 1801 rows by 3601 columns starting at N40 30, you just would enter N40 30 on the North latitude box and press Update.

If you are happy with the settings you will press the "DTED2 >> BSQ" button and the file will be converted. You will be presented with a suggested name for the BSQ generated file.

HGT (SRTM) to BSQ Conversion

HGT files are Cells of 1 degree by 1 degree with a sampling distance of 1 ArcSec (new in SBuilder 2.05) or 3 ArcSec. The converting process is precisely the same as for DTED2. The BSQ produced file is 9 times smaller if you are using 3 ArcSec files.

Note: you get SRTM data here: ftp://edcsgs9.cr.usgs.gov/pub/data/srtm/


BSQ to Bitmap Conversion

In order to make mesh sceneries with SBuilder you need to create a mesh map. A mesh map is a bitmap with colours representing altitude. SBuilder uses 32-bit per pixel mesh bitmaps. These bitmaps are created with the BSQ to Bitmap conversion tool.

If the BSQ file is a standard SBuilder BSQ file the information in the window tool will be correct and you will normally press "Continue". If the BSQ file was generated elsewhere, you need to confirm the number of Rows and Columns.

There are 2 different types of scales that can be used in converting altitude to colour. This will depend if the "8bit/meter" flag is set or reset. If you want to generate bitmaps in order to make meshes, you will reset this flag. Once you have the mesh already done and you are trying to place matched polygons or lines as explained elsewhere, you may want to have a second representation of the mesh. For more information, please press the Help button in the Preferences - Other Settings window.

Note: Some programmes that export DEM data can generate files that SBuilder can convert into a Bitmap for mesh scenery work. For example, BIL (2 byte per elevation) is a type that can be used in this way.


Bitmap to BSQ Conversion

If you have a bitmap produced by SBuilder you can edit it with a painter programme and convert it back to BSQ. You need to specify the sampling arc for the BSQ and the latitude and longitude of the NW corner. Only 1 ArcSec and 3 ArcSec are supported.

Note: you can change the colour of pixels with a paint programme and you can even change the size of the bitmap (crop or canvas operation). However you must save the bitmap in its original format (24 bit per pixel) so that SBuilder can read it.


Crop a BSQ

Sometimes you do not need a very large BSQ file. In such a case you can crop the BSQ file. The window to set this operation is the following:

If you enter 4 borders which are external to the original BSQ borders, the file will be extended instead of cropped. The extension will be done with zeros, e.g. the file will be extended with water.

Note: when you change the values in the latitude/longitude boxes, you need to press UpDate for the new values to replace the old ones.


Merge 2 BSQs

Unless you are working with a very small area, you will probably need to merge BSQs to generate mesh tiles. You can not generate a mesh tile from 2 adjacent bitmaps. Therefore you need to merge BSQ files in order to get a bitmap with sufficient coverage for your area of interest. You merge BSQs in pairs and the window to set this operation is as follows:

Your output file can be very large if the 2 BSQs are not adjacent to each other. If X represents Cells with data and 0 represents Cells for which you have no data, you can merge 2 non adjacent cells to get, say, a 3x1 rectangle like:

X 0 X

or, if the 2 Cells are quite apart, say, a 4x3 rectangle like:

X | 0 | 0 | 0
0 | 0 | 0 | 0
0 | 0 | 0 | X

Your input BSQs can also overlap. When this is the case, you can either force the values in BSQ2 to be written over the values in BSQ1 or the contrary. When BSQ2 values are written over BSQ1 ones, you can specify an exception value. In the example, when -1 (= hexadecimal FFFF in 16 bit signed representation) is found in BSQ2, the value in BSQ1 is taken instead of -1.


Up-Down Sample a BSQ

Up/Down Sample a BSQ

This operation is limited to 1 ArcSec and 3 ArcSec BSQs only. It would be useful if have some data in DTED2 format and some other data (in adjacent regions) in 3 ArcSec HGT format. You can up-sample a 3 ArcSec file, using "zero-order" interpolation, or you can down-sample the 1 ArcSec file. The following window:

will only appears if SBuilder detects a valid BSQ file. If it reads a "SBuilder 3 ArcSec BSQ", it will show you the up sample confirmation window, as shown. If the input file was a "SBuilder 1 ArcSec BSQ", the confirmation window would be a down sample window, instead.


Process a BSQ

There are some other useful operations that you can perform on "SBuilder BSQs". The following window shows the offered options:

You can instruct SBuilder to replace all negative values with 0. This can reduce some noise associated to, for example, SRTM. You can low-pass filter a BSQ produced by up-sampling, to remove some artefacts caused by the interpolation. Finally you can interpolate "void" values (void = most negative value in 16 bit signed representation, e.g., &H8000 or -32768). A linear interpolation is performed using adjacent pixels. If there are not, at least, 4 valid pixels surrounding the "void" the interpolation is skipped. In successive passes the interpolation algorithm runs from north to south, south to north, west to east and east to west. Therefore if a "void" is skipped in a pass it will have an high probability of being interpolated in a second pass. You can specify the number of passes. If you specify a number equal to -1, the interpolation algorithm will only stop when all voids disappear.


View a BSQ

When you convert your files to BSQ, or you perform any operation a short message signals that a BSQ has been created. The BSQ Viewer is helpful for visually checking the results. The Viewer has the following interface:

You can "Zoom and Centre" with the left and the right mouse buttons. Altitude is shown as you move the mouse over the picture.


Coordinates Tool

One problem in getting a suitable map for SBuilder is geo-referencing or re-projecting. The calibration of maps only distorts the map vertically and horizontally. If the map shows geographic coordinates you may be OK. By "showing geographic coordinates" I refer to vertical and horizontal lines labelled with degrees of longitude or latitude. These lines should intersect at perfect right angles. If the lines do not cross at perfect right angles you are in presence of a map that does not use a geographic projection. If you use such a map you will get misalignments between your map and other maps. Even if the map uses a geographic projection, it should also be based on the so-called WGS1984 datum. For example in the figure you will see that WGS Geographic position of Latitude N40 and Longitude W10 in WGS84 corresponds to N 40 00 01.0196 and W 10 00 06.0144 just by changing from the WGS84 datum to the Azores Graciosa Datum.

Flight Simulator is based on a Geographic Projection (coordinates as degrees of latitude and longitude) and on the WGS84 datum.

In version 2.05 you can re-project bitmap raster graphics, and BLN vector graphics.

BLN vector re-projection

For BLN vector re-projection, you need to have a BLN file with the X and Y coordinates of your data. If the BLN data is in the UTM format, enter the Zone and the Datum of your UTM data and press "File UTM >> LatLon". At the end, another BLN file will be created where the X and Y data (originally eastings and northings) was converted to WGS84 longitudes and latitudes respectively.

You can also convert BLN files from "Transverse Mercator" or "Geodetic" coordinates to "Geographic WGS84" coordinates. In the first case you need to set the parameters of the original data in the corresponding sub-window. See note below on the command "Update INI file".

Bitmap raster re-projection

For a bitmap to be re-projected it must be in 24-bit format. If the input file is called my_original.bmp, a sister file with the name of my_original_bmp.txt should be present in the same folder with some lines to specify the boundaries of the original. See the following examples for the file my_original.txt.

This is needed if you are going to re-project from Transverse Mercator

[MERCATOR]
North=3333333
South=222222
West=522222
East=1233333

The following is needed if your bitmap "is" already a geographic projection but in a different datum

[GEOGRAPHIC]
North=33.33
South=22
West=-40
East=-20

You can mix text in the file. If the original bitmap is in UTM coordinate system, specify the borders as follows:

[UTM]
North=3333333
South=222222
West=522222
East=1233333

When you press "Convert" and the TXT file is found, a confirmation message will be presented as this one:

The picture refers to a "Transverse Mercator > Geographic WGS84" conversion. The parameters are taken from the Transverse Mercator frame on the left of the window. The shown parameters apply to Portugal and are read from the INI file. If you edit the boxes for your region or system, you should press "Update INI file" so that you do not need to retype the next time you use the tool.

If you press Yes, the conversion takes place and a new bitmap file is created. The name of this file will be, for example, Test_8_WGS84.BMP, if the original file name was Test_8.BMP.

About datum's

In these transformation of coordinates you can switch from different datum's. You can add other datum's through a file called datum.txt found in the "Tools" folder of SBuilder. Here is an extract of a discussion on the AVSIM forum regarding this matter:

SBuilder ships with a file called datum.txt which contains 21 different datum's. These datum's are the ones used in Portuguese cartography. You can customize this. For example you can delete any datum that you will not use. And, of course, you can add the datum used in your region. The important point is that the LAST DATUM in the list should be WGS 1984. Here are the last 3 lines of the file datum.txt:

...
<South American 1969 Brasil> 6378160 6356774.719 -60 -2 -41 0 0 0 0
<WGS 1972> 6378135 6356750.52 0 0 4.5 0.219 0 0 0.554
<WGS 1984> 6378137 6356752.314 0 0 0 0 0 0 0

In order to add a new datum you need to know 9 values:

a b dx dy dz ds rx ry rz

These values are the major axis (a) and the minor axe (b) of the datum's ellipsoid and the "seven parameters" for the Helmert transformation as shown here:

http://earth-info.nga.mil/GandG/datums/natodt.html

In the bottom of this page there is a link to a pdf file with a list of values. I used these values except in cases where I got updated values from national geographic institutions.

The second value in the list is not the minor axis of the ellipsoid but the flattening squared e2. You need to derive the minor axis (b) using the formulae to relate a b and e2:

e2=(a*a-b*b)/a*a

b=a*sqr(1-e2)

If I want to add the datum for Holland the file datum.txt will look like:

...
<South American 1969 Brasil> 6378160 6356774.719 -60 -2 -41 0 0 0 0
<Netherlands RD Amersfoort> 6377397.155 6356078.963 565 49.9 465.8 4.08 -0.409 0.36 -1.869
<WGS 1972> 6378135 6356750.52 0 0 4.5 0.219 0 0 0.554
<WGS 1984> 6378137 6356752.314 0 0 0 0 0 0 0


Open Recent Files

This menu list the 4 more recent opened files. Note that the list is update when you open a file that is not in the list. Appending or importing will not update the list.

File - Exit

This command closes your Project and ends SBuilder. A message prompts you to Save the project if you have not done so.


Edit Menu

The Edit menu contains some commands found on many Windows applications and some other commands specific to Flight Simulator and scenery creation. In the first case, you have the Undo, Redo, Cut, Copy, Paste, Delete, Find, Invert Selection and Select All. The Conversions tool, Snap to LOD is strictly related to Flight Simulator.

The Cut, Copy and Paste commands are limited to certain type of items and do not work as in normal Windows applications. For example, if you have SBuilder running in 2 different windows, you can not copy from one window and paste in the other, as you normal can in other graphical applications.


Edit - Undo

Edit - Undo - Redo

With the Undo function your project can return to the stage it was before the last action or command took place. The function memorizes the last 4 stages of the project. The Redo function is the reverse of the Undo function.

You should be aware that simple actions, such as, for example, the movement of a point counts as a stage and that a complete copy of the whole project is stored in the memory before the action takes place. Therefore the operation of SBuilder can become very slow on a very large project. If you note this behaviour, you can turn off Undo/Redo by deselecting the corresponding box in the Preferences menu.


Coordinate Conversions

The latitude and longitude of the points that form polygon or lines or the latitude and longitude values for the centre of an object are stored in high precision numbers. You can confirm this by opening an Export SBX file with NotePad and count the number of digits on the right side of the decimal point. Actually, latitudes and longitudes are stored as double precision numbers. With such a precision you could control the position of any item, in the Flight Simulator world, within millimetres or less.

However, for LWM and VTP scenery, points sit, more or less, on a 4.8 meter by 4.8 meter grid (these values are for the Equator). As you know, for this type of scenery, the world is divided in squares of increasing resolution - the LOD squares. You can play with the Grid Display to see this. LOD13 squares, also known as Areas, have an edge of about 1.2km by 1.2km. LOD8 squares, also known as Cells, are composed of 32 x 32 Areas.

For LWM scenery, every point is specified by its X and Y positions in the Area it belongs to. X is the "west to east position" and varies from 0 to 255 (0 is the left side of the Area and 255 is the right side). Y refers to the "north to south position" and varies from 0 to 255 (0 is the north edge of the Area and 255 is the south edge). Each Area has its AreaX and AreaY positions in a Cell (these numbers vary from 0 to 31). If, for a specific Area, AreaX is 0 that means an Area in the left most column of Areas in a Cell. AreaY equal to 31 means an Area on the right most part of the Cell. Conversely, AreaY equal to 0 means north of the Cell and AreaY equal to 31 means south of the Cell.

For VTP2 scenery points are specified directly by their positions in the Cell. The X and Y position in a Cell vary from 4080 to 12240. Finally, and this applies both to LWM and VTP2 scenery, Cells are defined by their CellX and CellY positions. CellX equal to 0 means Cells that have their left boundary at W180 and CellX equal to 767 (the largest number) means Cells that have their right border at E180. CellY run from 0 (north pole) to 511 (south pole).

Using the "Coordinate Conversions" window you can convert between these different systems of representation.


Snap to LOD

When you invoke this command the coordinates of all points in all selected polygons and lines will be shifted do that they coincide with the vertex of the LOD21 grid. If 2 consecutive points coincide after the shift the last one is eliminated. If, after the command, a polygon ends up with 2 points it is deleted.

The user is prompted to confirm the command before it takes action. When the command ends, a report appears showing the number of verified and deleted points.

Note: before compiling LWM and VTP polygons and lines, SBuilder calls this procedure to generate the BGL polygons and lines but does not change the coordinates of the "source" polygons and lines.


Edit - Cut

This command removes an element from the Display and replaces what is in the "SBuilder Clipboard". In order to cut a Line, Polygon or Object, you must select it first. When you Cut an item, the Paste command in the Edit menu becomes enabled.

Note 1: you can Cut Lines, Polys and Objects. This function only works in Polygon, Line and Object Modes.

Note 2: you can only Cut one element at a time. It is impossible to Cut more than one element. If you have several elements selected, only the last one that has been selected is Cut.

Note 3: in Pointer Mode you can not Cut, Copy or Paste.

Note 4: the "SBuilder Clipboard" is not the Windows Clipboard.


Edit - Copy

This command Copies an element from the Display and places it the "SBuilder Clipboard". In order to Copy a Line, Polygon or Object, you must select it first. When you Copy an item, the Paste command in the Edit menu becomes enabled.

Note 1: you can Copy Lines, Polys and Objects. This function only works in Polygon, Line and Object Modes.

Note 2: you can only Copy one element at a time. It is impossible to Copy more than one element. If you have several elements selected, only the last one that has been selected is Copied.

Note 3: in Pointer Mode you can not Cut, Copy or Paste.

Note 4: the "SBuilder Clipboard" is not the Windows Clipboard.


Edit - Paste

This command Pastes an element from the "SBuilder Clipboard" and places it into the Display.

In order to Paste an element the Paste command must be enabled (meaning that something exists in the SBuilder Clipboard). You start the command by pressing the Paste command with the mouse. You will see that the mouse cursor changes as shown:

This means that you entered a special mode - the Paste mode. In Paste mode every time you left click the display the copied (cut) item is pasted at the click location. You can paste several times as in the following picture:

In order to end this mode of operation you press the display with the right mouse button. The cursor changes to its previous stage and you are not anymore in Paste mode.

Note 1: you can Paste Lines, Polys and Objects. This function only works in Polygon, Line and Object Modes.


Edit - Delete

This command permanently removes an element from SBuilder. In order to delete an element you need to select it first. You can invoke this command through Edit menu or using the Delete key.

If you invoke the function through the Edit menu, only one element is deleted at a time (the last one that has been selected). Also you can only delete Lines, Polygons or Objects though the Edit menu.

If you press the Delete Key, you can delete every type of element (not only lines, polygons or objects). Every selected items will be deleted after you confirm that you want to delete all selected items.

Note: you can delete any item through the Popup menu invoked by clicking an element with the right mouse button.


Find

When you create a Polygon or a Line or an Object, you can give them names. By giving names to your elements you keep your projects organized. One thing that you can do is to search a Line or Polygon by its name. But you also can select items by type. For example you have a project and have lines that are streams and other lines that are roads. You want to select all the streams to make, for example, a global change on the streams. In order to select all the streams you can make a Search with the text //1024//. If you export the project and read the SBX file you will see the type of every item. For example the type of a VTP stream line with layer number 4 is as follow: Type=VTP//4//1024//. This explains why we made a search with the text //1024//.

Note: When importing Polish Map files, SBuilder retains the original names of the lines, polygons and objects.


Invert Selection

This command selects all unselected items and deselects all selected items. This function is very useful if, for example, you opened a big file and you want to work with a small area. To do this, you select the area of interest, invert the selection and press Delete.

Select All

Selects all items in the project. You need to be in Pointer mode to enable this command.


View Menu

The View menu allows you to adjust the SBuilder display to better suit your work.

If NoOfMaps > 0 And MapVIEW Then DisplayMaps
If NoOfMeshes > 0 And MeshVIEW Then DisplayMeshes
If NoOfFills > 0 And FillVIEW Then DisplayFills
If NoOfLands > 0 And LandVIEW Then DisplayLands
If NoOfWaters > 0 And WaterVIEW Then DisplayWaters
If NoOfPhotos > 0 And PhotoVIEW Then DisplayPhotos
If NoOfExcludes > 0 And ExcludeVIEW Then DisplayExcludes
If NoOfPolys > 0 And PolyVIEW Then DisplayPolys
If NoOfLines > 0 And LineVIEW Then DisplayLines
If NoOfObjects > 0 And ObjectVIEW Then DisplayObjects
If GridDispON And Grid > 0 Then DisplayGrids
If AircraftVIEW Then DisplayAircraft

The display order is: Maps, Meshes, Area Fills, Land classes, Water classes, Photo tiles, Exclusion rectangles, Polygons, Lines, Objects, Grids, FS9 Aircraft

You can also switch ON and OFF the display of the Toolbar through this menu.

Show Toolbar


Goto Position

This command centres the display at the coordinates that you specify. You can specify LWM coordinates, VTP coordinates or Geographic Latitude and Longitude.

Show Aircraft

If you have FS2004 running in a different window you can see the FS aircraft displayed as a small red cross in the SBuilder window. The command also centres the display at the location of the aircraft. In order to get this facility you need to download FSUIPC.DLL from:

http://www.schiratti.com/dowson.html

and copy it to the \modules\ folder of Flight Simulator

Fly Aircraft to

With this command you can position the FS2004 aircraft at a location whose coordinates are the latitude and longitude of the SBuilder display centre. This is very useful to see the scenery that you are editing or creating in FS2004.

Note 1: The Show... and Fly To... commands are normally used with FS2004 in Slew mode.

Note 2: If you have FS2004 running on a different window, SBuilder cannot copy BGL files to any installed scenery folder. You need to close FS2004, generate the BGLs and start FS again.


Show Maps

The Maps submenu of the View menu presents you with a choice of 9 maps. The first 7 maps have the same calibration and, in addition to the fact that they can act as simple backgrounds, they are used to generated photo scenery. If you have only set the Summer map, the other 6 ones will show the Summer map.

The Land Use map is a specific map that can assist you in generating Land class scenery from a bitmap with a fixed number of colours. More information can be found here.

The mesh map is a BSQ file translated to bitmap by SBuilder as described in the DEM Tools section. If you have a mesh map you can create mesh scenery with a click of a mouse.


Display Grid

You can switch ON and OFF the display of the boundaries of the LOD squares through this menu. LOD stands for Level Of Detail. These LOD squares are smaller as you increase the resolution. Higher LODs mean higher resolution and small distances. The world is divided in 6 large LOD1 squares as shown in the figure:

Each LOD1 square is divided in 4 LOD2 squares. Each LOD2 is divided in 2 LOD3 squares. The smaller squares on the NW corner of the map are LOD3 squares. The smallest square that we can see in SBuilder is a LOD13 square. LOD 13 squares are also referred to as Areas and they measure about 1.2 Km by 1.2 km at the Equator. You can get more information about this subject here.


Controlling what is displayed

What to Display

How

All Maps

All Meshes

All Land Classes

All Water Classes

All Photo Tiles

All Lines

All Polygons

All Area Fills

All Objects

All Excludes

View All

Note: You can not change the order of displaying the different type of items. This order is: Maps, Meshes, Area Fills, Land classes, Water classes, Photo tiles, Exclusion rectangles, Polygons, Lines, Objects, Grids, FS9 Aircraft


Select Menu

Through this menu you can select and deselect with a single click all the elements in the Project or all the elements of a type in the Project. This is very useful when you are ready for compilation. If you want to generate several BGL types simultaneously, you need to go to Pointer mode. In Pointer mode you can select all the types of elements that you want as shown in the following table.

What to Select

Where it works

All Maps

In Pointer and Map modes

All Meshes

In Pointer and Mesh modes

All Land Classes

In Pointer and Land Class modes

All Water Classes

In Pointer and Water Class modes

All Photo Tiles

In Pointer and Photo modes

All Lines

In Pointer and Line modes

All Polygons

In Pointer and Polygon modes

All Area Fills

In Pointer and Area Fill modes

All Objects

In Pointer and Objects modes

All Excludes

In Pointer and Exclude modes

Select All

In Pointer mode only


Options Menu

This menu allows you to select between 12 modes of operation (the first 12 entries) and it also allows you to set the Preferences for SBuilder. Unless the Toolbar View is disabled you can enter any of the 12 modes by pressing its corresponding button in the Toolbar.

Pointer mode

In this mode you make operations that affect all the type of items. For example you can select Lines and Polygons simultaneously. You can move points from lines and points from polygons at the same time. You can select all the existing items in a project if you are in Pointer mode. If you are in a specific mode, for example in Line mode, you can only select Lines.

Also in Pointer mode you can use the "window selection tool".

Zoom mode

In Zoom mode you Zoom in by left-clicking the display and you zoom out by right clicking the display. In addition the display is centred on the clicked point. You have a mouse wheel you will probably use the Zoom mode seldom.


Options - modes of operation

Mode Cursor More information

Map

 How to work with Maps

Meshes

 How to generate Meshes

Land Classes

 How to generate Land Class scenery

Water Classes

 How to generate Water Class scenery

Photo Tiles

 How to make Photo scenery

Lines

 How to work with Lines

Polygons

 How to work with Polygons

Area Fills

 How to work with Area Fills

Objects

 How to place Objects

Excludes

 How to create an Exclusion Rectangle


Preferences

The settings that can be adjusted through the Preferences menu are persistent, e.g. they will be used on following projects. These settings are saved in the file SBuilder.ini. These settings were grouped in 4 classes except the Undo/Redo already referred to in the Edit menu.

Preferences - Display

The Display sub menu permits the following settings:

Centre of Display Latitude and Longitude - every new project will be located here.

Restrict Grid Display - if ON the Grid display will be limited to 5 x 5 LOD5 squares. The centre of the grids is a parameter of the project and it set elsewhere.

Lat/Lon in Decimal Degrees - if ON, latitudes and longitudes will be shown as, for example, 40.5 instead of 40º 30' 00.0000'' N. If OFF you can enter latitudes as 40º 30' 00.0000'' N or 40:30:00 or n40 30 or 40º 30' and so on. South latitudes should be signalled with S or with a minus sign. West longitudes are entered as negative values or with a letter W.

Points in LWM/VTP coordinates - if you select LWM you will get the coordinates of Points in the status bar shown as Area Pt XX YY. If you select VTP these coordinates are shown as Cell Pt XX YY.

Show Labels - you force SBuilder to show or to ignore the labels (names) of lines, polygons or objects when you pass the mouse over these items. In some occasions it is better to switch this OFF in order to speed the display.


Preferences - Colours

You can set the colours of lines, polygons and other items through this sub menu.

These colours are used at creation time. For example, in this menu you see that, the colour of a polygon, when you are creating it, is yellow. However, when you change the polygon to be an LWM water polygon, its colour changes to blue (default value). The colours used by SBuilder to show VTP polygons and lines is also defined elsewhere and encoded in the files polys.txt and lines.txt.

To change the colours you click on the shown descriptive labels. You can change the colour of selected and unselected points, selected and unselected lines, polygon interiors, polygon borders, selected and unselected exclusion rectangles.

Border around maps? - if Yes, the maps will have a border (you click this border to select the map or to access its properties).

Fill Polygons with Colour? - if No, the interior of polygons is not filled.

Hide "Exclude Polygons" - refers to exclusion VTP polygons. You can hide/unhide them trough this switch.


Preferences - BGL Settings

You can set many aspects of BGL generation through this sub menu.

Single LWM BGL file - if you set this, you create a single file with LWM polygons and Area Fills inside.

Area Fills as Polygons - there has been speculation that Area Fills could crash FS2004. If you set this box Area Fills will be generated as 4 corner polygons. Check the Map View in FS2004 for any difference in behaviour.

VTP Replace/Coexist Flag - your VTP data will replace or coexist with the default VTP data on the Area and on the Layer number.

Remove Hooks - if you uncheck this box, when appending BGL VTP lines, you will get all the points of the lines. If you check the box, SBuilder interprets the 1st and the 2nd points and the last and the one before the last, as defining the start and end width of the line. If you plan to compile an appended VTP file, you should check the box.

Shift VTP items - When you add thin shorelines around a lake, sometimes the shoreline can not cover the water/land boundary. It looks like VTP and LWM items do not coincide when they should. In the picture 1 unit means 1 LOD21 step (about 4.8 meters). We found (in Europe - is this uniform?) that shifting VTP items 1 unit south and 1 unit east better results are obtained in terms of coincidence between LWM and VTP items.

Compensate VTP shifts - when you compile and decompile VTP files several times you need to set this if you are using "VTP shifting".

Join Multi-Cell Lines - in order to understand this option study the following exercise

1. Start a New project. Press F8 to see the Cell grid (LOD8).

2. Make a Line going from left to right with 6 points crossing one grid. Define it as VTP (road, river, or else). Points 1 2 & 3 are on Cell 1 (the left one) and points 4 5 and 6 are on Cell 2 (the right one

3. Compile. Move the line a bit to the top so that you can append it and see both.

4. Before appending you should know that it is necessary to divide the line in 2. MS suggests in the SDK to make ONE line with points 1 2 3 and 4 - Cell 1 entering one point on Cell2 and ANOTHER line with points 3 4 5 and 6. SBuilder does that.

4. Decompile (append VTP). In the Preferences there is a switch called Join Multi-Cell Lines. I forced it to be allways ON (you can turn it OFF but SBuilder internally make it ON). What does that mean?

answer: join lines 1 2 3 4 with 3 4 5 6 so that you end up with a single line with points 1 2 3 4 5 6!

So you will see the line exactly as you created! So if you create a VTP line crossing a Cell with SBuilder, you get it back! If you recompile you get the same size.

Now suppose that lines were created by another programme (say default lines) and that the crossing is handled diferently (for example another way to implement hooks). Then when you append VTP the "joining lines that cross cell borders" function fails. You would get 2 separate lines with commom ends!

......|......
.1.2.3|4.....
.....3|4.5.6.
......|......

(in fact if the lines have the same type (you do not want to join a river with a road!) and points 3 and 4 coincide in the shown figure, Sbuilder makes a single line as I explained above)

When you compile these 2 lines you get 4 lines! The first line generates line 1 2 3 4 and 3 4. The second line generates 3 4 and 3 4 5 6! The recompiled file is larger!

Remove Hooks - in order to understand hooks study the following picture

A - an original 30 meter wide line made with 4 points in Sbuilder
B - same line decompiled with Sbuilder (Remove Hooks = ON)
C - same line decompiled with Sbuilder with (Remove Hooks = OFF)
D - same line decompiled with LWMViewer
E - same line decompiled with TMFViewer (Draw Wide Lines as Lines)
F - same line decompiled with TMFViewer (Draw Wide Lines as Lines)
G - same line decompiled with TMFViewer (... + Fill Polygons)

In SBuilder hooks will be created, which means that the 4-point line will become a 6-point line in the BGL. The reason is that the wide line is made with triangles (as F clearly illustrates) and the 2 extra points are really necessary. If you are decompiling SBuilder BGLs you should set this option. If you are decompiling a non-SBuilder BGL (a default file, for example) you should examine if the file had or had not hooks.


Preferences - Other Settings

This sub menu allows the setting of miscellaneous parameters.

Default Land Class - when you enter Land Class mode for the first time, this index is selected.

Default Water Class - when you enter Water Class mode for the first time, this index is selected.

Default Point Width - when you create lines, they get this width.

Default Altitude - when you create a LWM polygon, they get this altitude.

Auto Line/Poly Joining - If set, whenever you click on a line or polygon, SBuilder tries to join all items that can be joined to the clicked item. This is done recursively and care must be taken or you will end up with unwanted joining.

D isplay based Joining - Say that you are to join line A (points 1 to N) with line B (points 1 to M). Say that the joining points are N from A and 1 from B. When you set "display based joining" the lines will actually be joined if the distance between the joining points is equal or smaller than 3 "display pixels". If you unset this switch the lines will be joined if the distance between the joining points is equal or smaller than a LOD21 edge (4,8 meters more or less). This means that joining will depend on the ZOOM! If you can not join 2 lines at a certain ZOOM (because the joining points are 4 pixels apart) you will be able to join if you decrease the ZOOM. This applies for lines and polygons.

Ignore Line Direction - when unset you can only join 2 lines if a START point of one of the lines is near the END point of the other line. In order to join the lines you would need to "Reverse" the points in the Lines properties. When you set this switch the direction will be ignored and it is possible to join at the 2 START points of 2 lines or at the 2 END points of 2 lines.

Ignore Line Labels - if set, you can not join lines with different names.

Altitude to change (10 in the figure) instructs SBuilder to use a special colour on the representation of an altitude of 10 meters.

"8-bit/meter" - this parameter is used in the altitude to colour translation table of the BSQ to Bitmap conversion tool. In opposition to the normal "1-bit/meter", this setting introduces more contrast in the bitmap. This can be useful to draw a river that should go on a valley. Here are 2 pictures. In the first we are using a normal mesh bitmap. In the second we are using an "8-bit/meter" bitmap. The line is a river VTP line.

Help - this command shows the details involved in creating and using an "8-bit/meter" bitmap. You should read it with SBuilder running.


Preferences - Objects

This sub menu allows the setting of folders for object macros.


SBuilder ini file

SBuilder.ini file is a file created by SBuilder when it runs for the 1st time and contains parameters that affect the operation of SBuilder. Some parameters can be selected through the GUI (from the Preferences menu). Here is a commented ini file:

[Main]

ExtMeshBitmap=False ; see
 this for
 explanation.
MacroASDPath=C:\FS\asd\ASDesign\MacrosX ; folder for ASD macros
MacroAPIPath=C:\FS\Airport for Windows\API ; folder for API macros
Rwy12Path=c:\FS\Rwy12 ; folder for RWY12 objects
JoinCellLines=True ; to join lines that cross cells
NameJoin=False ; join if names are identical
DirJoin=False ; take line direction into account when joining
DisplayJoin=False ; use display distance to decide if items need to be
 joined
ShowLabels=1 ; to control the display of labels
AutoLineJoin=0 ; to control automatic joining
VTPUnShift=True ; for VTP BGL shifts
VTPShiftWE=1 ; for VTP BGL shifts
VTPShiftNS=0 ; for VTP BGL shifts
BGL2Folder=C:\SBuilder\scenery ; to use in new projects
BGL1Folder=C:\SBuilder\scenery ; to use in new projects
SingleLWMBGL=True ; mix AreaFills and LWM polys in one file
PassWord= ; for registration control
Check Hooks=True ; used in BGL VTP appending
SingleLWMBGL=True ; if true Area Fills and LWM polys will be created in
 the same BGL
Mesh8=True ; to select type of mesh bitmap
Altitude2Change=10 ; used in mesh preferences
ColorAltitude=300 ; used in mesh preferences
AutoCheckDistance=15 ; used in CheckLine and CheckPoly
MakeClosedLineFromPoly=False ; lines will be be closed when using Make
 Line
PolyViewPath= C:\FS\polyb; write here the complete path for PolyViewer
 as C:\FS\polyb
AskDelete=True ; change to False to avoid the confirmation dialogue on
 every delete
BorderON=True ; if true there will be a black border around maps
BackUpON=True ; setting to false disables Undo/Redoo. Useful when
 working with very large files
HideOtherPolys=False ; exclusion polys will (not) be displayed
VTPReplace=True ; default VTP elements on the same layer on a Area will
 be deleted
DefPWidth=35 ; default Line Width on line creation
DefAlt=0 ; default Altitude for LWM water polys and flattens
AreaPoints=True ; status bar shows coordinates of Points in Area (in
 Cell if false)
FillAsPoly=False ; LWM Area Fills are made as LWMAreaDrayPolys
ClassGridVIEW=False ; if true grid display is limited to a 5 x 5 LOD5
 region
DecimalDegrees=False ; to set the format of latitude and longitude
LatLandCenter=40 ; initial starting position for new projects
LonLandCenter=-10 ; initial starting position for new projects
DefLinC=10 ; internal index for line classes - pointer in lands.txt
DefPoC=10 ; internal index for land classes - pointer in lands.txt
DefWC=10 ; default Water Class when creating Water Class scenery
DefLC=11 ; default Land Class when creating Land Class scenery

[RecentDirs] ; to remember the last used folders
BmpDir=C:\PT2004
SaveDir=C:\PT2004
VTPDir=C:\PT2004
LWMDir=C:\PT2004
PolishDir=C:\PT2004
SurferDir=C:\PT2004
AppendDir=C:\PT2004
ImportDir=C:\PT2004
OpenDir=C:\PT2004

[BLN]
BLNAutoLine=True ; closed lines will be created for every imported
 polygon
BLNEndWidth=35 ; this can be set through the append BLN dialogue
BLNStartWidth=35 ; this can be set through the append BLN dialogue
BLNWidths=True ; this can be set through the append BLN dialogue
BLNLineColor=255 ; this can be set through the append BLN dialogue
BLNLineType= ; this can be set through the append BLN dialogue
BLNPolyColor=255 ; this can be set through the append BLN dialogue
BLNPolyType= ; this can be set through the append BLN dialogue
BLNSeparator=tab ; use this if the separator is a tab character

[Colors]
ExcColorSel=65280 ; this can be set through the Colours Preferences menu
ExcColorUns=0 ; this can be set through the Colours Preferences menu
PolyColorFill=65535 ; this can be set through the Colours Preferences
 menu
PolyFill=True ; set to false and polygons will not be filled
PtColorUns=255 ; this can be set through the Colours Preferences menu
PtColorSel=65280 ; this can be set through the Colours Preferences menu
LnColorUns=16711680 ; this can be set through the Colours Preferences
 menu
LnColorSel=65280 ; this can be set through the Colours Preferences menu

[Recent Files]
RecentFile4=C:\SBuilder\lixo1.SBP
RecentFile3=C:\SBuilder\Atlantico\test8.SBP
RecentFile2=C:\SBuilder\photo\lisboa.SBP
RecentFile1=C:\PT2004\SCENERY\LANDCLASS\ptland1.SBP

[Coordinates] ; created by the "Update INI file" command in the
 Coordinates window
DatumGeodetic=2
DatumUTM=0
DatumMercator=11
MercatorFalseEast=200000
MercatorFalseNorth=300000
MercatorCentralLon=-8.13190611111111
MercatorCentralLat=39.6666666666667
MercatorScale=1
GeoRefCrop=True ; to crop the file after a re-projection

[Photo] ; explained in the help file
MeshBias=0
FlattenBias=0
PhotoCall=LayerCall( :lcall 4 )
PhotoHeight=0
PhotoRange=5000
HWinterEnd=-1
HWinterStart=-1
WinterEnd=76
WinterStart=356
FallEnd=355
FallStart=263
SpringEnd=169
SpringStart=77
SummerEnd=262
SummerStart=170
ExtraHeight=0
Zbias=0

[Tutorials] ; see Help - Tutorials
Link1=island tutorial.pdf
Link2=http://www.scasm.de/doc/sca_trn.htm
Link3=
Link4=
Link5=
Title1=How to Make an Island ...
Title2=How to Get Scasm Help ...
Title3=How to Import Shape Files ...
Title4=How to Calibrate a Map ...
Title5=How to Make Photo Scenery ...

In different languages the words False and True are different! Also note that SBuilder only works in systems with the character "." as the decimal number character.


Help Menu

SBuilder Help

This command invokes the SBuilder Help file.

Visit the SBuilder Forum

You can also visit the Scenery Builder Design Forum at:

http://www.ptsim.com/forum/forum.asp?FORUM_ID=18.

You can find many tips there.

Tutorials

I would be very grateful if you want to participate in helping other scenery designers to learn about SBuilder features. You can do that in a variety of ways. For example, you can post in the PTSim Scenery Design Forum or other forums dedicated to Scenery Design. You can even make a Tutorial on a particular aspect of Scenery Design with SBuilder (you can count with my help for that) and and share it with other users. If you do so, you can save your tutorial on a WEB site or you can upload an HTML or PDF file to a public File Library.

Users can get access to the Tutorial through the Help menu. There are 5 slots for tutorials. When you start SBuilder for the first time the INI file will be created with the following entries:

[Tutorials]
Link1=island tutorial.pdf
Link2=http://www.scasm.de/doc/sca_trn.htm
Link3=
Link4=
Link5=
Title1=How to Make an Island ...
Title2=How to Get Scasm Help ...
Title3=How to Import Shape Files ...
Title4=How to Calibrate a Map ...
Title5=How to Make Photo Scenery ...

Only 2 tutorials are shown (available). Tutorial 1 has the title "How to Make an Island ..." and was written by Jeffrey Stanyer for version 2.02. It can be downloaded from here:

http://www.ptsim.com/forum/topic.asp?TOPIC_ID=152

If you unzip the PDF file with name "island tutorial.pdf" and place it in the "Html" subfolder of Scenery Builder, you can start the tutorial from the Scenery Builder Help menu.

Note the link for tutorial 2. Since it starts with "http", SBuilder initiates an HTTP request to the shown URL. In this case you will be presented with the pages that describe Scasm Terrain commands.

About SBuilder

This command shows the version number of SBuilder.


Register SBuilder

The registration of SBuilder is a 2 step procedure. Firstly you need a Product Code. Then you need a Personal Password. For the "freeware use" of SBuilder you can use the Public Product Code 11AA11AA11 but you still need to get a Personal Password. If you want to send a payment (needed for a commercial license), you can use the following links:

http://www.ptsim.com/en/shopaddtocart.asp?catalogid=70&quantity=1 (private)

http://www.ptsim.com/en/shopaddtocart.asp?catalogid=21&quantity=1 (commercial)

In order to get a Personal Password you go to:

http://www.ptsim.com/reg/sbuilder/sb2k2.asp

and, after entering the Product Code, a Personal Password is sent to you by email. The password is used in the above window to finalize the registration process.