POV-Ray : Newsgroups : povray.binaries.images : Generating Good Skies Server Time
7 Aug 2024 19:24:01 EDT (-0400)
  Generating Good Skies (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Thomas de Groot
Subject: Re: Generating Good Skies
Date: 2 Feb 2006 03:13:16
Message: <43e1bf1c@news.povray.org>
"Skip Talbot" <Ski### [at] aolcom> schreef in bericht
news:43e1515f@news.povray.org...
> You've got the colors down... now you just need another gradient running
> in the opposite axis to wash them out.  I always fake the sun with a
> spherical texture too:
>
Hey! That other gradient is a good idea! Never thought of that!

> http://www.drugrecognition.com/skip/3d/highres/st400-2.jpg
>

Beautiful image.

Thomas


Post a reply to this message

From: Sebastian H 
Subject: Re: Generating Good Skies
Date: 2 Feb 2006 06:09:41
Message: <43e1e875$1@news.povray.org>
Mike Kost wrote:
> http://povray.tashcorp.net

Your sky sphere tutorial is really helpful.
I'll try it out on the weekend. Good work.

Sebastian


Post a reply to this message

From: Mike Kost
Subject: Re: Generating Good Skies
Date: 2 Feb 2006 11:11:02
Message: <43e22f16@news.povray.org>
Skip Talbot wrote:
> You've got the colors down... now you just need another gradient running
> in the opposite axis to wash them out.  I always fake the sun with a
> spherical texture too:
> 
> http://www.drugrecognition.com/skip/3d/highres/st400-2.jpg
> 
> Skip

Skip,

Great idea to get the dimming effect. I took a quick swing at it and I like
the results...

Here's my sky_sphere:

  sky_sphere {
      pigment {
          function { max(min(y,1),0) }
          color_map { cm_realsky_01 }
      }
      scale (1/2)
      pigment {
          function { abs(max(min(x,1),-1)) }
          color_map {
              [ 0.0 rgbt <0.1, 0.1, 0.1, 1.0> ]
              [ 0.2 rgbt <0.1, 0.1, 0.1, 1.0> ]
              [ 0.6 rgbt <0.1, 0.1, 0.1, 0.9> ]
              [ 1.0 rgbt <0.1, 0.1, 0.1, 0.6> ]
          }
      }  
  }


Mike
--
http://povray.tashcorp.net


Post a reply to this message


Attachments:
Download 'final2.jpg' (25 KB)

Preview of image 'final2.jpg'
final2.jpg


 

From: Mike Kost
Subject: Re: Generating Good Skies
Date: 2 Feb 2006 15:47:17
Message: <43e26fd4@news.povray.org>
Sebastian H. wrote:

> Mike Kost wrote:
>> http://povray.tashcorp.net
> 
> Your sky sphere tutorial is really helpful.
> I'll try it out on the weekend. Good work.
> 
> Sebastian

Thanks - I'm glad it's helpful. 

I've started using a series of Python scripts to automate the whole process,
so what I'm doing now has advanced beyond my tutorial. Something new to
write-up when it settles down, I guess.

Mike


Post a reply to this message

From: Skip Talbot
Subject: Re: Generating Good Skies
Date: 2 Feb 2006 20:41:09
Message: <43e2b4b5@news.povray.org>
Looks great, Mike.  What are you using for the water?

Skip


Post a reply to this message

From: Mike Kost
Subject: Re: Generating Good Skies
Date: 2 Feb 2006 22:06:53
Message: <43e2c8cc@news.povray.org>
Skip Talbot wrote:
> Looks great, Mike.  What are you using for the water?
> 
> Skip

It's a bump mapped plane based on a functions from Chrisoph Horrman's
Realistic Water with POV-Ray tutorial
(http://www.imagico.de/pov/water/index.html). The water sdl is below (a
full scene file can be found off of here
http://povray.tashcorp.net/tutorials/qd_realskysphere/)

plane {
    y, 0.0
    material {
        texture {
            pigment { color rgbt <0.8, 0.9, 1, 0.9> }
            finish {
                ambient 0.0
                diffuse 0.0
                reflection {
                    0.2, 1.0
                    fresnel on
                }
                specular 0.4
                roughness 0.003
            }
            normal {
                function {
                    f_ridged_mf(x/9, y, z/5, 0.1, 3.0, 7, 0.7, 0.7, 2)
                } 0.6
                turbulence 2.5
                scale 0.13
            }
        }
        interior { ior 1.3 }
    }
}

All the best,

Mike
--
http://povray.tashcorp.net


Post a reply to this message

From: Paolo Gibellini
Subject: Re: Generating Good Skies
Date: 3 Feb 2006 04:13:52
Message: <43e31ed0$1@news.povray.org>
Nice tutorial!
;-)
Paolo

> "Mike Kost" wrote:

> It's a bump mapped plane based on a functions from Chrisoph Horrman's
> Realistic Water with POV-Ray tutorial
> (http://www.imagico.de/pov/water/index.html). The water sdl is below (a
> full scene file can be found off of here
> http://povray.tashcorp.net/tutorials/qd_realskysphere/)
>


Post a reply to this message

From: Abe
Subject: Re: Generating Good Skies
Date: 3 Feb 2006 15:30:00
Message: <web.43e3bada85aa7b8ffc69adc50@news.povray.org>
Mike Kost <con### [at] povraytashcorpnet> wrote:
> Sebastian H. wrote:
>
> > Mike Kost wrote:
> >> http://povray.tashcorp.net
> >
> > Your sky sphere tutorial is really helpful.
> > I'll try it out on the weekend. Good work.
> >
> > Sebastian
>
> Thanks - I'm glad it's helpful.
>
> I've started using a series of Python scripts to automate the whole process,
> so what I'm doing now has advanced beyond my tutorial. Something new to
> write-up when it settles down, I guess.
>
> Mike

How about letting POV do the work? I was able to do a reasonable facsimile
of the sampling process in POV sdl.

#declare Pigment_img=pigment{image_map{png "skygrad.png" interpolate 0}}

#declare Ximg_dim=48;
#declare Yimg_dim=270;

#declare Cmap_dim=30; //number of color map entries
#declare Xsamp=5;  //averageing horizontally across the image
#declare Sample_bias=2; //bias the number of samples towards the bottom (>1)
or top (<1) of the image


#macro GetColor(SampleP, GradientFunc)
 #local SamplePX=SampleP.x;
 #local SamplePY=SampleP.y;
 GradientFunc(SamplePX, SamplePY, 0)
#end

#declare SkyColorMap=
color_map{
  #declare i=0;
  #while (i<Cmap_dim)
   [pow(i/(Cmap_dim), Sample_bias)
     #declare j=0;

     #declare Color_vector=(
     #while (j<Xsamp) //loop to average over several horizontal samples
       #declare XSamplePoint=(.5+int(Ximg_dim*j/Xsamp))/Ximg_dim;
       #declare YSamplePoint=pow((.5+int(Yimg_dim*i/Cmap_dim))/Yimg_dim,
Sample_bias);

       +GetColor(<XSamplePoint, YSamplePoint>,
function{pigment{Pigment_img}})

       #declare j=j+1;
     #end
     )/Xsamp;

     color rgb Color_vector
     ]
   #declare i=i+1;
  #end
}

