Friday, 28 September 2007

Avoncroft Stable in SpiV Shockwave

The Avoncroft Museum in Bromsgrove has a fine collection of old buildings and is open to the public from March through to December. It has been an ideal place to obtain images for 3D modeling, as the buildings are well spaced out and you can get photos of most of them from all sides. There is also a wide range of building complexity, from very small, simple builings to larger and more complex structures. The wood frame and brick stable presented here is the first of a series of building models from Avoncroft.

This model was created with the help of Google Sketchup, Realviz Imagemodeler and VTour, e-on Vue6 Infinite and Photoshop CS2, amongst other more minor utilities. The method I use is certainly not the fastest, but it does give good results, so I'll outline the workflow.

The photos were taken with a Canon EOS 350D with a nice wide 10-20mm Sigma lens. It always amazes me that "high zoom" is used as a selling point for consumer cameras - give me wide any day! The Sigma has very low distortion, but I still put the photos through DXO Optics Pro, which does a fine job of removing what distortions there are along with sprucing up any areas with dodgy exposures - always a risk when photographing buildings against a bright sky.

I use Imagemodeler for the first modeling step, just pulling out the principal points of the building to make sure the model ends up with the right proportions. I could have jumped straight to Sketchup in Match Photo mode, but I find that I get better results by starting with ImageModeler. Once Imagemodeler has given me the principal points, I export a dxf and import that to sketchup for the main modeling task. I could of course do the whole model in Imagemodeler, but Sketchup is faster, easier, more stable and allows export to 3D Warehouse. Using the imported points as guides I rough out the basic building structure. Starting from one of the larger faces, I then dip into Photoshop and create a perspective-corrected texture image from the source photos. This step is very easy, using the crop tool with the perspective box ticked. The thing to remember about this tool is that the proportions of the resulting rectangular image will rarely be correct. One day I'll work out under what conditions the proportions come out right. However, for the purposes of modeling it does not matter, since the Imagemodeler work ensures the proportions of the face the texture is applied to are correct, and the texture proportions are automatically corrected. This is also a good place to 'shop out anything you don't want in the textures. From here it is a matter of business as usual in Sketchup, using the applied textures as a guide to detailing.

Once the building model is complete, the next step is to get it into VTour for the SpiV treatment. Export from Sketchup is in obj format - the freebie version won't do this, but it may be possible going via Blender or Flux Studio. I prepare a 360x180 degree panorama in Vue, which gives great skies, and grab a ground texture which then gets the seamless tile treatment in photoshop. All that goes into VTour via some judicious editing of a pre-calibrated rzml file. The final step is an export to SpiV:

There are many ways to embed 3D in a web page, but SpiV is one of my favourites as it affords reasonably easy navigation. The drawback is that you must have Shockwave installed (apparently about 50% of people have). Unfortunately there is no linux version of Shockwave available, so I am exploring some alternatives. Hopefully I can find one that is free, takes advantage of 3D hardware, has sane environment navigation controls and is truly cross-platform

Thursday, 20 September 2007

GE Object Movie Snapper

Update: The GEAirlines plugin and Vista don't seem to like eachother, so it looks like XP only.

I've uploaded the web page utility I use to make QTVR and Flash object movies from Google Earth. The GE Object Movie Snapper automates the process of grabbing a set of still images suitable for compiling into an object movie.

There are still a few enhancements I want to make to this, such as giving some feedback of progress. There also seems to be an issue with the eye altitude jumping about with terrain height on some movies. For a future version I want to include the ability to look outwards and grab images for 360° panoramas.

Before it can be used you will need:

Note: The page works with IE7 and FF2. Opera doesn't like the plugin and Safari doesn't like the javascript.

At the bottom of the page are a number of input boxes. You can set the parameters in any order, but I find the following sequence works well:

First set the root filename for the image set. Images are saved in the form 'filename_<row>_<col>.bmp', where <row> and <col> are the row and column numbers of the image, counting from zero.

Navigate to the desired location and click 'Get Position' to load the latitude, longitude and range. These parameters can be set manually if desired.

If a full azimuth object movie is needed leave the Minimum and Maximum Azimuth settings as they are, otherwise set them as desired. Buttons are provided for each to grab the current view.

Set the number of Azimuth steps. The default of 24 results in full azimuth object movie stills taken at 15° intervals.

Set the Top and Bottom Elevation angles. An elevation angle of 0° is looking straight down and one of 90° is a horizontal view. Usually it is best to set the Bottom Elevation angle to a couple of degrees less than 90 to avoid the viewpoint going underground.

Finally set the Altitude of the point at which the object movie will focus on. This value is in meters relative to the ground at the chosen latitude and longitude.

Note that using the "Get Position", "Get Latitude" and "Get Longitude" buttons after a non-zero altitude is set will result in their values changing to the point on the ground projected beyond the elevated focus point from the current view point!

Click the Preview button and the view will cycle through the image views you have defined. This has the added bonus of pre-loading the Google Earth cache.

