POV-Ray : Newsgroups : povray.binaries.images : Gradient Twilight Server Time
2 Nov 2024 16:56:27 EDT (-0400)
  Gradient Twilight (Message 1 to 10 of 10)  
From: IMBJR
Subject: Gradient Twilight
Date: 15 Sep 2000 10:33:20
Message: <39c23330@news.povray.org>
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.

This image-based method has the advantage of being able to control the depth
of sampling and avoid the pixelated look derived from low-res image-maps.

--
--------------------------------------------------------------------
Symmetry is wrong:
http://www.imbjr.com


Post a reply to this message


Attachments:
Download 'POV_gradient_twilight.jpg' (24 KB)

Preview of image 'POV_gradient_twilight.jpg'
POV_gradient_twilight.jpg


 

From: Tom Melly
Subject: Re: Gradient Twilight
Date: 15 Sep 2000 10:43:14
Message: <39c23582@news.povray.org>
"IMBJR" <imb### [at] imbjrcom> wrote in message news:39c23330@news.povray.org...

Looks lovely - I can't make head nor tail out of how you did this. What's
new.

Seems out of focus - is that an inevitable consequence of the technique?


Post a reply to this message

From: Ian Witham
Subject: Re: Gradient Twilight
Date: 15 Sep 2000 11:00:21
Message: <39c23985@news.povray.org>
"IMBJR" <imb### [at] imbjrcom> wrote in message news:39c23330@news.povray.org...
> 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.

So, you could produce an animated-turbulent-type sky?? sort of a
look-out-I-just-ate-drugs kind of a swirling-sky effect? Is that possible??


Post a reply to this message

From: IMBJR
Subject: Re: Gradient Twilight
Date: 15 Sep 2000 14:28:54
Message: <o5r4ssgdjt2378s4ksvc5k3j14n3juv320@4ax.com>
On Fri, 15 Sep 2000 15:43:10 +0100, "Tom Melly" <tom### [at] tomandlucouk>
wrote:

>"IMBJR" <imb### [at] imbjrcom> wrote in message news:39c23330@news.povray.org...
>
>Looks lovely - I can't make head nor tail out of how you did this. What's
>new.
>
>Seems out of focus - is that an inevitable consequence of the technique?

It is if you use a low sample.

>

----------------------------------------------------
Symmetry is wrong:
http://www.imbjr.com


Post a reply to this message

From: IMBJR
Subject: Re: Gradient Twilight
Date: 15 Sep 2000 14:30:13
Message: <e6r4ssgnolbq5tfcot92iukqiko46bels9@4ax.com>
On Sat, 16 Sep 2000 03:00:39 +1200, "Ian Witham"
<ian### [at] hotmailcom> wrote:

>"IMBJR" <imb### [at] imbjrcom> wrote in message news:39c23330@news.povray.org...
>> 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.
>
>So, you could produce an animated-turbulent-type sky?? sort of a
>look-out-I-just-ate-drugs kind of a swirling-sky effect? Is that possible??

I would imagine so. In fact I had to restrain myself from using the
existing clock code in the script. However, if you look in the
animations group you should find "In-Out Connie" that uses varying
sampling to pull a fake outa-focus trick.

>

----------------------------------------------------
Symmetry is wrong:
http://www.imbjr.com


Post a reply to this message

From: H  E  Day
Subject: Re: Gradient Twilight
Date: 15 Sep 2000 17:44:25
Message: <01c01f5d$f7baadc0$037889d0@daysix>
Please, sir, post the code for this!


H.E. Day
<><


Post a reply to this message

From: IMBJR
Subject: Re: Gradient Twilight
Date: 15 Sep 2000 18:06:24
Message: <39c29d60@news.povray.org>
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

From: Steve
Subject: Re: Gradient Twilight
Date: 15 Sep 2000 19:53:24
Message: <slrn8s5cvb.h2m.steve@zero-pps.localdomain>
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

From: IMBJR
Subject: Re: Gradient Twilight
Date: 15 Sep 2000 20:01:56
Message: <39c2b874@news.povray.org>
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

From: Anton Sherwood
Subject: Re: Gradient Twilight
Date: 16 Sep 2000 01:45:14
Message: <39C30A79.75A1C79D@pobox.com>
Ian Witham wrote:
> So, you could produce an animated-turbulent-type sky?? sort of a
> look-out-I-just-ate-drugs kind of a swirling-sky effect? Is that possible??

If you want to animate a sky_sphere, just translate its pigment by the
clock variable.  (If you want realistic wind-blown clouds, make sure
this motion is perpendicular to the line of sight.)

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.