//The ground of the scene

#declare GroundScale = 160;

#declare HF_Ground_Scale = 4;

#declare SimpleGround =
plane{y, 0 pigment{ PlanetColor } }

#declare WrinklesPig = 
pigment{ wrinkles
	color_map{
		[ 0 color srgb 0.1 ]
		[ 0.25 color srgb 0.5 ]
		[ 0.5 color srgb 0.35 ]
		[ 0.75 color srgb 0.5 ]
		[ 1 color srgb 0.1 ]
	}
	scale <0.025, 0.025, 1> 
}

#declare HF_Ground = 
height_field{
	function 8192, 8192 {
		pigment{ WrinklesPig } 
	}
	smooth
	translate < -0.5, 0, -0.5 >
	scale < GroundScale, 1, GroundScale >
	
	pigment{ PlanetColor }
}

#if( PlaceMountains )
	#declare WornMountain1 =
	height_field{
		png "heightFields/wornMountain1.png"
		smooth
		water_level 0.01
		translate < -0.5, 0, -0.5 >
		scale < 90, 45, 90 >
		pigment{ PlanetColor }
	}

	#declare WornMountain2 =
	height_field{
		png "heightFields/wornMountain2.png"
		smooth
		water_level 0.01
		translate < -0.5, 0, -0.5 >
		scale < 90, 45, 90 >
		pigment{ PlanetColor }
	}
#end

