Heightfields in Povray


Landscapes can be created in Povray using heightfields. Heightfilds use 2D grayscale images to specify an elevation. Example 2D images are given below:

The grayscale images can be created in software such as Paint or Photoshop. Save the image in png or gif format. Dark areas in the images are interpreted by Povray as being low in elevation and white areas are high elevation. The "height" will be along the y direction and will fill the unit square in the xz plane.

For example, to create this povray picture (on right) we use the above striped image. No scaling was used. To show the size, we included a transparant red unit cube with corners at the origin and <1,1,1>.

Examples

With scaling, you can create different effects. Using the above three 2D images, we have generated the following images:


2D grayscale image


Povray image, code


2D grayscale image


Povray image, code


2D grayscale image


Povray image, code


2D grayscale image


Povray image, code


Another variation


[Top]

[Home]