A few months ago I posted a Google Earth add-on which used a large 3D model hemisphere with a full-sky cloud image plastered on the inside to create fake sky backdrops. Turns out, with a little bit of KML magic you can do pretty much the same thing with the new panoramic Photo Overlay feature in Google Earth 4.2.
This is a PhotoOverlay sky centred on the Swiss Alps:
PhotoOverlay Skydome (30kB)
Opening the file takes you straight inside the panorama. When you click ‘exit photo’ the dome remains visible, enabling you to fly around the inside the same way as the 3D model version. If you move too far away from the dome it disappears, replaced by an Icon. Double click on this Icon or the label under the ‘Places’ panel to re-enter it.
Compared with my 3D model version this has the advantage of being very quick to put together from scratch. The key is to use a very large spherical Photo Overlay, with a field of view covering just the top half and Camera altitude set at, or very near ground level. Here’s the KML stripped to its basics:
<?xml version=”1.0″ encoding=”UTF-8″?>
<coordinates>8.230, 46.707, 0</coordinates>
- The <ViewVolume> attributes tell GE what proportion of the sphere to display. A complete sphere would have a <bottomFov> value of -90. Here I just want the top half so I set this to 0.
- The radius of the sky dome is given by the <near> value. 20,000 metres in this case. Note, if this value is too large, GE won’t fully render it.
- On mountainous terrain the <Camera> altitude is tricky to get right. Too low and GE finds it impossible to fly inside to view the panorama in photo-mode. Too high and there’s a visible gap between dome and the ground.
- The <Point> coordinates aren’t absolutely necessary, but do ensure there’s an Icon when the dome itself isn’t visible, which is useful.
For the image you need a 360 degree panoramic cloud photo. The one in this file is an equirectangular image (sky12.jpg) from Philo’s Sky Collection. I chopped off the bottom half of the original and reduced it 1024 pixels wide. High resolution images would need splitting into smaller tiles and the creation of an <ImagePyramid>. For further info check out the new KML topics documentation here: http://code.google.com/apis/kml/documentation/topicsinkml.html