POV-Ray raytracer descriptions by Friedrich A.Lohmüller
Français français
Italiano  Italiano
Deutsch Deutsch

3D-text by fonts Index raster mountains

Mountains of images:

"height_field{ ... } "
How to create mountains out by images

Sample mounts by height_field 600x450

It is a method to produce objects with irregularly formed surfaces by using patterns from image files:
height_field{ ... } : this height field produces mountains out of little triangles on a quadratic sector from <0,0,0> to <1,0,1> (that means in the xz-plane) by using an image which color brightness (colorindices by 256-colors-images) interpreted as the height of the angles of an triangle. Where black(0) is interpreted as height 0 and white(256) is interpreted as height 1. Other values of the brightness (or the colorindex) accordingly between!
Basicly every image of the allowed fomats (ending with: tga, gif, pot, png, pgm, ppm, jpg, tif, sys) is possible to use. If you want to form a mountain with a soft shaped realistic landscape it is recommanded to produce the used image with a graphic programm. This program need to have the ability to work with true-color images and should have a simulated airbrush. (e.g. "CorelPhotoPaint" -- The win95/98-programm "Paint" unfortuately is not good for doing this) also useful is a function to soft the whole image and parts of the image.

A "height_field" interprets grey values as height between 0.00 = black = rgb<0,0,0> and 1.00 = white = rgb<1,1,1>.


Sample "height_field":

height_field{ tga "Mount1.tga" smooth
              texture{Cork scale 0.02
                      pigment{quick_color Tan}
                      finish {ambient 0.10 diffuse 0.75 phong 0.1}}
              translate<-0.5,-0.001,0> scale<100,15,100>}

The image on the right side shows the back and white image file "Mount1.tga", (scaled down somewhat and compressed by JPEG), which is used in the sample below. This simple back and white image produces, as a "height_field" (multiple used and scaled different, rotated and translated) a respectable interesting mountainous landscape:
Sample mounts by height_field 600x450

3D-text by fonts Index Raster Mountains

© 2002 Friedrich A. Lohmüller,   (legacy email redacted)