POV-Ray : Newsgroups : povray.text.scene-files : Sand Dunes : Re: Sand Dunes Server Time
28 Jul 2024 22:31:48 EDT (-0400)
  Re: Sand Dunes  
From: Todd Chaffee
Date: 16 Aug 1999 23:00:15
Message: <37b8d03f@news.povray.org>
I've tried combining Bob Hughes and Ken's suggestions into one pov scene for
a realistic sand dune.  I'm still not happy with the granite texture on the
sand dunes but don't know which direction to go from here.  Also, the height
map looks kind of funny in the lowest part of the valleys.  Any way around
this?


// needs to be output as:
//  +fn +w500 +h500 +oc:\images\sanddune.png
// in command-line for making image_map
// then use any usual setting and output to other than sanddune.png to use
image_map

//render square image, example 500x500 pixels resolution if 1
#declare ImageMap=1;  //1 for making image to be used as map, 0 or other #
for seeing heightfield
//render as usual if non 1 number, example 320x240 pixels res.

#if (ImageMap=1)

global_settings {
hf_gray_16 on  //output a smoothable heightfield image
}

camera { orthographic
  location -10*z
  up 10*y right 10*y
  look_at 0
}

plane {z,0

pigment

average pigment_map{

        [1.0 gradient 2*y
            turbulence<0.1,0.05,0.1>
            turbulence<0.1,-0.3, -0.1>
        color_map {
                [0 color rgb 0]
                [.53 color rgb .9]
                [.59 color rgb 1]
                [.65 color rgb .9]
                [1.0 color rgb 0]

                } scale <1,1,1>]

        [1.0 gradient 5*y
            turbulence<0.1,0.05,0.1>
            turbulence<0.1,-0.3, -0.1>
        color_map {
                [0 color rgb 0]
                [.5 color rgb 1]
                [1.0 color rgb 0]

                } scale <1,3,1>]


} translate<1,1,1>
}

finish {ambient 1 diffuse 1}
}



#else

global_settings {assumed_gamma 2.2}

//normal view
light_source { <-5,15,-30> color rgb 1.5
}
light_source {0*x color red 0.600 green 0.600 blue 0.600 translate <40,
60, -60>}
//light_source { <-5,12,-30> color rgb <.8, .8, .8>
//}
camera {
  location <12,2.5,0>
  look_at <0, 0, 5>
}


height_field {
  png "d:\temp\sanddune.png"  smooth
/*
  texture { pigment {
      image_map { png "c:\images\sanddune.png"
map_type 0 //interpolate 2 once
} rotate 90*x
    } finish {phong .1 phong_size 5}
  }
*/
texture {
pigment { bozo color_map {
                  [ 0.0 colour rgb <0.999,0.899,0.699> ]
                  [ 0.2 colour rgb <0.999,0.999,0.999> ]
                  [ 0.25 colour rgb <0.999,0.999,0.999> ]
                  [ 0.25 colour rgb <0.899,0.899,0.899> ]
                  [ 0.275 colour rgb <0.899,0.899,0.899> ]
                  [ 0.275 colour rgb <0.999,0.999,0.999> ]
                  [ 0.4 colour rgb <0.999,0.799,0.599> ]
                  [ 0.6 colour rgb <0.999,0.959,0.859> ]
                 [ 0.8 colour rgb <0.999,0.899,0.599> ] } scale 0.001
}

}
  normal {granite .15 scale <.02,.07,1>}
// finish { ambient .2}
translate <-.5,0,-.5> scale <40,1,37>
}

#end

//----------------Background--------------------------
sky_sphere {
  pigment {
   gradient y
     color_map { [0 color rgb <0.627, 0.773, 0.980> ]
                 [1 color rgb <0.850, 0.700, 0.800> ]
     }
  }
  pigment {  // high stratus clouds
    wrinkles
      turbulence 0.7
      octaves 6
      lambda 5
      omega .3
    color_map {
      [0 color rgbt <1, 1, 1, 1>]
      [.5 color rgbt <.98, .99, .99, .8>]
      [1 color rgbt <1, 1, 1, 1>]
    }
    scale <.8, .1, .8>
  }
 }

plane {-y, -1200  // cloud layer 2
  texture {
    pigment { bozo
               turbulence 0.9
               omega .7
               color_map {
                 [0 color rgbt <1, .9, .9, 1>]
                 [.5 color rgbt <1, .9, .9, .6>]
                 [1 color rgbt <1, .99, .99, .2>]
               }
    }
    finish {ambient 1 diffuse .3}
    scale 1000*1
    translate <1500, 900, -1000>
   }
   rotate <0,0,10>
   hollow
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.