r.out.pov(1grass)

πŸ‘‘ r.out.pov β€” the manual, but make it make sense

okay bestie, welcome to r.out.pov(1grass), the GRASS module that turns your raster into a whole height-field situation for POV-Ray πŸŒ„βœ¨. it's giving "let me sculpt a terrain out of math and vibes". let's get into it, no cap.

🌸 NAME 🌸

r.out.pov β€” converts a raster map layer into a height-field file for POV-Ray πŸ’–

πŸŽ€ KEYWORDS πŸŽ€

raster, export, output

✨ SYNOPSIS ✨

r.out.pov
r.out.pov --help
r.out.pov input=name output=name  [hftype=integer]   [bias=float]
[scale=float]   [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

πŸ¦‹ Flags πŸ¦‹

  • --overwrite β€” lets output files just bulldoze over existing files that are already there. allow it πŸ’…
  • --help β€” prints the usage summary. your lil cheat sheet fr fr.
  • --verbose β€” verbose module output. it will literally tell you Everything.
  • --quiet β€” quiet module output. shhh 🀫 no yapping.
  • --ui β€” force launches the GUI dialog. for the girlies who like a lil window πŸͺŸ.

πŸ“ Parameters πŸ“

  • input=name [required] β€” name of input raster map. this is the map, bestie. required, so don't skip it πŸ™ˆ.
  • output=name [required] β€” name of output povray file (TGA height field file). also required 😭.
  • hftype=integer β€” height-field type (0=actual heights, 1=normalized).
  • bias=float β€” elevation bias.
  • scale=float β€” vertical scaling factor.

πŸ’œ DESCRIPTION πŸ’œ

so r.out.pov converts a raster map layer that you specify (map==name) into a height-field file for POVray (tga==name). iconic behavior honestly.

the hftype==value option β€” where value is either 0 or 1 β€” tells it what kind of height-field you're on:

  • type 0 β†’ your output will be actual heights.
  • type 1 β†’ the cell-values get normalized.

and if hftype is 0 (actual heights), you can use bias==value to add or subtract a value from the heights 🫢. use scale==value to scale your heights by value, periodt.

the GRASS program r.out.pov can be used to create height-field files for Persistence of Vision (POV) raytracer 🌈. POV can use a height-field defined in Targa (.TGA) image file format where the RGB pixel values are 24 bits (3 bytes). a 16 bit unsigned integer height-field value is assigned like this: RED = high byte, GREEN = low byte, BLUE = empty. the way that's just byte-splitting and slaying πŸ’….


πŸ”₯ EXAMPLE πŸ”₯

an example Povray script file may look like this:

#include "shapes.inc"
#include "colors.inc"
#include "textures.inc"
#declare Scale = 7;
light_source { <40000, Scale*3000, 5000> color MainLight }
camera {
   location < 23000, Scale*2000, 0>
   angle  90
   look_at < 23000, Scale*1400, 5000>
}
height_field  {
   tga "dem.lr.tga"
   smooth
   water_level 0.11  // 726 / 6553.6 = 0.111
    texture {
      pigment {
          image_map { // image is always projected from -z, with front facing  +z, top to +Y
             ppm "map.lr.ppm"
             once
          }
          rotate x*90 // align map to height_field
      }
    }
   finish {
          ambient 0.2         // Very dark shadows
          diffuse 0.8         // Whiten the whites
          phong 0.2           // shiny
          phong_size 100.0    // with tight highlights
          specular 0.5
          roughness 0.05
   }
   scale < 14500, Scale*6553.6, 13000 >
   translate <18300, 0, 1100>
}

🌟 AUTHOR 🌟

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

πŸ’– SOURCE CODE πŸ’–

Available at: r.out.pov source code (history)

Latest change: Sunday Jul 27 05:53:30 2025 in commit: da409580ef15011f3bac379c76d41101c9e36347

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


and that's the whole page, bestie πŸŽ€ go forth and raytrace. this was GRASS 8.5.0, r.out.pov(1grass), dropping in with a latest-change timestamp of Sunday Jul 27 05:53:30 2025 β€” stay hydrated, ship your terrain, mwah πŸ’‹πŸ¦‹

πŸ“¦ where this page comes from