//scc '06 //dawn over the mountains #local p=function{pattern{granite}} //use pattern not pigment to save us a .x later //mountains isosurface{ function{ y-.3 //make it behave like a height field +p(x/10,9,z/10) //granite scale 10, the 9 value is to randomize the pattern til we get a nice view and aren't inside a mountain } contained_by { box{-9,9} } } //all the objects are black, the lighting is just for the atmospheric effects light_source{<3,.5,8>,1} //atmosphere media{ //sun colour scattered in direction of light, so nice flare round the light direction and trails off the mountains scattering{ 2, rgb <3,2,1>/9 } //blueish colour. n.b. a fairly realistic sunset can be made using just 1 blue scattering media, but I want a bit more artistic control. //see here for an example of doing it the more realistic/less artistic way: http://evilsuperbrain.com/gallery/misc/index.php?movie=sun-a-rise emission rgb <.3,.4,1> //density, for ultimate control I should use different density's for the 2 medias, but that makes the file far too long, so this is a pretty decent compromise density { function { .1 / (y+1) } } } //opaque sphere to bound the atmospherics //pov's media saturates to white if not bounded, though the fog doesn't. so stick this black plane in to bound it. sphere{ 0,1 //cloud pattern pigment{granite poly_wave 4} //make a nice shape for the cloud pattern, this slightly truncates the atmosphere but it looks fine scale-7*y+9 hollow } //camera definition so I can do different aspect-ratio renders camera { right x*image_width/image_height up y direction z*1 } /* //small version: //34567812345678123456781234567812345678123456781234567812345678 #local p=function{pattern{granite}}isosurface{function{y-.3+p(x/ 10,9,z/10)}contained_by{box{-9,9}}}light_source{<3,.5,8>,1}media {scattering{2,<3,2,1>/9}emission<.3,.4,1>density{function{.1/(y+ 1)}}}sphere{0,1pigment{granite poly_wave 4}scale-7*y+9hollow} */