Once you are happy with the settings make sure the browser window is large enough to show the entire plugin box and click the Snap Image Set button. The screen grab won't work properly if the whole image isn't visible! The instructions at the top of the page will disappear and the images will get saved to C:\Documents and Settings\USERNAME\Local Settings\Temp\GEAPlugin.

Hover over the bottom left of the image area until the navigation gadgets fade out before snapping the image set, otherwise it will appear on all the images. The snapped image size is 640x480 pixels, and is fixed in the "content" div size. The script does very little range and sanity checking on the input parameters. Crazy in, crazy out.


Having been a fan of on-line 3D environments from V-Chat, Activeworlds, 3dAnarchy/Adobe Atmosphere through to Second Life, I came across this interesting development today. Metaplace describes itself as a "next-generation virtual worlds platform designed to work the way the Web does".

Metaplace is an online gaming oriented development from Areae, headed by Raph Koster of Ultima Online fame. Here Raph demonstrates some Metaplace features:

He discusses it further at his website. A little more detail and some screen shots are at TechCrunch40. GigaOM have a particularly interesting article.

The demonstrations so far have been 2D or isometric. This is not too surprising in the light of Raph's recent paper Designing for Everywhere, in which he examines the features of various online games and implies that factors other than the display method are the secret of mass popularity. However, there does appear to be a 3D terrain editor in an a related flickr photoset, which indicates that Metaplace will move to encompass 3D too.

Saturday, 15 September 2007

Automated Object Movie Creation

Having made a couple of object movies from Google Earth by hand, I don't particularly want to repeat the experience! It is repetitive and takes ages: select a viewpoint; grab the screen; give it a filename; repeat 168 times. I had a look at the Google Earth COM API which allows scripting of view positions, but unfortunately its screen capture capabilities are limited to black and white images, with an automatic degradation in image quality every so often.

Fortunately, Luca Rocchi at Google Earth Airlines has come up with a nifty plug-in that allows GE to run in a browser, exposing its interface to javascript. The even nicer thing about it is that it supports proper screen grabs

After a bit of playing I now have a script that automatically generates the image set Pano2QTVR needs to create an object movie. Once its been tidied up and given it a more user friendly interface I'll post it up

For now, here's a preview:

(Drag on the image to stop that annoying autorotation)

Wednesday, 12 September 2007

Google Earth Quicktime Object Movie

This little experiment captures a tiny corner of Google Earth in a Quicktime object movie. I chose London's Battersea power station as the subject, though with hindsight that was probably not the most glamorous of places I could have picked. Nevertheless it is instantly recognisable (to the British and Pink Floyd fans at any rate ;) and there's a very good model of it in the 3D Warehouse.

It will need a few seconds to load, then, provided you have Quicktime installed, you will be able to change the view point by dragging on the image:

The object movie was created with Pano2QTVR, a utility that allows both QTVR panoramas and object movies to be constructed.

An extension to Pano2QTVR allows the object movie to be output in flash format:

The source images for the object movie have to be laboriously captured one at a time with Ctrl+Alt+S (or the mac equivalent) from Google Earth. View positioning is accomplished via the use of this kml file. This will allow easy positioning over most of a hemisphere in 24 azimuth steps at each of 7 elevations. It stops a couple of degrees short of ground level to avoid plunging the viewpoint underground. Note that the values of YOUR_LONGITUDE, YOUR_LATITUDE and YOUR_RANGE will need to altered to your chosen location before the file is any use!

If anyone knows a way to automate the image capture process, please drop me a line.

Sunday, 9 September 2007

Starship Enterprise NCC-1701-D

Update: It appears that the latest version of Google Earth, v4.2.0196.2018 beta released 12th September, breaks the GroundOverlay. Hopefully they will get this fixed in the next version. Thanks to Frank Taylor at Google Earth Blog for the tip.

Who says GroundOverlays are for overlaying the ground? It's been a busy week and no posts since Monday, but I haven't been idle. I've put together a multi-overlay of the Starship Enterprise, based on an original set of blueprints by Ed Whitefire that I came across in an article by Phil Broad @, a site devoted to resources for sci-fi model builders.

Ed has very kindly allowed me to use his artwork for this project, which has generated some quite striking visuals:

View in Google Earth

The overlay actually contains 43 layers, one for every deck, but only half of them are active by default. This should spare those of us with older PCs and graphics cards - those of you with computer power rivalling the Starship Enterprise may like to enable more of the layers!

The flash video below gives an idea of what it looks like:

I've chosen to place the Enterprise at Point Nemo, which distinguishes itself as the point at sea furthest from any land. I chose that location in the hope that the lack of high resolution ground images would help things along performance-wise. It looks great when navigated with a SpaceNavigator mouse, though is a bit more difficult to view with standard mouse and keyboard controls. I originally had the Enterprise at a much higher altitude, but dropped it much closer to sea level after some feedback from Ed.

The blueprints used in this are much lower resolution than the originals, which are of much higher quality. Those interested in printed copies of the blueprints should check out the Cloudster link above for details.

Monday, 3 September 2007

