Route Building Tutorial 17: Building from reference photographs

In this tutorial, we shall see how to build a simple building from photos of the real thing, discussing what photos are most useful for object building and how to manipulate them.

Time to get to work…

The building which is going to be constructed is this simple brick hut located at the west end of Severn Tunnel Junction station:

The building at Severn Tunnel Junction we wish to model

The first job is to obtain photographs of the sides which are going to be displayed in the route. These should be taken squarely face on to the subject if possible. Consideration should be given to any shadows present; if these are visible in the final object, it will define the weather in the route as being sunny and on prototypical routes, any shadows which are visible will also define the time of day.

For the object to be built, the two images which have been taken for reference are:

Our building’s front face

Our building’s side face

Looking at these images, the features that need to be modelled are the main wall, concrete base and the roof. The downpipe, window sills and lintels could also be modelled separately to give more depth to the building if desired.

From these images, we have no knowledge of the dimensions of the building. There are a number of ways around this:

  • Measure the building (although turning up at a station with a tape measure can look a bit suspicious ).
  • Take a photo with a person of known height stood next to the building and scale accordingly
  • Assume features such as doorways and bricks are of reasonably standard size and use these for reference measurements.

It is this latter option we shall use, and our measurements will be determined from the height of the doorway; not exact, but a reasonable approximation. Assuming the doorway is 2.1m high, the following measurements can be obtained simply by measuring the features on the image and scaling these by the same factor as the doorway:

Approximate measurements of the front of our building

Now that the height of the brickwork is known, we can similarly calculate the dimensions of the second wall:

Approximate measurements of our building’s side

We now know the size of the building and can start construction once the textures have been optimised.

The first task is to crop the images so that only the regions of interest remain and to save them as 24bit images appropriate for use as textures.

The finished front texture

The finished side texture

The next changes to be made with these images are to adjust the colours so that the brickwork will appear the same on both textures. The window on the side texture also needs to be darkened (as the opposite window will not be visible from the angle viewed). This was achieved by reducing the saturation of the window area and inverting the colours (i.e. negative) before slightly reducing the contrast to make the darker areas less black.

Once these changes have been made, the images must be resized in accordance with the ^2 rule before being used (the dimensions must be 32, 64, 128 or 256 etc pixels).

Now that we have the texture, construction of the building can be started.

Starting off by constructing the all brick face, using the dimensions we calculated previously.

The height of the bottom of the wall has been set at 1.2m to allow the base of the building to be added later.

For the side wall, using the dimensions previously obtained, the following code needs to be added to the object file;

To create the concrete base, we can also obtain a texture from the original photos in the same way as was used for the walls. However, to minimise the texture size, it will be repeated along the length of the faces of the base. Selecting a length of the base which equate to ~1m long:

Select the base texture

Cutting this out and resizing to 64 x 16 pixels and saving as an 8 bit indexed colour image gives us a suitable texture to use for the base. It is worth noting that when resizing the texture, the dimensions were increased from 64×11 to 64×16 (to comply with the ^2 law), so although the original texture area was 1×0.17m, to prevent distortion of the texture a height of 0.25m would be more appropriate.

Note that the texture has been tiled horizontally 8.15 times in accordance with the relative sizes of the object and texture.
Next, the horizontal face can be added (the vertical and horizontal faces could be combined in a single mesh block if desired):

Notice how the vertices are again ordered clockwise and that the repeat tiling of the texture is now in the y direction.

Adding the concrete base to the front of the structure is done in a similar way (taking care not to overlap the textures on the horizontal faces).
For the vertical face:

For the horizontal face:

The final part of the base, is the vertical face at the end of the building:

Our final object should now look a little like this (Seen on the platform we created previously):

The finished object

The final tutorial in this series will deal with finishing this building by adding the fascia and roof, neither of which can be seen from the cab, but are important if placing this building in a lineside position!