KML Building Importer - User Guide

Building generated from KML in GermaniumWeb


The KML Building Importer takes in .KML files and generates a simple building using the floorplan images within the KML files. The generated levels have a 3D volume, giving it a stronger presence in the 3D space.

This user guide explains how the various properties in the KML file relates to the generated KML building in GermaniumWeb.

BBL of the imported KML building

GermaniumWeb's BBL concepts are represented by the directory structure of the KML. The basic structure for the building directory is the root building folder, containing 1 or more block folders. And in each block folder, 1 or more image overlays.

Directory structure in Google Earth and the exported result

GermaniumWeb will attempt to create only one building from each .KML file loaded. If the exported KML file does not follow such a directory structure, GermaniumWeb will attempt to recreate it using the following rules:

  • There is no folder, ie. only an image overlay, GermaniumWeb will create Default Building, containing Default Block to contain the level.
Directory structure in Google Earth and the exported result

  • Only 1 folder containing the image overlays, GermaniumWeb will treat the folder as a Building, and create a Default Block to contain the levels.
Directory structure in Google Earth and the exported result

  • If there are more than 2 layers of folders, or when the image overlays are not found at the same depths, GermaniumWeb will search for the first image overlay in the structure, and take its parent's parent folder(ie. grandparent folder of the image overlay) and use it as the building folder. Folders and overlays located outside of the building are all ignored.

Location of the imported building inside GermaniumWeb

The location of the KML building in the GermaniumWeb scene is defined by an origin placemark.

The origin placemark must be:

  • placed inside the Building folder.
  • named 'origin'

The origin placemark marks the origin of the GermaniumWeb scene in the Google Earth space.

Origin placemark defined in Google Earth

If no origin placemark is in the Building folder, the origin is assumed to be the center of the overlay image. Note that by this definition, the origin will 'move' if the floorplan images are changed.

left: Imported KML in GermaniumWeb with the Origin placemark defined above in the previous image.
right: Imported KML in GermaniumWeb when no Origin placemark has been defined.
(The yellow pushpins are added for illustration only. They are not generated when you import the KML.)

It is especially useful to set the origin if you intend to import multiple KML buildings into a single GermaniumWeb scene as shown below.

These 2 buildings have their origin placed at the same location. Note that there are 2 placemarks that placed over each other therefore appearing as one.
The 2 buildings when imported into GermaniumWeb. Observe that their relative position are maintained.
(The yellow pushpins are added for illustration only. They are not generated when you import the KML.)

BBLIds in KML Files

The BBLIds of KML imported buildings, blocks and levels are their building names, block names and level names respectively. For duplicate Block or Level names, GermaniumWeb will append a counter behind the original name and use it as the BBLId. For example, 2 levels with the same name "Level", will have BBLIds "Level" and "Level_1" respectively when loaded into GermaniumWeb.

Levels below the ground level

Note: This section is only relevant if you are using Google Earth versions prior to version 5

Some buildings will have basement levels that are below ground level. However, Google Earth's interface prior to version 5.0 did not allow the user to enter negative altitude values. When creating these basement levels, you will need to edit the KML file manually.

Manually editing the altitude value

To use a negative altitude for an image overlay:

  1. Add the basement floorplan as an Image Overlay inside Google Earth. Assign it any altitude value.
  2. Save the KML file in Google Earth
  3. Open the KML file in any text editor
  4. Find the Basement Image Overlay which you want to change the altitude to negative. You can locate it by the name and description of the image overlay.
  5. Change the value between the <altitude> and </altitude> tags to your desired altitude value. If the <altitude> tag is not present, simply add it between the <GroundOverlay> tags.
  6. Save the changes
  7. Load the edited KML file in GermaniumWeb. You should observe the layers are correctly stacked up.

Note that you should not alter any other values in the KML file or it may fail to load in GermaniumWeb.

Thickness of generated Levels

The thickness of the pink level is one fifth the altitude difference with the blue level below it.

The thickness of the 3D is relative to the difference in the altitude between the current Level and the Level below it. The thickness is one fifth of the altitude difference.

The thickness of the bottommost level is the same as the level above it. If there is only one level, it is given the default thickness of 1m.

Floorplan images to generate the levels

The model generated in GermaniumWeb is dependent on the floorplan images used. GermaniumWeb uses the alpha channel of the floorplan texture to create the 3D model. To create the alpha channel, you can use Adobe Photoshop2 or any other image editing software that allows you to create and save image formats with alpha channels. For the floorplan images, you should use the following image formats PNG (32-bit), TGA (32-bit) and BMP (32-bit) that supports alpha channel.

