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

No comments: