|
|
// megapov scene for growing flowers onto a height_field
#version unofficial MegaPov 0.7;
global_settings { assumed_gamma 2.1 ambient_light 1.23 }
light_source{<10,1000,-1000+(clock*750)> rgb 1}
light_source{<-1000,1000,1000> rgb .5}
#declare HF =
height_field {
pattern 500, 500 {
image_map {jpeg "yourphotohere.jpg"
} rotate 90*x scale <1,1,1.3> translate -.25*z}
// scale <1, 0.25, 1>
smooth
}
object {
HF
texture {
pigment {rgb<.125,.67,.25>}
//image_map {jpeg "yourphotohere.jpg"} rotate 90*x scale <1,1,1.3>
translate -.25*z}
}
scale <1,.125,1> translate <-.5, 0, -.5> scale 2
}
// note that this adds objects instantly for many, not all "grow"
#if (clock<.5)
#declare Clock=clock*2;
#declare NumberObjects = int(150+(650*clock*2));
#else // set all in place halfway through animation
#declare Clock=1;
#declare NumberObjects = int(150+(650));
#end
#declare C = 1;
#declare Flower=
union {
sphere { -.01*y, 0.004 }
cylinder {-.02*y,-y,.0025 pigment {rgb<.3,.7,.4>} finish {ambient .25}}
#while (C>0)
difference {
sphere { 0, 0.02 } sphere { 0, 0.02 scale <1,2-Clock,1> translate
(.03-(.02*Clock))*y}
sphere { .021*Clock*x, 0.02 scale <1,2-Clock,.3> inverse}
scale <1,10-(9*Clock),1> rotate 360*C*y
}
#declare C=C-.2;
#end
scale <1,3,1>
}
// set random seeds
#declare xS=seed(123);
#declare yS=seed(231);
#declare zS=seed(312);
#declare C = 0;
union {
#while ( C < NumberObjects)
// set random numbers
#declare VaX = rand(xS);
#declare VaY = rand(yS);
#declare VaZ = rand(zS);
// set variables
#declare PosX = VaX;
#declare PosY = 1; // VaY; // base height of flowers
#declare PosZ = VaZ;
#declare PosU = <PosX, PosY, PosZ>;
#declare PosV = <0,0,0>;
#declare Norm = <0,0,0>;
#declare Pos = trace ( HF, PosU, PosV-PosU, Norm );
object {
Flower
scale .2+(VaY/1.8) rotate VaY*360*y
#if (clock<.5)
scale (<5*clock,2.5*clock,5*clock>+.01)*2
translate (Pos)*<1,1.1+(clock/.75),1> scale <1,.25,1>
#else
scale <5,2.5,5>+.01
translate (Pos)*<1,1.1+(.5/.75),1> scale <1,.25,1>
#end
}
#declare C = C + 1;
#end // while
pigment {image_map {jpeg "yourphotohere.jpg" once}
rotate 90*x scale <1,1,1.3> translate -.25*z}
finish {diffuse .75 specular .075 roughness .075}
translate <-.5, 0, -.5> scale 2
} // union
#declare clock_type="J"
#include "clockmod.inc"
camera {
location <0, 0, -3>
up y*image_height right x*image_width
angle 50
rotate <30+(mclock*59),15+clock*-30,0>
look_at <0, .125, .125>
}
// Bob H.
// http://webpages.charter.net/omniverse/omniverse.htm
Post a reply to this message
|
|