Working on the alpha channel in Photoshop:

  • Inside Photoshop, open your floorplan image.
  • On the file title bar, check that the image mode of your floorplan is in RGB, else go to Image: Mode and select RGB color.
  • In the Layer Manager, check that the background layer is unlock, else
    1. Right click on the background layer and select "Duplicate layer...".
    2. In the field "As:", enter a name for the duplicate layer of the background image and click "OK".
    3. The duplicate layer will appear on top of the original Background layer. Select and delete the original locked Background Layer in the Layer Manager.
  • Use the photoshop tools (magic wand, etc) to select the parts of the image that are not within the building floorplan
  • Press the 'delete' key to delete the selected regions. You should see the grey and white checkered pattern underneath the layer.
  • Save the image. Menu: File > Save as... Select PNG(*.png) in the Format combo box. and save your floorplan texture

Improving the generated 3D model

If the 3D model does not show up correctly, it is very likely that the alpha channels are too complicated for GermaniumWeb to process. GermaniumWeb makes a best effort at trying to guess the 3D model from the alpha, but this is not always successful. Hence, try to keep the alpha channel of the image clean, by keeping the floorplan edges smooth and remove unnecessary text.

Aligning the Floorplan Images

While the floorplan images are independent from each other, if the actual floorplans are similar to each other, it is useful to have the images aligned with each other. Align the images such that they share the same dimensions and the floorplan in the images are of the same scale. This will help you duplicate the levels quickly in Google Earth later.

Aligning the floorplan images in Photoshop:

  • In Photoshop, open both floorplan images to be aligned. We will refer to them as floorplan1 and floorplan2 respectively. floorplan2 is the reference image which we want floorplan1 to align to.
  • Check that both floorplan1 and floorplan2 are in RGB mode and the background layers are not locked, else refer to "Working on the alpha channel in Photoshop" to change the image mode and unlock the background layers.
  • With the windows of floorplan1 and floorplan2 side by side in Photoshop, select and drag the background layer in Layer Manager in floorplan1 over to floorplan2 window and drop it anywhere on the canvas. You should now have floorplan1 as a new layer over floorplan2.
  • In the Layer Manager, reduce the opacity of floorplan1 layer. You should now be able to see floorplan2 through floorplan1.
  • Menu: Edit > Free Transform. Adjust floorplan1 so that it aligns with floorplan2 nicely.
  • Apply the transformation.
  • Return the opacity of floorplan1 layer to 100%.
  • Select and delete layer containing floorplan2 in Layer Manager.
  • Save the new floorplan1 image. Menu: File > Save as... Select PNG(*.png) in the Format combo box and save your floorplan texture with a different filename to prevent overwriting of the original image.

Filepaths within the KML file

Depending on where the file is saved, Google Earth may use either relative or absolute filepaths for KML files. It is important to know this when you are moving the KML files.

A suggested workflow is to place all the floorplan image files in a single folder. Then, using Google Earth, save your KML file in that same folder as well. Google Earth will use relative pathing to save the KML file if the image files are located at the output directory.

To verify if your KML file is using relative paths, after you have saved your KML file,

  • Open the KML file in Google Earth again.
  • Go to the image overlays you have added.
  • Right click on an image overlay and select properties.
  • Check that in the Edit Image Overlay window that pops up, under Link, the path to the floorplan image is relative.


I have added several Image Overlays but I only see the ground Image Overlay in Google Earth

  • In Google Earth, under Layers, check that Terrain is unchecked.

The KML file fails to load in GermaniumWeb

  • If your GermaniumWeb application is web-hosted, check that your KML file is web-hosted as well.
  • If your GermaniumWeb application is locally-hosted, check that your GermaniumWeb plugin version is 1.27 or newer.
  • Check that the floorplan images used by the KML file are all found at their correct location.
  • Check that the KML file adheres to the Directory Structure.
  • Check the alpha channel of the texture. For some very complex floorplan contours, GermaniumWeb is unable to construct the floorplan in 3D.

My KML file only has information for one image overlay after I saved it?

  • Check that you have selected the Building folder when saving the KML file, and not just one of the Image Overlays.

The levels are stacked very closely to each other despite a having a large height.

  • Check the scale of the floorplan in Google Earth. Remember that the floorplan area and its height are relative to each other. Therefore, if the floorplan has too large an area, the height will seem insignificant comparatively.

The displayed 3D model does not have the holes present in the floorplan image

My question is not covered here.

  • Check out the GermaniumWeb Forum. Your question may have been answered there already. If not, you can post your question and the forum users or moderators will reply to it shortly.
  • Contact the GermaniumWeb Team.

1 Google™ and Google Earth™ are registered trademarks of Google Inc. in the United States and/or other countries.

2 Adobe Photoshop™ is a registered trademark of Adobe Systems Inc. in the United States and/or other countries.

Retrieved from ""

This page has been accessed 3,494 times. This page was last modified on 18 February 2010, at 03:13.

Building Creators


KML Building Importer
- Tutorial
- User Guide

Building Composer
- Overview
- Download
- User Guide
- Troubleshooting

File Migration Guide

Modeling For Real-Time 3DUpdated

Building Creator FAQ