Thursday, July 19, 2012

POVRay Cartography



Over the next couple of blogs I will show how to make a cartographic map using POVRay and Photoshop.  Starting with a turbulent bozo gray scale pattern I selected an area copied to a new layer and decreased the contrast and brightness.



camera {location <-.5,1,0>  look_at <0,-.1,0>}
light_source { <-2,7,2> color rgb 1}
light_source { <1,7,3>  color rgb .5}
global_settings { ambient_light rgb 1.5 }
background { color rgb 1 }


// Forrest and Mountain
#declare T_Terrain01 = 
texture {
  pigment {
    gradient y
    color_map {
      [.00 color rgb<.7,  .7,  .5>]
      [.40 color rgb<0,  .2,  0>]
      [.58 color rgb<.2, .5,  .1>]
      [.66 color rgb<.4, .4,  .3>]
      [.73 color rgb<.3, .2,  .6>]
      [.80 color rgb<.9, .9,  1>]
      [.90 color rgb<1,  1,   1>]
      [1.0 color rgb<1,  1,   1>]
    }
  }
    finish { ambient 0.225 diffuse 0.75 crand 0.01975 }
}


// Desert
#declare T_Terrain02 =
texture {
  pigment {
    gradient y
    color_map {
      [.00 color rgb<.10, .20, .1>]
      [.05 color rgb<.20, .20, .2>]
      [.40 color rgb<.50, .50, .6>]
      [.60 color rgb<.48, .45, .4>]
      [.80 color rgb<.50, .45, .4>]
      [.90 color rgb<.60, .55, .5>]
      [.95 color rgb<.65, .65, .5>]
      [.999 color rgb<.70, .65, .5>]
      [1.0 color rgb<.10, .20, .1>]
    }
  }
    finish { ambient 0.225 diffuse 0.75 crand 0.01975 }
}


// Volcanic
#declare T_Terrain03 =
texture {
  pigment {
    gradient y
    color_map {
      [.00 color rgb<.5,  .7,  1>]
      [.10 color rgb<.8,  1,  1>]
      [.20 color rgb<1,  1,  1>]
      [.30 color rgb<1,  .9,  .7>]
      [.40 color rgb<0,  .2,  0>]
      [.60 color rgb<.2, .4,  .1>]
      [.80 color rgb<.4, .2,  .0>]
      [.93 color rgb<.3, .0,  .0>]
      [.95 color rgb<.6, .2,  .1>]
      [1.0 color rgb<.0,  0,   0>]
    }
  }
    finish { ambient 0.225 diffuse 0.75 crand 0.01975 }
}


// Mountains and Forest
#declare T_Terrain05 =
texture {
  pigment {
    gradient y
    color_map {
      [.00 color rgb<0,  0,  .2>]
      [.40 color rgb<0,  .2,  .2>]
      [.60 color rgb<.2, .5,  .1>]
      [.70 color rgb<.4, .4,  .3>]
      [.85 color rgb<.3, .2,  .6>]
      [.90 color rgb<.9, .9,  1>]
      [.95 color rgb<1,  1,   1>]
      [1.0 color rgb<1,  1,   1>]
    }
  }
    finish { ambient 0.225 diffuse 0.75 crand 0.01975 }
}




height_field {
    png "gray_terrain02.png"
    smooth
    texture {T_Terrain01}
    translate <-.5, .1, -.5>
    scale <1, .15, 1>   
    rotate <0,0,0>
  }


plane { y, -1.0 texture {pigment {color rgbt <0,.2,1,.5>}} translate <0,1.02,0>}


fog {
    distance 2
    color rgbt .5
        fog_type 2
    fog_offset  .1
    fog_alt .1
  }

No comments:

Post a Comment