Affleck Castle in Stacked Overlays

Whilst scouting about for some simple floor plans to experiment with in Google Earth I came across a site about Affleck Castle in Monikie, Angus. It has an interesting description of the castle complete with a set of floor plans. A little image editing was required and then it was a simple matter to stack the plans.

View in Google Earth

The effect is achieved by setting the white areas of the images to 50% transparency and leaving the black areas opaque. I tried several alternatives to this scheme - another that looks pretty good is to make the white areas completely transparent. This remains readable as GE leaves a fine white outline.

View in Google Earth

Sunday, 2 September 2007

Eden Project Visitor Guide Overlay

Back in 2005 I was trying to accurately geocode a bunch of photos I'd taken at the excellent Eden Project, but found at the time that the Google Earth imagery of the area showed little more than a quarry. I made a series of overlays from bits of more detailed and more up-to-date maps and finished off by aligning the map images from the guide book. These are a little out of date, but I thought they would be worth sharing.

The guide book images are used with the kind permission of Mike Petty, the Eden Project Publishing Manager.

View in Google Earth

I've left the two biome images hovering in the air and applied some transparency, which produces a pleasing effect.

Transparency and altitude offsets seem to be only very rarely used. I'm sure there are plenty of practical and artistic effects that could be generated by them - I think I will have to experiment.

Saturday, 1 September 2007

Poldark Mine Tunnels

The Poldark Mine just outside Helston in Cornwall is well worth a visit, and I can recommend the tour of the mine tunnels to anyone with even a vague interest in geology, mining or industrial history.

Their website has a detailed description of the mine workings, including a number of sketches showing the tunnel layout. To give them some additional context, I've overlaid them on the local landscape in Google Earth.

View in Google Earth

Many thanks to Richard Williams of Poldark Mines for his kind permission to use the map images.

The GE-copter and PhotoOverlay Transparency

Continuing the theme of messing about with PhotoOverlays in Google Earth, here's the first outing of the panovoyant GE-copter to Canary Wharf.

View in Google Earth

The cockpit started life as a series of screen grabs from Microsoft Flight Simulator X which were stitched together into a panoramic image with Realviz Stitcher. I cut the windows out in Photoshop, then applied the script that I described in a previous post to slice it up into tiles.

I reckon it would work with other aircraft too - maybe a microlight or hot air balloon. The back of Pegasus, Gwaihir or a dragon might be an intersting alternative!

Annotating PhotoOverlays and Worlds Within Worlds

Google Earth PhotoOverlays can potentially contain a huge amount of detail. I would like to see some method of applying annotations to points or areas of the PhotoOverlay, along the lines of the 'Add Note' facility at flickr.

On a broader theme, if the 'surface' of a PhotoOverlay could be treated in the same way as the surface of the GE globe, you could apply any of the GE annotation methods such as Placemarks, Paths and Polygons - maybe even other PhotoOverlays. Actually, this could apply equally well to ScreenOverlay and GroundOverlay elements, as well as surfaces of 3D models - in fact anything to which a coordinate system can be applied.

Imagine the possibilities. Worlds within Worlds!

Abbey Road Live Webcam Overlays

Here's a short comparison of three methods of aligning an image with the Google Earth scenery.

A while ago I attempted to create an overlay of the Abbey Road Studios live feed of the camera they have pointed at that famous zebra crossing. I plastered the image on a GroundOverlay and set the camera position to give a reasonable rendition of the crossing area, though of course most of the image appears distorted.

Next I tried a ScreenOverlay. Careful viewpoint positioning gives a fairly good result.

More recently, prompted and inspired by the work of Valery Hronusov over at GIS Planet I did a PhotoOverlay version.

I've collected all three together here for comparison:

View Abbey Road GroundOverlay in Google Earth

View Abbey Road ScreenOverlay in Google Earth

View Abbey Road PhotoOverlay in Google Earth

Clearly the PhotoOverlay gives the best fit (and I'm sure I could have done better with a bit more time), but despite having the positioning controls built into GE it is still quite a tricky business getting things aligned. When you adjust lat and long, the altitude relative to sea level remains constant, which means that the altitude above ground level changes as you move about. This happens regardless of the altitude reference type selected in the box. I'd like to see altitude relative to the ground stay constant, if that is the reference I am using.

Just to round things off, I couldn't resist placing a PhotoOverlay of the album cover too.

View album cover PhotoOverlay in Google Earth

St Mawes Castle Spherical PhotoOverlay

The source pano image is 8192 x 4096 pixels, decomposed into an ImagePyramid for display in a Google Earth PhotoOverlay using the Photoshop script. That means you can zoom in and enjoy the detail of the stone (except in the overexposed areas of course).

View in Google Earth

Unfortunately the implementation of spherical viewing isn't all it should be in 4.2beta, and the pano flips upside down when you stray too far from the initial heading. There also seems to be a bug which causes GE to crash if you launch a second instance of the same PhotoOverlay whilst still in viewing mode. Hopefully these issues will be cleared up before long.