|
|
Here's a similar height_field generating scene, but the craters are created
with discs instead of pigments. It might be cheating, but the size and
location of the craters can be controlled exactly.
--
-David
----------------------------------------------------
#include "colors.inc"
global_settings {hf_gray_16}
camera {
location <0, 0, -20>
look_at 0
} //camera
light_source {<0, 20, -100> color White * 1.2}
#declare Randomizer = seed (2);
#declare CraterZOffset = 0;
#macro NewCrater (Diameter)
#declare CraterZOffset = CraterZOffset - .001;
#declare Crater = disc {
0, z, 1
texture {
pigment {
onion
turbulence .08 + rand (Randomizer) * .04
color_map {
[0 rgbt <0, 0, 0, .2>] //Center
[.1 rgbt <0, 0, 0, .3>]
[.42 rgbt <1, 1, 1, .4>]
[.7 rgbt <1, 1, 1, .9>]
[.8 rgbt <.5, .5, .5, 1>]
[1 rgbt 1]
} //color_map
} //pigment
scale 1.1
rotate (rand (Randomizer) * 360) * z
} //texture
scale Diameter
translate CraterZOffset * z
no_shadow
} //disc
#end //#macro NewCrater
#local Terrain = object {
plane {
z, 0
texture {
pigment {
bumps //Start out with gentle hills
color_map {
[0 Black]
[1 White * 1.2]
} //color_map
} //pigment
scale 5
} //texture
texture {
pigment {
granite //Roughen up the terrain
color_map {
[0 rgbt <0, 0, 0, .9>]
[1 rgbt <1, 1, 1, .7>]
} //color_map
} //pigment
scale 6
} //texture
} //plane
} //object
object {Terrain}
NewCrater (4)
object {Crater translate <.1, 1.1, 0>}
NewCrater (3)
object {Crater translate <6, 5, 0>}
NewCrater (2.2)
object {Crater translate <-8, 5, 0>}
NewCrater (4.5)
object {Crater translate <7, -5, 0>}
NewCrater (3.5)
object {Crater translate <-6, -1, 0>}
----------------------------------------------------
Post a reply to this message
|
|