Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
Geometric Shapes in POV-Ray
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial
 
Geometric Shapes
   Index
Basic Shapes
Shapes by macro + CSG
Shapes in "shapes3.inc"
Other Shapes by macros
3D text shapes
Other Shapes
Non CSG Shapes

height_field + HF macros
  ->height_field by images
  - height_field rastered
  - height_field by functions
  - height_fields massiv
  - HF - Mountain + Valley
  - HF_Square
  - HF_Sphere
  - HF_Cylinder
  - HF_Torus

Isosurfaces
                                   

Mountains of images:

" height_field{ ... } "
How to create mountains 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 Windows 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" int erprets grey values as height
between 0.00 = black = rgb<0,0,0> and 1.00 = white = rgb<1,1,1>.


Sample "height_field" from images:

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

© Friedrich A. Lohmüller, 2008
www.f-lohmueller.de
  top