Abe


Post a reply to this message

From: Mike Kost
Subject: Re: Generating Good Skies
Date: 3 Feb 2006 17:42:54
Message: <43e3dc6e@news.povray.org>
Abe wrote:
> Mike Kost <con### [at] povraytashcorpnet> wrote:
>> Sebastian H. wrote:
>>
>> > Mike Kost wrote:
>> >> http://povray.tashcorp.net
>> >
>> > Your sky sphere tutorial is really helpful.
>> > I'll try it out on the weekend. Good work.
>> >
>> > Sebastian
>>
>> Thanks - I'm glad it's helpful.
>>
>> I've started using a series of Python scripts to automate the whole
>> process, so what I'm doing now has advanced beyond my tutorial. Something
>> new to write-up when it settles down, I guess.
>>
>> Mike
> 
> How about letting POV do the work? I was able to do a reasonable facsimile
> of the sampling process in POV sdl.
> 
> -- SNIP --
> -- /SNIP --
> 
> Abe

A very elegant solution. This will be fun to try out.

In the past, I have had poor experiences with auto-generated color_maps. All
the results I've gotten are prone to having banding problems. Some of it is
due to unlucky pixel distributions, but it becomes difficult to get good
results over a wide range of images without lots of trial and error (and by
then, I can do it faster by hand sampling). Over-sample too much, and it
picks up high frequency noise that creates banding. Under-sample and the
colors look cheesy (and again has visual bands). 

