1r.out.pov(1)                GRASS GIS User's Manual               r.out.pov(1)
2
3
4

NAME

6       r.out.pov   -  Converts a raster map layer into a height-field file for
7       POV-Ray.
8

KEYWORDS

10       raster, export, output
11

SYNOPSIS

13       r.out.pov
14       r.out.pov --help
15       r.out.pov  input=name  output=name    [hftype=integer]     [bias=float]
16       [scale=float]   [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]
17
18   Flags:
19       --overwrite
20           Allow output files to overwrite existing files
21
22       --help
23           Print usage summary
24
25       --verbose
26           Verbose module output
27
28       --quiet
29           Quiet module output
30
31       --ui
32           Force launching GUI dialog
33
34   Parameters:
35       input=name [required]
36           Name of input raster map
37
38       output=name [required]
39           Name of output povray file (TGA height field file)
40
41       hftype=integer
42           Height-field type (0=actual heights 1=normalized)
43
44       bias=float
45           Elevation bias
46
47       scale=float
48           Vertical scaling factor
49

DESCRIPTION

51       r.out.pov converts a user-specified raster map layer (map==name) into a
52       height-field file for  POVray  (tga==name).  The  hftype==value  option
53       (where  value  is  either 0 or 1) specifies the height-field type. When
54       the user enters 0 the output will be actual heights. If entered  1  the
55       cell-values  will  be  normalized.  If hftype is 0 (actual heights) the
56       bias==value can be used to add or subtract a value  from  heights.  Use
57       scale==value  to  scale  your  heights  by  value.  The  GRASS  program
58       r.out.pov can be used to create height- field files for Persistence  of
59       Vision  (POV)  raytracer.  POV  can use a height-field defined in Targa
60       (.TGA) image file format where the RGB pixel  values  are  24  bits  (3
61       bytes).  A  16  bit  unsigned integer height-field value is assigned as
62       follows: RED = high byte, GREEN = low byte, BLUE = empty.
63

EXAMPLE

65       An example Povray script file may look like this:
66
67       #include "shapes.inc"
68       #include "colors.inc"
69       #include "textures.inc"
70       #declare Scale = 7;
71       light_source { <40000, Scale*3000, 5000> color MainLight }
72       camera {
73          location < 23000, Scale*2000, 0>
74          angle  90
75          look_at < 23000, Scale*1400, 5000>
76       }
77       height_field  {
78          tga "dem.lr.tga"
79          smooth
80          water_level 0.11  // 726 / 6553.6 = 0.111
81           texture {
82             pigment {
83                 image_map { // image is always projected from -z, with front facing  +z, top to +Y
84                    ppm "map.lr.ppm"
85                    once
86                 }
87                 rotate x*90 // align map to height_field
88             }
89           }
90          finish {
91                 ambient 0.2         // Very dark shadows
92                 diffuse 0.8         // Whiten the whites
93                 phong 0.2           // shiny
94                 phong_size 100.0    // with tight highlights
95                 specular 0.5
96                 roughness 0.05
97          }
98          scale < 14500, Scale*6553.6, 13000 >
99          translate <18300, 0, 1100>
100       }
101

AUTHOR

103       Klaus D. Meyer, GEUM.tec GbR, eMail: GEUM.tec@geum.de
104

SOURCE CODE

106       Available at: r.out.pov source code (history)
107
108       Accessed: Saturday Jan 21 21:14:53 2023
109
110       Main index | Raster index | Topics index | Keywords index  |  Graphical
111       index | Full index
112
113       © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
114
115
116
117GRASS 8.2.1                                                       r.out.pov(1)
Impressum