Version 3.00

EZ-Landclass is a program that allows you to change the placement of landclass and waterclass textures in Microsoft Flight Simulator™ 2002, 2004 and FSX .  You can use it to add small towns that MS left out, for instance, or to correct the type of vegetation or ground cover in a certain area. 

 

EZ-Landclass is written as an Excel application. Therefore, in order to run it, you will need Microsoft Excel 97 or later.  My apologies to those of you who do not have Excel.  My main reason for writing it in Excel was that it drastically reduced the development time, which was important to me, considering I'm releasing this as freeware!  If you do not have Excel but want to do some landclass scenery design, I would highly recommend a program by John Cillis called Landclass Assistant, available on Avsim.com and other flightsim web sites.  My program was in many ways inspired by Landclass Assistant

 

EZ-Landclass (EZLC) uses MSFS as a means of specifying the locations you want to modify.  You normally don't have to worry about typing in latitude and longitude values.  The normal mode of operation would be to have MSFS and EZ-Landclass running at the same time.  You simply fly or slew to a certain position, switch over to EZ-Landclass, click on a button to determine where MSFS is positioned, and type in a numeric value corresponding to the landclass or waterclass texture you want to appear at that location.

 

INSTALLATION

  1. Unzip the package into a folder of your choice.  If you have a previous version of EZLC, either completely delete it first, or install into a different folder.
  2. If you will be using EZLC in conjunction with FS8 or FS9, copy FSConnect.dll (located in the Lib folder) into your FS200x\MODULES folder.  
  3. If you will be using EZLC in conjunction with FSX, no other action is required.  EZLC will communicate with FSX using FSConnect.exe, which needs to be in the Lib folder.  You do not need to make an entry in exe.xml. 

The first time you run the program, an .ini file will be created automatically.  

 

REQUIREMENTS

1. FSConnect.dll.  For FS8 / FS9 scenery development only. This is an add-on module written by myself that allows programs to communicate with FS8 or FS9.  It is included in the install package, and needs to be copied to your FS200x\MODULES folder, as explained above.

 

2. FSConnect.exe  For FSX scenery development only.  This is a program written by myself that allows programs to communicate with FSX.  It is included in the install package.  EZLC will start this program automatically whenever it needs to communicate with FSX.  It normally runs in the system tray.

 

3. FS2000 Scenery Compiler Tools.   For FS8 / FS9 scenery development only.  These are a collection of programs that come with the Microsoft Flight Simulator 2000 Scenery SDK, and are used by EZLC to produce scenery files.  They are included in the EZ-Landclass installation package, so you normally won't need to take any action here. The specific programs that make up the tools collection are : Resample.exe, Tmfcompress.exe, and Tmf2bgl.exe.  If for some reason you didn't get these programs, or they got erased, you can download them at Microsoft Flight Sim Archive section.  Look for FS2000_Terrain_SDK.exe.

 

4. FSX Resample.exe.   For FSX scenery development only.  This program is part of the Scenery Development Kit (SDK), which ships with the deluxe version of FSX.  Due to licensing restrictions, it cannot be included in the EZLC installation package.  It is not installed by default when you install FSX.  You can install it by running the Setup program in the SDK folder on Disk #1.  Once you have the SDK installed, you can find Resample.exe in the folder "...\SDK\Environment Kit\Terrain SDK".

 

STARTUP

Either double-click on the file EZ-Landclass.xls file, or start MS Excel first, and use File/Open to open the file.  Depending on your security settings, you may receive a warning message saying "The workbook you are opening contains macros."  Be sure you enable macros.   

 

When EZ-Landclass opens, you will be presented with a blank worksheet, which is where you will enter all your data.  The first thing you should do is select "EZ-Landclass / Options..." from the menu, and verify that the correct path has been inserted to the compiler tools mentioned above.  If not, click on the Browse button to locate them.

 

Now start MSFS, and fly or slew to the area you want to work with.  Note: it doesn't matter which program you start up first.  Also, since you will be switching back and forth between EZ-Landclass and MSFS a lot, you will probably find it easier putting MSFS in "windows" mode.  You do this by pressing ALT-ENTER.  Another tip: the default behavior of MSFS is to put itself into Pause mode every time you switch to another program.  You can modify this by selecting Options / Settings / General, and checking or un-checking "Pause on Task Switch".

 

