Google Earth in Google Earth in a Browser
Since the new Google Earth browser plugin was released last week, I’ve been trying hard to resist the temptation to simply throw giant KML files at it
. Instead focusing on stuff which wouldn’t be practical using regular Google Earth.
Anyway, I’ve cobbled together a simple interactive animation using the API. Similar idea to my earlier (rather lame) bouncing Google Earth 3D model.
- http://www.barnabu.co.uk/geapi/bounce(
Windows only at the moment. And only tested in Firefox 2 and IE7.)
OK, it’s not very sophisticated, but the thing to note is this isn’t the Plugin running a KML time animation. Instead, its a fully scripted animation, moving a standard SketchUp model in real time. This means we can do several things which just aren’t possible in Google Earth:
- Have options to change every parameter to do with the location and physics (Just location and drop height implemented at the moment).
- Include a range of camera settings to view the animation from different frames of reference. Notably a tracking camera, and some from the point of view of the moving 3D model - very cool how well these work.
It’s a pretty flabby/messy piece of scripting at the moment, but if anyone does want re-use any part of the script please feel free.
Related posts:
Heh! Lots of fun. Ok, here’s my couple of suggested tweaks - 1) allow higher for the maximum height; and 2) have a look down, but with the Earth model in view (may a few meters above the Earth model so you can see the Earth and the ground).
I’ve upped the altitude cap to 1000000m. Be some time before it hits ground.
I actually did try following the model with a camera, but it completely disappeared above ~ 1km. Presumably GE’s clipping plane - e.g. GE doesn’t expect people to view models above that height so doesn’t bother displaying them. Have to see if there’s a workaround. Annoying otherwise.
Hi,
I’m trying to experiment with this code with my own model using sketchup, to bounce other objects! I tried using this horse model:
http://sketchup.google.com/3dwarehouse/details?mid=e0af5f1ed9ee818fd3e9b23535508184&prevstart=0
and downloaded the collada (kmz) file. I upload this to a server, and change the value of MODEL_URL.
However, I get the error message ‘line:420 Error ‘model’ is null or not an object.
Having looked at the contents of the kmz, the package is organised differently to your globe model, which I suspect is the cause of the problem. So far I have not been able to work out how to fix it. Any suggestions much appreciated.
correction to the previous comment: I no longer get the error, but the model does not appear (or perhaps is transparant?).
Thanks