EZ-Landclass is a program that allows you to change the landclass textures that appear in the Microsoft Flight Simulator 2002™ (MSFS). MSFS comes with a wide variety of generic textures, such as cities, farmland, forests, grassland, and many others. Microsoft did a pretty good job of placing the textures in the right place, considering they were dealing with the entire world. However, when you look at it from a local perspective, there is often much room for improvement. Often times small cities are left out, or forests appear where there is supposed to be farmland. EZ-Landclass allows you to change that.
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 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 texture you want to appear at that location.
INSTALLATION
Simply unzip the program into a folder of your choice. The first time you run the program, an .ini file will be created automatically.
REQUIREMENTS
1. FSUIPC.DLL. This is an add-on module written by Peter Dowson that allows programs to communicate with MSFS. You can obtain it at http://www.schiratti.com/dowson.html. You should consult the documentation that comes with the package to determine installation instructions, however you usually just unzip the package and copy the file FSUIPC.DLL to your FS2002\MODULES folder.
2. Resample.exe. This is a program that comes with the Microsoft Flight Simulator 2002 Scenery SDK, and is used by EZ-Landclass to produce scenery files. It ships with EZ-Landclass, so you shouldn't need to take any action here. If for some reason you didn't get Resample.exe, or it got erased, you can download it at Microsoft Flight Simulator Insider. Look under "Flight Simulator 2002 Scenery SDK's", and then download "Custom Terrain Texture".
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. EZ-Landclass was scanned for viruses prior to distribution using the latest virus definitions available at that time. If you are still concerned, you can always scan the file yourself using your own anti-virus software.
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 Resample program mentioned above. If not, click on the Browse button to locate the file.
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. Click Ok
A Quick Word About Projects and LOD
A project corresponds to one LOD5 cell. "What's that?", you ask. Well, 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. (If you want to work with smaller areas, try these programs.) Based on this, you would think that a landclass scenery file would contain a grid of 256 x 256 data points. Actually, it's 257 x 257. To find out why, click here. You'll definitely need to understand this if you find yourself working near the edge of an LOD5 cell. If you want to learn more about LOD grids and other scenery theory, I refer you to the "Custom Terrain Texture" SDK.
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 of that 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 value that you want to appear at that location. It's as simple as that! Click here for information on the different types of landclass 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, select "Make Scenery File" from the EZ-Landclass menu. This will create a file called <MyProject>.bgl, where <MyProject> is the name of your project. Copy this file into a SCENERY folder somewhere on your hard drive, and add this as a scenery area from within MSFS (World / Scenery Library / Add Area). TIP: just create the Scenery folder underneath the folder you specified for your project. Make sure the Scenery folder you create DOES NOT have a corresponding "Texture" folder. The scenery will not display properly if it does.
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. MSFS must be in pause mode or slew mode for this to work.
Here's another tip. You'll notice that once MSFS is "displaying" your scenery, you won't be able to copy a new, revised version of the scenery into place because it will report that the file is in use. Simply go into the scenery library and de-activate that scenery (you don't have to delete it), then click on Ok. You will then be able to copy in your new version. To see it, don't forget to reactivate the scenery!
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 very 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
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.
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, where you will find a list of all landclass textures, grouped by type, with a brief description of each.
Another option is to download the companion product to EZ-Landclass, called "EZLC Landclass Gallery.zip", available on Avsim.com. This is a collection of .jpg screenshots showing each texture.
And lastly, you can add the file "Texture Gallery CEE8.bgl" (supplied with EZ-Landclass) into MSFS as a scenery area, and then start a flight from airport CEE8 (Its in Alberta somewhere), and switch to top-down view. 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.
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
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)
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 ezlc_feedback@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.
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.
Legal Stuff
EZ-Landclass, and associated documents and files, are copyright © 2003 by Russel Dirks. 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.