YOUR FIRST PROJECT

1. Switch to EZ-Landclass.

2. Select "EZ-Landclass / Start New Project" from the menu.

 

 

 

3. Give the project a name.  The project name will be used to name the resulting scenery file (.BGL), so be sure to avoid using the following characters:  \ / : | * ? " < >

4. Specify a folder in which to put files related to this project.

5. Specify an initial geographic point near where you would like to work.  You can either type in a latitude and longitude value, or click the "Get From MSFS" button to read your current position in MSFS.

6. Select either Landclass or Waterclass.  Note that if you want to do both landclass and waterclass work in the same area, you will have to do it as two separate projects.  

7. Specify the target platform.  EZLC is able to produce BGL files for FS8/FS9 as well as FSX

8. Click Ok  

 

A Quick Word About Projects and LOD

A project corresponds to one LOD5 cell.  The MSFS Scenery engine breaks the world up into a regular sized grid, where each square in the grid is 3.75 degrees longitude wide and 2.8125 degrees latitude high.  At the equator that corresponds to approximately 400 km wide by 300 km high.  It calls each of these squares an LOD5 cell.  LOD stands for "Level of Detail".

 

Each LOD5 cell is further divided into a 256 x 256 grid of cells, each approximately 1.2 km by 1.2 km. These are referred to as LOD13 cells. This is the smallest unit of area that you can modify using EZ-Landclass. Therefore, EZLC will not be suitable if you want to create a scenery area with precise borders, like a golf course, for instance.  If you want to work with smaller areas, try these programs.  

 

Note that you do not have to supply values for every cell in your project.  Leaving a worksheet cell blank will cause the default texture assigned by MSFS to be shown at that location.  You only have to specify the cells that you want to be different from the default. 

 

The reason for entering an initial Lat/Lon value is to allow EZ-Landclass to determine what LOD5 square you are in.

 

BACK TO YOUR PROJECT

 

Now that you've initialized your project, it's time to do what you've wanted to do all along, and that is modify some scenery! 

 

Switch over to MSFS and fly or slew to the spot that you want to change.  Switch back to EZ-Landclass and click the "Capture MSFS" button on the toolbar.

 

 

This will move the cell pointer in Excel to the cell that corresponds to the location of your aircraft in MSFS.  Now type in the number of the landclass or waterclass texture that you want to appear at that location. It's as simple as that!  Click here for information on the different types of landclass and waterclass textures available for use.

 

You can modify as many cells as you like. You might want to hit the save button once in a while.  To quickly fill a large area with a single value:  1) Enter the value in one cell,  2) Copy that cell into the clipboard,  3) Use the mouse to select a rectangular region of cells, 4) select Paste.

 

When you want to see what your modifications are going to look like, follow these steps : 

  1. Select "Make Scenery File" from the EZ-Landclass menu.  This will create a scenery file called <MyProject>.bgl, where <MyProject> is the name of your project. EZLC will put the bgl file in a subfolder of your main project folder.  The bgl file for FSX will be placed in a subfolder called FSX, and the bgl file for FS9 will be placed in a subfolder called FS9.
  2. Place the .bgl file some place where FS can find it : either copy the .bgl file into C:\Program Files\FS9\Addon Scenery\Scenery, or ...
  3. Create a folder somewhere on your hard drive called Scenery, and place the .bgl file there.  For example, C:\My Documents\Some Project\Scenery.  If you use this method, you must also add this folder as a scenery area from within MSFS (Settings / Scenery Library / Add Area).  TIP: just create the Scenery folder as a subfolder of your project folder.  
  4. Note that with FS2004, you will have to exit and restart the program after every change.  With FS2002 and FSX, you merely have to de-activate the scenery area, copy in the new file, and re-activate the scenery area. 
  5. Start FS and fly to your location.

So how does it look! 

 

You might notice that some of the textures did not appear exactly where you wanted. That is because MSFS centers the texture on the vertices of the LOD13 cells, which as you recall, are approximately 1.2 km by 1.2 km, and you might not have been right on the vertices when you clicked "Capture From MSFS".  Here's a little trick to find out where the vertices are:  after clicking the capture button, right-click on the cell that was selected and choose "Fly To Here" from the pop-up menu.  That sends a message to MSFS telling it to fly to the exact center of that cell (ie. the vertices).  Now switch back to MSFS and see where your aircraft is situated.  That is exactly where the landclass texture will be centered.  

 

