POV-Ray : Newsgroups : povray.text.scene-files : Sand Dunes : Re: Sand Dunes again Server Time
28 Jul 2024 22:19:42 EDT (-0400)
  Re: Sand Dunes again  
From: Bob Hughes
Date: 20 Aug 1999 06:46:43
Message: <37bd3213@news.povray.org>
/*I'm just going to repost the whole scene file again here since it's
easier than attempts to copy and paste in certain parts
(original things were not retained!).
The normals were given a pattern wave type, wrinkles seemed fine to
me. However, they also seem to have
troubles. If you turn the normal depth way up and place a light so as
to skim the dune surface, artifacts appear.
Anyhow, a reminder about the HF images made using POV-Ray procedural
textures: I believe it was Ron Parker
who told of how color_maps can overrun their bounds so to speak,
possibly from turbulence being applied, I'm not sure.
So I raised and lowered the min and max rgb values respectively to try
and prevent that. Looks like it may have helped.
Everything else is aesthetics I should think. Beauty in the eye of the
beholder you know. */

/* some modifications, though very few */
// 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=0)

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.05]
                [.53 color rgb .9]
                [.59 color rgb .95]
                [.65 color rgb .9]
                [1.0 color rgb 0.05]

                } 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 .95]
                [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 (with some lighting changes)
light_source { <0,30,0> color rgb .125
}
light_source { <-5,20,-50> color rgb 1.25
}
light_source {0,.5 translate <20, 60, -30>}
// light_source { <-5,12,-30> color rgb <.8, .8, .8>}
camera {
  location <12,2.5,0>
  look_at <0, 0, 5>
}


height_field {
  png "c:\images\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 .2 turbulence 1 ramp_wave scale <.02,.07,.1>
  wrinkles .6 turbulence .6 ramp_wave scale <.025,.075,.1> /*this one
seems good to me*/
          // wrinkles .6 turbulence .6 scallop_wave scale
<.025,.075,.1>
          // agate .4 agate_turb 1 ramp_wave scale <.025,.075,.1>
          // marble .4 turbulence 1 ramp_wave scale <.025,.075,.1>
rotate <90,90,0>
          // marble .4 turbulence 1 scallop_wave scale <.025,.075,.1>
rotate <90,90,0>
          // marble .4 turbulence 1 sine_wave scale <.025,.075,.1>
rotate <90,90,0>
          // marble .4 turbulence 1 triangle_wave scale <.025,.075,.1>
rotate <90,90,0>
  }
   finish { ambient .15 diffuse .7 specular .05 roughness .5}
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.