|
|
You will notice references to Connie in this, that's because she was the
original image I tried with this code. You will need a 400x239 PNG image
called asky.png for this code to work unamended. And yes, you will Mega-POV
to do this.
PS. The clock stuff is in there, again, because of the original Connie
animation I did.
---- Code begins
#version unofficial MegaPov 0.5;
global_settings {
assumed_gamma 2.2
//post_process {normal}
}
#declare ss = seed(666);
#include "colors.inc"
camera {
location <0, 5,-500> //<0, 0,-275>
up <0,1,0>
right <1,0,0>
//normal { crackle form <0.5,-0.25,0.5> scale 0.3 }
look_at <0, 200, 0>
}
light_source {<0, 100, -1000> color White}
background {Black}
//#declare xp = 160;
//#declare yp = 245;
#declare xp = 400;
#declare yp = 239;
#declare trans_color = color Green;
#declare connie_pigment =
pigment {
image_map {
png
//"connie.png" once //interpolate 2
"asky.png" once //interpolate 2
// filter 77, 1
}
scale <xp, yp, 1>
translate <-xp/2, -yp/2, 0>
}
#declare connie =
texture {
pigment {connie_pigment}
finish {
ambient 1
}
}
polygon {
5,
<-xp/2, -yp/2>,
<-xp/2, yp/2>,
<xp/2, yp/2>,
<xp/2, -yp/2>,
<-xp/2, -yp/2>
texture {
connie
}
no_image
no_shadow
}
//////////////////
#declare clockt = 1;
#declare w = 1+floor(75*clockt);
#declare h = 1+floor(75*clockt);
#declare colors= array[w][h]
#declare xx = 0;
#declare gradp = pigment {
gradient x
pigment_map {
#while (xx < w)
#declare yy = 0;
[xx/(w-1) gradient y
pigment_map {
#while (yy < h)
#declare pcol = eval_pigment(connie_pigment,
<-xp/2 + (xx/(w-1))*xp + rand(ss)*5,
-yp/2 + (yy/(h-1))*yp + rand(ss)*5,
0>);
/*
#if ((pcol.green = trans_color.green) &
(pcol.blue = trans_color.blue) &
(pcol.red = trans_color.red)
)
#declare pcol = rgbt <1,1,1,1>;
#end
*/
[yy/(h-1) color pcol]
#declare colors[xx][yy] = pcol;
#declare yy = yy + 1;
#end
}
]
#declare xx = xx + 1;
#end
}
}
///////////////////////////////////////////
/*
polygon {
5,
<-xp/2, -yp/2>,
<-xp/2, yp/2>,
<xp/2, yp/2>,
<xp/2, -yp/2>,
<-xp/2, -yp/2>
texture {
pigment{gradp
scale <xp,yp,1>
translate <-xp/2,-yp/2,0>
}
finish {
ambient 1
}
}
}
*/
sky_sphere {
pigment{gradp
//scale <xp,yp,1>
turbulence 0.1
translate <0,-yp+15,0>
rotate <0,40,0>
}
}
plane {
y, 0
texture {
pigment {color Grey}
}
}
-- Code ends
H. E. Day wrote in message <01c01f5d$f7baadc0$037889d0@daysix>...
>Please, sir, post the code for this!
>
>
>H.E. Day
><><
Post a reply to this message
|
|
|
|
On Fri, 15 Sep 2000 15:43:16 +0100, IMBJR wrote:
>Although this may appear to be just a photograph or an image-map, it is in
>fact a 2D gradient applied to a sky-sphere with a little turbulence thrown
>in.
>
>After taking a photograph of a particularly striking sunset, I knocked a bit
>of Mega-POV code to sample the image and reproduce it in terms of a 2D
>gradient pattern pigment. The sampling was, in this case, also slightly
>turbulent.
So are you saying that the process produces free-standing POV code that you
can then manipulate? Is the output from the process a pigment/texture
statement? Looks really good.
--
Cheers
Steve email mailto:ste### [at] zeroppsuklinuxnet
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.zeropps.uklinux.net/
or http://start.at/zero-pps
12:18am up 25 days, 4:32, 2 users, load average: 1.15, 1.03, 1.01
Post a reply to this message
|
|
|
|
Steve wrote in message ...
>On Fri, 15 Sep 2000 15:43:16 +0100, IMBJR wrote:
>>Although this may appear to be just a photograph or an image-map, it is in
>>fact a 2D gradient applied to a sky-sphere with a little turbulence thrown
>>in.
>>
>>After taking a photograph of a particularly striking sunset, I knocked a
bit
>>of Mega-POV code to sample the image and reproduce it in terms of a 2D
>>gradient pattern pigment. The sampling was, in this case, also slightly
>>turbulent.
>
>So are you saying that the process produces free-standing POV code that you
>can then manipulate? Is the output from the process a pigment/texture
It's not free-standing but it can be output to a file if required. It
defines a pigment for use later in the script. There's also an unused array
being filled with the colour-data if anyone so wishes to muck about with
that.
>statement? Looks really good.
Cheers.
>
>
>
>--
>Cheers
>Steve email mailto:ste### [at] zeroppsuklinuxnet
>
>%HAV-A-NICEDAY Error not enough coffee 0 pps.
>
>web http://www.zeropps.uklinux.net/
>
>or http://start.at/zero-pps
>
> 12:18am up 25 days, 4:32, 2 users, load average: 1.15, 1.03, 1.01
Post a reply to this message
|
|