I have not tried averaging along the X axis yet, so I'm curious to try your
Povray code out, but I think the problem goes a little deeper: real skies
and linear interpolation don't mix. Sunsets do not have discontinuous first
derivatives, but linearly interpolated color maps do. I believe that the
visual problems in rendered skies come from large changes in slope when
passing a control point in the color map. Averaging and using weighted
color map entries distribution work to cover up the problem. The real
solution, in my (by now not so humble) opinion, is to extend color maps to
allow cubic or b-spline interpolation. A higher order interpolation will
match the original sunset image with just 5 - 10 point color map entries. 

Perhaps it's time to solicit the Povray coders for an enhancement...

All the best,

Mike
--
http://povray.tashcorp.net/


Post a reply to this message

From: Hasan3
Subject: Re: Generating Good Skies
Date: 4 Feb 2006 06:00:01
Message: <web.43e4871385aa7b8f879ac8b40@news.povray.org>
Mike, thanks for tutorials.
A axample:

sky_sphere {

  pigment {
    gradient y
    color_map {
        [  0/269 color rgb <120/255, 79/255, 51/255>]
        [  1/269 color rgb <141/255, 83/255, 46/255>]
        [  2/269 color rgb <177/255, 86/255, 41/255>]
        [  3/269 color rgb <235/255,128/255, 72/255>]
        [  5/269 color rgb <255/255,159/255, 72/255>]
        [  8/269 color rgb <255/255,203/255, 94/255>] // New
        [ 10/269 color rgb <255/255,218/255,112/255>]
        [ 13/269 color rgb <255/255,233/255,148/255>] // New
        [ 15/269 color rgb <251/255,241/255,172/255>] // New
        [ 20/269 color rgb <255/255,246/255,203/255>]
        [ 30/269 color rgb <255/255,240/255,219/255>]
        [ 40/269 color rgb <236/255,223/255,214/255>]
        [ 50/269 color rgb <205/255,204/255,212/255>]
        [ 55/269 color rgb <185/255,190/255,209/255>] // New
        [ 60/269 color rgb <166/255,176/255,201/255>]
        [ 65/269 color rgb <149/255,163/255,190/255>] // New
        [ 70/269 color rgb <129/255,149/255,182/255>]
        [ 80/269 color rgb <103/255,127/255,171/255>]
        [ 90/269 color rgb < 79/255,110/255,154/255>]
        [100/269 color rgb < 66/255, 97/255,143/255>]
        [110/269 color rgb < 52/255, 84/255,131/255>]
        [120/269 color rgb < 47/255, 75/255,122/255>]
        [140/269 color rgb < 37/255, 60/255,102/255>]
        [160/269 color rgb < 32/255, 51/255, 84/255>]
        [180/269 color rgb < 27/255, 42/255, 71/255>]
        [200/269 color rgb < 25/255, 36/255, 58/255>]
        [220/269 color rgb < 22/255, 31/255, 48/255>]
        [240/269 color rgb < 18/255, 27/255, 42/255>]
        [260/269 color rgb < 15/255, 21/255, 33/255>]
        [269/269 color rgb < 15/255, 21/255, 33/255>]

    }
    scale 0.5
  }


    pigment {
      bozo
      turbulence 0.65
      octaves 6
      omega 0.7
      lambda 2
      color_map {
          [0.0 0.1 color rgb <0.85, 0.85, 0.85>
                   color rgb <0.75, 0.75, 0.75>]
          [0.1 0.5 color rgb <0.75, 0.75, 0.75>
                   color rgbt <1, 1, 1, 1>]
          [0.5 1.0 color rgbt <1, 1, 1, 1>
                   color rgbt <1, 1, 1, 1>]
      }
      scale <0.2, 0.5, 0.2>


    scale 0.6
    rotate -90*x
    rotate -90*z
    }

}




plane {
  y, 0
  texture {
    pigment {
      checker
      color rgb <0.0, 0.1, 0.1>
      color rgb <0.0, 0.0, 0.0>
      scale 2
    }
  }

}


Post a reply to this message


Attachments:
Download 'sky.jpg' (130 KB)

Preview of image 'sky.jpg'
sky.jpg


 

<<< Previous 2 Messages Goto Initial 10 Messages

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