Blending KML
Update: We're hiring python programmers to write a car navigation system in our earth rendering engine (a la Google Earth).
Google is the best thing that's happened to Keyhole. They've transformed a cool visual toy into a platform for GIS information, and the key to their success is twofold. First is the open KML (XML) file format - anyone can make simple content. Second, Google Earth is free for limited use. The combination is magic - developers are eager to create content, consumers are eager to view this content, and Google gets rapid desktop application adoption and the ability to roll out future advertising.
The KML format is easy enough to read and write by hand for small amounts of meaningful data, like placemarkers and pointers to raster files for ground overlays. What's currently lacking is a free way to convert lots and lots of meaningless data, like 3d models. There are a few commercial tools out there, most notably SketchUp (recently purchased by Google, 8 hour trial available), but nothing free for the casual hacker... until now.
kml_export.py is a python script for blender that supports meshes and diffuse lighting. Not much, I know, but KML doesn't support much 3d. This is really a quick-release, rough cut, leaves much to be desired release - but it gets the job done.
Installation:
- Put kml_export.py in your Blender scripts directory
(windows = "c:\Program Files\Blender Foundation\Blender\.blender\scripts",
mac = "/Applications/Blender/blender.app/Contents/MacOS/.blender/scripts",
linux = "~/.blender/scripts"?) - Edit kml_export.py to adjust the placement constants (lat, lon, altitude, scale)
- If you're using Windows, you'll need to download PyXML. Unarchive the PyXML folder and move the "xml" subdirectory to the same folder as kml_export.py.


18 Comments:
Awesome info! Now I just need to figure our Blender. Thanks!
11:11 AM
I fear you, Vin.
3:48 PM
Hi ynniv
I have some things to understand. When you say "put the kml_export.py" you mean we have to make a .txt file with that and put in the folder you say? We have to name that file kml_export.py?
Other issue: WHen I run the software there´s an error that says: Can´t create a new surface. Out of video memory.
I have an Athlon 64, video on board 64 MB. I need a graphic card?
11:24 PM
anon: kml_export.py is a python script file that you need to download and place in the blender directory that contains the other blender export scripts, like 3ds_export.py. The appropriate directory for your OS should be listed above.
I'm new to blender myself, and I can't help you with application problems. Any modern graphics card should be able to run blender, but you might not have appropriate OpenGL drivers (Microsoft doesn't like OpenGL - try installing drivers from your graphics card vendor). You will probably find better advise at the blender support forums. I recommend searching the forums before posting to them, since it is likely that many people have already had the same problem.
2:55 PM
I am a blender user, and now, then there is a free version of sketchup (that sadly only exports KML)I am wondering, can you try and write a script for importing KML into blender?
6:59 AM
It would be nice to be able to use this growing library of KML models in Blender. I'll take a look at importers and see what I can do.
8:27 PM
There is this, but it says explicitly it is not GE4-compatible (at least yet, probably meaning the latest KML 2.1 extensions):
http://jmsoler.free.fr/didacticiel/blender/tutor/py_import_kml-kmz_en.htm
2:44 PM
Me again about XML Package missing and xml.dom.minidom
Fixed.
Must donwload Python, install, then copy lib/xml sub dir in .blender/scripts sub dir
thanks
5:14 PM
Good job!
1:12 AM
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
1:45 AM
Please write anything else!
2:21 AM
Nice Article.
2:50 AM
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
3:20 AM
Thanks to author.
3:50 AM
Please write anything else!
4:26 AM
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
5:09 AM
Good job!
5:47 AM
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
6:21 AM
Post a Comment
<< Home