Loading 3D-KML/KMZ or Collada-models into Virtual Earth

So you want to load your 3D-models into Virtual Earth. You have heard already about Virtual Earth 3dvia and Caligari trueSpace but you already have some models and they are in KMZ or Collada formats. Well there is good and bad news. The bad news is that neither 3dvia nor trueSpace support KMZ or Collada directly. The good news is that with a little detour there is a way to make that happen.

Caligari trueSpace does support data import from a variety of formats, including Wavefront obj-files. Recently I discovered Blender. Blender is a free open source 3D content creation suite, available for all major operating systems under the GNU General Public License. Blender does support import of Collada and export into Wavefront files. A 3D-KMZ file is basically a Collada-file with some optional textures and additional KML. You see where that is going? OK let’s run through it.

Step 1: Importing KMZ into Blender

So let’s start with our KMZ-file. Rename it into *.zip and decompress the file.

image

This will inflate the following files and folders.

image

In the folder models you will find your Collada-files (extension *.dae).

Start Blender and select Import from the File-menu. In the sub-menu select the Collada 1.4 format.

image

In the next dialog select the file to import and click on “Import and Close”.

image

Now the result might look a bit weird but that is only because of the scale-defaults in Blender. From the menu View select “View Properties”…

image

…and set Spacing to 10 and Clip End to 10,000.

image

OK, better but let’s also see the textures. From the draw type menu select “Textured”

image

Step 2: Export into Wavefront *.obj-format

From the Select-menu select “Select/Deselect All”.

image

Now from the File-menu select Export and then “Wavefront (.obj)”.

image

Set the export options as shown below. Especially the “Copy Images” option is important. If you want to use the Virtual Earth API to load the 3D model in your own custom application you might also want to set the Triangulate option.

image

Step 4: Importing the OBJ-file into Caligari trueSpace.

Don’ use the “TS6 Files => Load => Object” method. This method would loose the textures. Some smart guy developed a trueSpace extension which keeps the textures when importing Wavefront OBJ-files. If it is already activated you’ll find the “OBJ”-button at the bottom of the workbench. If it isn’t click the button to add the extension…

image

…and navigate to the subfolder tsx/luuv in the trueSpace Program-folder

image

Now import the OBJ-model using the OBJ-button. Select the model…

image

…and here we have it in trueSpace.

image

Step 5: Export into Virtual Earth

If necessary adjust the scale of the scale of the model. Then click the export-button in the bottom-right corner. Check the settings and click export

image 

And finally here we go:

image

Advertisements
This entry was posted in Virtual Earth. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s