Note: you can use the "Fly To" command at any time to position MSFS to a certain area of your scenery.  For FS2002, MSFS must be in pause mode or slew mode for this to work.  This feature does not work in FS2004.

 

Waterclass Projects : Note that you cannot use EZLC to create water where there is currently land.  You first have to use a more advanced scenery program to define the area you are interested in as water, then assign a waterclass value to get the right color of water.

 

That's about it for the basic tutorial.  Keep reading for more in-depth discussion of various topics.

 


 

ADDITIONAL INFORMATION

Status Bar

The status bar shows a variety of useful information when you are working on your project.  First is the name of your project. Next is the latitude and longitude of the currently selected cell in your worksheet.

 

Each time you click "Capture MSFS", the status bar shows the exact coordinates of the position read from MSFS.  The numbers after "Cell:" are an indication of how far off center you are within the current cell. X refers to the horizontal, with values ranging from -50 (extreme left edge of cell) to +50 (extreme right edge of cell).  Y refers to the vertical, with values ranging from -50 (top edge of cell) to +50 (bottom edge of cell).

 

Range Names

Since one project covers a lot of ground, so to speak, it can be rather difficult finding your way around such a large amount of data.  One way to simplify this is to use an Excel feature called "Range Names".  A range name is a name that you associate with a worksheet cell.  You could use this to name cells in your project according to what town or city they correspond to, or any other prominent geographic feature.  You can then jump to these locations within Excel very quickly, rather than having to find them with the scroll bars. Here's how to do it:

 

To name a cell, first click on the desired cell with your mouse, or move there with the cursor keys.  Then type the desired name into the "Name Box" (see picture).  Later, when you want to return to that cell, simply type the name again into the name box, or select it with your mouse.  It's that simple!  If you want to delete a range name, or change it's definition, select Insert / Name / Define Name from the menu.  See Excel Help for more information.

 

 

 

Menu Items

Following is a description of the menu items relevant to EZ-Landclass.

 

File 

Save : This saves the landclass project you are working on.  Project parameters are stored in a file with extension "EZL", while the actual landclass data is stored in a file with extension "RAW".

 

EZ-Landclass

Start New Project : Use this command to start a new project

Open Existing Project : Use this command to open an existing project

Project Settings : You can modify any of the project settings here.

Save Project : Saves project data. Same as File / Save. 

Close Project : This will close the current project and clear the screen

Import Data : Use this command to load data created by other landclass programs.  Click here for more information.

Redraw Colors : This will redraw the colors associated with landclass values you have entered.  You will need to use this command after making changes to the color scheme found on the "LC Definitions" sheet.  You also may need to use it after editing a large number of cells at once. For instance if you delete a large number of cells at once, the colors may remain on the screen.

Make Scenery File : This compiles the landclass data into a "BGL" file.  Note that this also performs a save operation.

Options : This brings up a screen where you can specify the path to Resample.exe.

 

Entering Latitude and Longitude By Keyboard

If you are entering latitude/longitude values by keyboard, you can enter them in a variety of formats.  The hemispheres can be designated by the letters "N", "S", "E", and "W", or you can specify the North and East hemispheres using positive values, and the South and West hemispheres using negative values. You can enter a single decimal value, or you can specify the minutes as a second decimal number with a space between, similar to MSFS.  Do not use any symbols for degrees and minutes.

 

Landclass and Waterclass Textures

To determine what type of textures are available, and what they look like, you have a number of options.  First, you can refer to the second worksheet page in EZ-Landclass, which will be either "Landclass" or "Waterclass" depending on what type of project you are working on.  On this page you will find a list of the textures available with a brief description of each.  

 

For an actual view of waterclass textures, you can access the file "Gallery FS2002.jpg" and "Gallery FS2004.jpg", which are located in the Waterclass Gallery folder.  These are actual screenshot of the textures from within MSFS. Note that the texture colors for FS2004 are substantially different than FS2002.  There is currently no gallery image for FSX.  You can easily make one for yourself.

 

Screenshots of landclass textures are also available, but as a standalone product.  You can find it on Avsim.com as "EZLC Landclass Gallery.zip".  

 

Another option for landclass textures is a scenery file called "Texture Gallery CEE8 (FSX).bgl" (supplied with EZ-Landclass) which you can load into MSFS as a scenery area, and view by starting a flight from airport CEE8 (Viking, Alberta).  You will see each of the textures available, laid out in a grid-like fashion.  To correlate the textures that you see with their numeric ID, load up the corresponding .ezl project file into EZ-Landclass, and you will be able to determine exactly what you're flying over.

 

Landclass Changes in FS2004: 

As I'm sure you know MS did a lot of work updating the landclass textures, and the results are fantastic (IMO). 

 

There are six new landclass textures: 12, 95, 96, 97, 98, & 99.  You can see screenshots of them in the "Landclass Gallery" folder.  They are also listed in the "Landclass" page in EZ-Landclass.

 

Following is a list of textures that are significantly different in FS2004.

 

Working on the Edge!

Things get a bit complicated at the edges of a project / LOD5 cell.  We said earlier that an LOD5 cell is broken up into a grid of 256 x 256 LOD13 cells.  However, a landclass scenery file needs to have 257 x 257 data points!  That is because landclass textures are centered on the vertices of the LOD13 cells, not in their center, and also, the last data point in a given row of a scenery file refers to the same geographical point as the first data point in the same row of the next LOD5 square.  The same is true for the vertical. 

 

Before going into detail on that, we need to figure out how we're going to work with 257 columns of data, when the maximum number of columns in an Excel worksheet is 256!  What we'll do is double up values in column 256 and separate them with a comma.  To make this clear, the following table shows what you would enter into column 256 of the worksheet, and how that gets stored in the scenery file.  Note that 254 represents the "transparent" landclass value, which is used to display the default FS landclass texture, which is what happens when you leave a cell blank in EZ-Landclass.

 

Worksheet 
  Column 256   
  Scenery File  
Column 256
  Scenery File  
Column 257
<blank> 254 254
100 100 254
100, 101 100 101
,101 254 101

 

Now back to how this plays out in a scenery file.  We'll use the picture below to explain things.  We have two projects shown:  Project A and Project B, each representing an LOD5 cell.  The green line is where they meet.  The yellow numbers represent the columns in the EZ-Landclass worksheet. (We'll assume for now that an Excel worksheet has 257 columns.  But remember the discussion above!)  Consider the white dashed box marked #1.  It was created by placing the value 141 (barren, rocky ground) in column 255 of the worksheet. Fairly simple.  Notice Box #2.  Just to illustrate what happens at the edge of an LOD5 cell, I put the value 101 (city) in column 257 in Project A, and 56 (grassland) in column 1 of Project B.  Notice how it splits down the middle.  Normally you wouldn't do this.  Box 4 is a more typical example, where I placed the value 16 (shrub land) in column 257 of Project A and column 1 of Project B.  Box 3 is just a simple example, created by placing the value 117 (suburban, trees) in column 3 of Project B

 

 

 

 

Importing Data

EZ-Landclass can import .raw data files created by other landclass programs.  First, initialize a new project in the area that is covered by the data you wish to import.  Then select Import Data from the menu.  EZ-Landclass can only import .raw data files that are either 256 x 256, or 257 x 257.  That works out to a file size of 65,536 or 66,049.

 

You may notice that when you import data files created by other programs and then compile them in EZ-Landclass, textures may appear to be shifted somewhat when you view them in MSFS.  This is most likely to happen when you import data produced by programs that output a 256 x 256 data file.  Here's what's going on.  Since the resampler actually wants a 257 x 257 data file, it stretches the data file that these programs produce by one cell vertically and horizontally to bring it up to 257 x 257.  It gets the extra cell value by duplicating the cell values along the middle row and column.  That is why you may have noticed that when you tried to placed a texture at a certain location, it often did not appear where you wanted it, but was shifted horizontally and/or vertically.  So you "compensated" a bit to get it where you really wanted it.  The problem now is that since EZ-Landclass outputs data exactly the way the resampler wants it, the compensating you did before is now going to work against you and push the textures in the opposite direction.

 

