#include "shapes.inc" #include "colors.inc" #include "textures.inc" #declare Bisque = color red 1 green 0.894118 blue 0.768627 #declare DarkBisque = color rgb <0.866, 0.774, 0.665> #declare DarkGrass = color red 0.1576 green 0.40755 blue .15795 #declare Grass = color red 0.243 green 0.627 blue 0.243 #declare BrownGrass = color red 0.686 green 0.614923 blue 0.375389 #declare DodgerBlue = color red 0.118 green 0.564706 blue 1 // The following constants simply make it easier to swap images of different // sizes. #declare Width = 2046 #declare Height = 1674 // 1 meter is 0.0107965 3-arc second pixels (1 pixel is 92.6223 meters.) #declare Meter = 0.0107965 #declare Feet = Meter / 3.28 // The elevations in the height field are scaled from 0 to MaxElevation meters #declare MaxElevation = 4575 #declare ElevationScale = (MaxElevation * Meter) #declare GrFeet = 1 / (MaxElevation * 3.28) // You might want to exaggerate the elevations #declare ElevationExaggeration = 1.0 camera { location <0, 3348, 0> direction <0.0, 0.0, 2> right <4/3, 0, 0> up <0.0, 1, 0.0> sky z look_at <0.0, 0.0, 0> } // Define a couple of colors for the light sources. #declare MainLight = color red 0.8 green 0.8 blue 0.8 #declare FillLight = color red 0.23 green 0.23 blue 0.25 // Light source (main) light_source { <-2800.0, 4000.0, 0.0> color MainLight } // Light source ( shadow filler ) light_source { <-2000.0, 1500.0, 1000.0> color FillLight } #declare AltitudeColor = pigment { gradient y color_map { [ 0*GrFeet color DarkGrass] [ 100*GrFeet color DarkGrass] [ 700*GrFeet color Grass] [ 1200*GrFeet color DarkBisque] [ 5000*GrFeet color BrownGrass] [ 8000*GrFeet color Gray85] [ 14000*GrFeet color White] } turbulence .08 } height_field { tga "composite-hf.tga" finish { ambient 0.3 // ambient light diffuse 0.8 // light from direct illumination } // Color stuff by altitude pigment { AltitudeColor } // Scale the height scale // Center the image translate <-Width/2, 0.0, -Height/2> water_level 0*Feet } // The bottom plane { y, 0.5*Feet pigment { color rgb<0,.3,.6> turbulence .15 } finish { ambient 0.3 } } // end of file