Tuesday, July 17, 2012

Changing the Textures

Made some changes to the code to get a volcanic look.


camera {location <0,5,0> look_at <0,0,0>}
global_settings { ambient_light rgb 11}
plane {y, -1.0 pigment {bozo turbulence .8 lambda 2.0 color_map {[0.00 color rgb <0,0,0>] [1.00 color rgb <1,1,1>]}}}


Using lambda to create a slightly different texture.

Then declared several different textures so it is easy to change them around to see which looks best.


camera {location <0,1,.5>  look_at <0,0,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>]
      [.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 }
}


// 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_terrain01.png"
    smooth
    texture {T_Terrain03}
    translate <-.5, .1, -.5>
    scale <1, .2, 1>   
    rotate <0,0,0>
  }
plane { y, -1.0 texture {pigment {color rgbt <0,.2,1,.5>}} translate <0,1.10,0>}





    texture {T_Terrain02}


No comments:

Post a Comment