r.out.pov.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <h2>DESCRIPTION</h2>
  2. r.out.pov converts a user-specified raster map layer (map==name) into a
  3. height-field file for POVray (tga==name). The hftype==value option (where
  4. value is either 0 or 1) specifies the height-field type. When the user
  5. enters 0 the output will be actual heights. If entered 1 the cell-values
  6. will be normalized. If hftype is 0 (actual heights) the bias==value can
  7. be used to add or subtract a value from heights. Use scale==value to scale
  8. your heights by value. The GRASS program r.out.pov can be used to create
  9. height- field files for Persistence of Vision (POV) raytracer. POV can
  10. use a height-field defined in Targa (.TGA) image file format where the
  11. RGB pixel values are 24 bits (3 bytes). A 16 bit unsigned integer height-field
  12. value is assigned as follows: RED = high byte, GREEN = low byte, BLUE =
  13. empty.
  14. <h2>EXAMPLE</h2>
  15. An example Povray script file may look like this:
  16. <p><div class="code"><pre>
  17. #include "shapes.inc"
  18. #include "colors.inc"
  19. #include "textures.inc"
  20. #declare Scale = 7;
  21. light_source { <40000, Scale*3000, 5000> color MainLight }
  22. camera {
  23. location &lt; 23000, Scale*2000, 0>
  24. angle 90
  25. look_at &lt; 23000, Scale*1400, 5000>
  26. }
  27. height_field {
  28. tga "dem.lr.tga"
  29. smooth
  30. water_level 0.11 // 726 / 6553.6 = 0.111
  31. texture {
  32. pigment {
  33. image_map { // image is always projected from -z, with front facing +z, top to +Y
  34. ppm "map.lr.ppm"
  35. once
  36. }
  37. rotate x*90 // align map to height_field
  38. }
  39. }
  40. finish {
  41. ambient 0.2 // Very dark shadows
  42. diffuse 0.8 // Whiten the whites
  43. phong 0.2 // shiny
  44. phong_size 100.0 // with tight highlights
  45. specular 0.5
  46. roughness 0.05
  47. }
  48. scale &lt; 14500, Scale*6553.6, 13000 >
  49. translate <18300, 0, 1100>
  50. }
  51. </pre></div>
  52. <h2>AUTHOR</h2>
  53. Klaus D. Meyer, GEUM.tec GbR, eMail: <i>GEUM.tec@geum.de</i>
  54. <p><i>Last changed: $Date$</i>