|
|
Wandering around my pov files and stumbled onto this
file that I had forgotten about. It is a sunset sky with a
ground covered with greebles. This is another failed attempt
at a greeble macro but perhaps one of you will find it
interesting.
By the way, the cloud for the sunset-colored clouds
is not mine. I got it from this newsgroup some time ago and
then forget who posted it.
--
-- begin grix.pov ---
--
global_settings {
assumed_gamma 2.4
number_of_waves 10
}
#declare rseed = seed(34146559);
#declare ntsc = false;
camera {
location 0
direction <0, 0, 1>
#if (ntsc = true)
right <(640 / 400) * (10/11), 0, 0>
#else
right <(640 / 480), 0, 0>
#end
up <0, 1, 0>
rotate x*10
rotate y*8
translate <-1.5, 2.3, -10>
}
sky_sphere {
pigment {
gradient <0, 1, 0>
color_map {
[ 0.05 color <255, 209, 157> / 255 ]
[ 0.18 color <143, 131, 122> / 255 ]
[ 0.4 color <67, 115, 158> / 255 ]
}
}
}
plane { // clouds
<0, -1, 0>, -200
no_shadow
texture {
pigment {
bozo
turbulence 2
lambda 3
scale <400, 400, 1000> * 2
color_map {
[ 0.4 color rgbt <0.4, 0.4, 0.4, 1> ]
[ 1.0 color rgbt <0.4, 0.4, 0.4, 0> ]
}
}
finish { ambient 1 diffuse 0 }
}
texture {
pigment {
bozo
turbulence 2
lambda 3
translate <0, 0, 0.05>
scale <400, 400, 1000> * 2
color_map {
[ 0.59 color rgbt <0.8, 0.5, 0.4, 1> ]
[ 0.95 color rgbt <0.8, 0.5, 0.4, 0.7> ]
[ 1.0 color rgbt <0.8, 0.5, 0.4, 0.5> ]
}
}
finish { ambient 1 diffuse 0 }
}
translate <820, 13, 0>
}
fog {
fog_type 2 distance 20 rgb <250,186,140>/255
fog_offset 0
fog_alt 1
}
fog {
fog_type 2 distance 20000 rgb <250,186,140>/255*.125
fog_offset 0
fog_alt 250
}
sphere { // origin locator
<0, 0.5, 0>, 0.5
pigment { color red 1 green 0 blue 0 }
finish { ambient 0.4 diffuse 0.6 specular 1.6 roughness 0.02 }
}
#macro rnd_rotate()
rotate <360 * rand(rseed), 360 * rand(rseed), 360 * rand(rseed)>
#end
#macro perturb()
translate <4 - 8 * rand(rseed), 4 - 8 * rand(rseed), 4 - 8 * rand(rseed)>
rnd_rotate()
#end
#macro rand_pure_color()
#local feep = int(6 * rand(rseed));
#switch (feep)
#case (0)
color red 1 green rand(rseed) blue 0
#break;
#case (1)
color red 1 green 0 blue rand(rseed)
#break;
#case (2)
color red 0 green rand(rseed) blue 1
#break;
#case (3)
color red 0 green 1 blue rand(rseed)
#break;
#case (3)
color red 0 green 1 blue rand(rseed)
#break;
#case (3)
color red 0 green 1 blue rand(rseed)
#break;
#case (3)
color red 0 green 1 blue rand(rseed)
#break;
#case (4)
color red rand(rseed) green 1 blue 0
#break;
#else
color red rand(rseed) green 0 blue 1
#end
#end
#macro do_box(c1, c2) // same parameter format as for a box object
// back wall
triangle { c1, <c2.x, c1.y, c1.z>, <c2.x, c2.y, c1.z> }
triangle { c1, <c2.x, c2.y, c1.z>, <c1.x, c2.y, c1.z> }
// left wall
triangle { c1, <c1.x, c1.y, c2.z>, <c1.x, c2.y, c2.z> }
triangle { c1, <c1.x, c2.y, c2.z>, <c1.x, c2.y, c1.z> }
// right wall
triangle { <c2.x, c1.y, c2.z>, <c2.x, c1.y, c1.z>, c2 }
triangle { <c2.x, c1.y, c1.z>, c2, <c2.x, c2.y, c1.z> }
// bottom
triangle { <c1.x, c2.y, c2.z>, <c1.x, c2.y, c1.z>, <c2.x, c2.y, c1.z> }
triangle { <c1.x, c2.y, c2.z>, <c2.x, c2.y, c1.z>, c2 }
// top
triangle { <c1.x, c1.y, c2.z>, c1, <c2.x, c1.y, c1.z> }
triangle { <c1.x, c1.y, c2.z>, <c2.x, c1.y, c1.z>, <c2.x, c1.y, c2.z> }
// front
triangle { <c1.x, c1.y, c2.z>, <c2.x, c1.y, c2.z>, c2 }
triangle { <c1.x, c1.y, c2.z>, c2, <c1.x, c2.y, c2.z> }
#end
#macro do_quad(c1, c2, c3, c4) // clockwise or
// counterclockwise order, not col-row order
triangle { c1, c2, c3 }
triangle { c1, c3, c4 }
#end
// floor
plane {
<0, 1, 0>, 0
pigment { color rgb 0.7 }
finish { ambient 0.5 diffuse 0.5 }
}
// build the mesh grid object
#declare grid = mesh {
#declare cc = 0;
#while (cc < 300)
#declare box_l = 1 + rand(rseed);
#declare box_w = 0.05 + 0.05 * rand(rseed);
#if (rand(rseed) > 0.5) // longer in x direction
#declare xx = -5 + (10 - box_l) * rand(rseed);
#declare zz = -5 + (10 - box_w) * rand(rseed);
do_box(<xx, 0, zz>, <xx + box_l, 0.02 * rand(rseed) + 0.03, zz + box_w>)
#else // longer in z direction
#declare zz = -5 + (10 - box_l) * rand(rseed);
#declare xx = -5 + (10 - box_w) * rand(rseed);
do_box(<xx, 0, zz>, <xx + box_w, 0.02 * rand(rseed) + 0.03, zz + box_l>)
#end
#declare cc = cc + 1;
#end
}
// place copies of it
union {
#declare xx = -7;
#while (xx < 9)
#declare zz = -1;
#while (zz < 25)
object {
grid
rotate y*90*int(4 * rand(rseed))
translate <xx * 10, 0, zz * 10>
}
#declare zz = zz + 1;
#end
#declare xx = xx + 1;
#end
pigment { rgb 1 }
finish { ambient 0.3 diffuse 0.7 }
}
light_source {
<3000, 3000, -3000>
color rgb <1, 0.9, 0.8> * 0.5
}
light_source {
<-2300, 3010, -3100>
color rgb <0.8, 0.9, 1> * 0.5
}
/* actual end of this file */
Post a reply to this message
|
|