Sunday, August 16, 2009

Importing a Google SketchUp model (Part 1)

You may be wondering how to load your own model (or other people's models) in GermaniumWeb. This is what I'm going to talk about in this article (It'll prob take you 15-20 mins to follow with hands-on). Here goes:

The GermaniumWeb API has a Load() method that can be use to load a building model with a xlcl extension. However the details of this xlcl is at best sketchy. The good news is there's a tool that allows you to roll your own xlcl file, sort of. Let's see how we can use this tool to import a SketchUp model from the Google 3D Warehouse.

To follow this tutorial you must first install GermaniumWeb and Building Composer.

  1. Find a nice model from the warehouse, preferably a room. For this tutorial, we'll be using this model.

  2. Under [Download Model], download the COLLADA (.zip) file. In some cases only the SketchUp skp file is available. Not to worry, simply open the skp file in SketchUp and export it as KMZ file. Then rename the file extension from KMZ to ZIP.

  3. Extract the ZIP file somewhere. Use Windows Explorer to locate the folder that contains the COLLADA (.DAE) file. It's usually in models/. Keep it open.

  4. Launch Building Composer. Drag the .DAE file from Explorer into the colorful background of Building Composer. You'll see a couple of boxes appearing. Drop the file in the box above ground.



  5. You have just imported a level. To finish, goto Export > Export Scene. Select a location to save the xlcl file and other associated files. Cross your fingers ;-)

  6. Congrats! If you have reached here, export must be successful. Go to Export > View Exported Scene. This will launch your browser to view the file you've just exported using GermaniumWeb. The result:



Wait a min. That doesn't look right. What happened??!

Hmm, Google SketchUp seems to be doing something wrong. But not to worry, it's quite easy to fix and that's coming right up.

No comments:

Post a Comment