FSX KML Tutorial: Difference between revisions

From FSDeveloper Wiki
Jump to navigationJump to search
Line 29: Line 29:
Unlike land class tiles, land class POLYGONS can be any shape and size.
Unlike land class tiles, land class POLYGONS can be any shape and size.


== Creating waterclass tiles ==
== Creating water class tiles ==
 
Like land class tile, water class tiles are approximately 1.2 square kilometers in size.
 
You can use water class tiles to classify inland and ocean water bodies.


== Creating coastline ==
== Creating coastline ==

Revision as of 11:09, 2 September 2007

Introduction

This is the tutorial for FSX KML.

FSX KML is a freeware scenery design tool for Microsoft Flight Simulator X (FSX).

Creating land class tiles

Land class tiles are approximately 1.2 square kilometers in size. You can use land class tiles to cover vast areas of the FSX world with the appropriate land class coverage.

FSX KML will process your land class polygons in the order the appear in the KML thus allowing "layering" of land classes.

Say you want to create a large rain forest area with a small town in the middle

In Google Earth

  • Draw a polygon representing the forest
  • Draw a smaller polygon inside the forest which represents the town
  • Save the KML file

In FSX KML

  • Open the KML file
  • Tag the forest polygon with LandClass_TROPICAL_RAINFOREST
  • Tag the town polygon with LandClass_SMALL_CITY_SUBURBAN_NON_GRID_WET

Creating land class polygons

Unlike land class tiles, land class POLYGONS can be any shape and size.

Creating water class tiles

Like land class tile, water class tiles are approximately 1.2 square kilometers in size.

You can use water class tiles to classify inland and ocean water bodies.

Creating coastline

Creating rivers and lakes

Creating islands

Islands are created by cutting holes out of water polygons using the POLYGONHOLE tag.

Lets say you want to create a lake with an island:-

In Google Earth

  • Draw a polygon representing the lake
  • Draw a polygon inside the lake that represents the island
  • Save your KML file

In FSX KML

  • Open the KML file
  • Tag the island polygon with a water polygon tag, eg Hydro_Polygons_Generic_Lake_Perennial
  • Set the elevation of your lake, click the vertices tab, then the edit button, then the "Set Elevation" button and enter the elevation of the lake
  • Tag the island with the POLYGONHOLE tag

Important:
Polygon holes must be placed immediately after the polygon they operate on. In other words, the polygon hole is associated with the preceding polygon. Additionally the polygon and polygon hole must be in the same KML folder.

Direction of polygons

  • The SDK tool Shp2Vec requires that polygon holes are drawn in the opposite direction to polygons.
  • If you are using Google Earth, all polygons are written to the KML file in an clockwise direction irrespective of how they were drawn. FSX KML has the build option "Automatically Reverse Points In Polygon Holes" which will automatically reverse the direction of polygon holes. This is on by default because it is assumed most users will use Google Earth to create their KML files.
  • If you have not used Google Earth to create your KML file you may need to manually reverse the direction or your polygon holes. You can use the "Reverse Points" button to do this. Also make sure you turn off the build option "Automatically Reverse Points In Polygon Holes".

Related forum posts

http://www.fsdeveloper.com/forum/showthread.php?t=5516

Creating roads and moving traffic

Creating bridges

Related forum posts

Extrusion bridge sample can be found here http://www.fsdeveloper.com/forum/showthread.php?t=5516

Creating a bush landing strip

Standard airports in FSX always appear flat and without sloping runways. But there is an easy way to create sloping bush landing strips using land class polygons.

In Google Earth

  • Draw a polygon that will represent a grass clearing
  • Draw a smaller polygon inside the first one that will represent the landing strip.
  • Save the KML file

In FSX KML

  • Open the KML file
  • Tag the 1st polygon (the grass polygon) and tag with LandClassPoly_Grass

Since FSX will draw grass with a higher priority than dirt, we need to make a hole in the grass so that our dirt will show through.

  • Highlight the 2nd polygon and click the copy button. Tag it with PolygonHole.
  • Tag the 3rd polygon with LandClassPoly_Dirt

When your done you should have the following polygons in your KML file (and in the order shown below):

  • Polygon1 - LandClassPoly_Grass
  • Polygon2 - PolygonHole
  • Polygon3 - LandClassPoly_Dirt

Placing scenery objects

Excluding scenery objects

Flattening terrain around an airport

In GE

  • Draw a polygon

In FSX KML

  • Tag the polygon with the Airport_Backgrounds_Flatten_MaskClassMap_ExcludeAutoGen
  • Set the elevation of the polygon to the elevation of the runway. You can do this by clicking the Vertices tab and then clicking the Edit button. Then click the Set Elevation button and enter the elevation of the runway.