Rail3D*


 

Simple Buildings



Simple Buildings

Definition: A technique for producing simple building models from photographic textures, designed to produce models that render quickly, even in large numbers

Most layouts will require (At some point) lots of buildings. These have generally been a problem as they will require significant rendering time and badly impact the frame rate. However, it is proposed to introduce a new feature to Rail3D to allow the inclusion of large numbers of buildings at low frame rate cost using a technique similar to that used for trees.

For this purpose I’m distinguishing between “feature buildings” - ie buildings which are prominent and important in the model - eg station buildings and other “background buildings” which do not need as much detail, but need to be present in large numbers. My proposed new technique is for these background buildings.

Implementation

Background buildings will be modelled as a simple rectangular box with either a four panel or two panel roof:

(it will be possible to vary the size of the object).

The object is then textured to produce the finished model. The texture needs to provide all four sides and a section of roof:

Note that the aspect ratio of each section is not critical as the image will be stretched to fit the building size when rendered.

Note also that the exact format of this image is not yet determined, so while collecting photographs of buildings is a good idea, converting them to this format is not recommeded until the format is finally defined.

The resolution of this image should not be too great - this example is 256*256 pixels for each side of the building.

- please note that this is a quick exampe thrown together to illustrate the concept and not particularly high quality.

Here is the same building rendered with a more complex shape for use as a “feature building”:

Obviously this is a better model, but the additional complexity would have too great an impact on rendering speed if used for large numbers of buildings and the simple version is satisfactory for background buildings.

Notes on producing photographic textures

The requirement is to produce a flat image of each side: while this can often be achieved by manipulation of the image on a computer, the best results will be obtained if the amount of manipulation is kept to a minimum and the original camera image is as close as possible to the required format.

A telephoto lens gives much less perspective distortion than a wide angle

The ideal camera position is central and flat to the building side:

However this is rarely possible and the camera will usually need to be at ground level: this introduces some perspective distortion which will need to be corrected.

Note that for a feature model, the perspective can be corrected in the texture mapping of the model, but for the generalised background model each side needs to be manipulated to 256*256 square.



import