Fortunately there is a relatively easy way to fix this.  After importing the data, conceptually divide the entire grid into four quadrants, as pictured below.  The quadrants divide between column DX and DY, and between row 128 and row 129.  Use Excel copy & paste commands to shift the data in the top-right quadrant over one cell to the right.  Shift the bottom-right quadrant one cell right and one cell down, and shift the bottom-left quadrant one cell down.  Leave the top-left quadrant as is.  Compile the project and check to see how things line up.  You should find it looks exactly as the original.  The only areas you may have to touch up will be along the quadrant dividing lines.

 

 

 

 

CellGrid2

CellGrid2 is a very useful utility written by Richard Ludowise that you might want to consider using in conjunction with EZ-Landclass.  It can be found in Avsim.com and various other flightsim web sites.  What it does is draw an LOD13 grid pattern over the landscape that is visible in MSFS.  Of course this grid is exactly the same grid that landclass textures are placed in, except for the fact that landclass textures will appear centered over the vertices, not the center of the cells. It is very helpful when placing textures to have a visual indication of where they will appear.  One drawback is that CellGrid2 does not fill up the entire LOD5 square with this grid, it only fills up an LOD8 square, which is about 20 or 30 miles to a side.  You may have to re-position the grid one or more times, depending on the extent of the area you are working with.  To position the grid, you need to prepare a text file (several examples come with the program) that has a call to a function called CellDefine x, y.  The necessary x and y values can be calculated as follows:  x = Trunc((180 + Lon) / 0.46875) and y = Trunc((90 - Lat) / 0.3515625)

 

Detailed Landclass

There is a limit to how accurate you can be with landclass textures.  As mentioned above, the smallest unit of area you can assign is approximately 1.2km square.  You will also notice that FS blends the landclass textures that you assign with the surrounding textures.  If you want to do more detailed work, such as creating smaller areas that have distinct borders, you need to use something called VTP polygons.  There are some very good programs available to do that type of scenery design work.  Two that I know of are LWMDraw4 by Ken Nelson and Ground2K by Christian Fumey.  There may be others as well.

 

One thing that should be mentioned regarding these programs is that when you use them to create islands where there was previously only ocean, or you extend a coastline out into existing ocean, you will need to define suitable landclass textures in the underlying cells in order for your island or coastline to appear.  For instance, if you have defined an island that fits in one LOD13 cell, you will have to define four landclass textures, one for each vertices surrounding your island.

 

Feedback and Problems

If you have any comments, or are having problems with the program, you can email me at russdirks@yahoo.ca.

 

Please note that it is pretty easy to "break" this program.  All you would have to do is rename or delete a sheet and the program would no longer work.  I could have written the program in such a way that everything was locked down and protected, but I didn't want to take the time.  If you "break" the program, simply download a new copy from the web.

 

Revision History

 

DECEMBER 2006, VERSION 3.00

     - Added support for FSX

 

AUGUST 2003, VERSION 2.00

- Added support for waterclass textures

- Now uses FSConnect to interface with MSFS rather then FSUIPC

 

MAY 2003, VERSION 1.01

 

     This patch resolves the following two issues:

- Users of non-English versions of Excel were experiencing error messages on program startup and shutdown.

- EZ-Landclass was producing corrupted .bgl files on computers that were configured to use the comma as the decimal separator (locale settings in Control Panel).

 

MAY 16, 2003, VERSION 1.00 

- Initial release

Credits

Credit must be given to John Cillis for writing Landclass Assistant - the first freeware landclass program - which was my inspiration for this program. Also, to the many people in the Avsim scenery forums, who by sharing their knowledge of the scenery SDKs, made this program possible.

 

References

If you want to learn more about landclass scenery design, I would suggest you spend some time reading through the scenery SDKs (Software Development Kits) on the FS2002 Insider Web site.  Also, Christian Stock has written a very informative tutorial on the subject.  Do a search for "tmf_manual.zip" using your favourite search engine.

 

Legal Stuff

EZ-Landclass, and associated documents and files, are copyright © by Russel Dirks (Dirks Software).  EZ-Landclass is distributed as Freeware.  You may copy and distribute this program at will, however you may not charge money for it.  Any scenery you create using this program can only be distributed as FREEWARE, and must include mention of EZ-Landclass in the credits.  Use this program at your own risk.  The author accepts no liability for damage (real or imagined) caused to your computer while using this program.