POV-Ray : Newsgroups : povray.newusers : Animation : simulating sunset and day/night transition Server Time
17 Jun 2024 12:52:38 EDT (-0400)
  Animation : simulating sunset and day/night transition (Message 1 to 6 of 6)  
From: rodv92
Subject: Animation : simulating sunset and day/night transition
Date: 14 Jun 2012 17:30:00
Message: <web.4fda56c64d9bd8f85d50475e0@news.povray.org>
Hello, i would like to know how to make this day/sunset/night transition.

So far, the obvious i should manage to do :

sun light source going below the ground plane
sky sphere dimming (with rgb color factor decreasing ?)
sky sphere superposition of a night sky coming in

The question is that i cannot get the intrinsic luminosity of the scene to dim
very much. I see that black fog seems to be the way to go.

Is it ? Cause i would not like to see objects in far distance to disappear
completely (they should remain visible, they have dim emission + dim light
sources attached to them)

Could someone shed some light on this (no pun intended) ;) ?


Post a reply to this message

From: clipka
Subject: Re: Animation : simulating sunset and day/night transition
Date: 14 Jun 2012 18:11:12
Message: <4fda6180@news.povray.org>
Am 14.06.2012 23:25, schrieb rodv92:
> Hello, i would like to know how to make this day/sunset/night transition.
>
> So far, the obvious i should manage to do :
>
> sun light source going below the ground plane
> sky sphere dimming (with rgb color factor decreasing ?)
> sky sphere superposition of a night sky coming in
>
> The question is that i cannot get the intrinsic luminosity of the scene to dim
> very much

You probably want to adjust ambient_light; or, better yet, use radiosity 
instead.

Also note that for the sunset, you may also want to dim the sun light 
source and give it a more redish tint. The sky sphere, too, should go 
through some more or less dramatic color changes.


> I see that black fog seems to be the way to go.
>
> Is it ? Cause i would not like to see objects in far distance to disappear
> completely (they should remain visible, they have dim emission + dim light
> sources attached to them)

No, black fog is not what you want. It would give you a totally 
different effect.


Post a reply to this message

From: rodv92
Subject: Re: Animation : simulating sunset and day/night transition
Date: 14 Jun 2012 22:10:00
Message: <web.4fda982b551e4e605d50475e0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 14.06.2012 23:25, schrieb rodv92:
> > Hello, i would like to know how to make this day/sunset/night transition.
> >
> > So far, the obvious i should manage to do :
> >
> > sun light source going below the ground plane
> > sky sphere dimming (with rgb color factor decreasing ?)
> > sky sphere superposition of a night sky coming in
> >
> > The question is that i cannot get the intrinsic luminosity of the scene to dim
> > very much
>
> You probably want to adjust ambient_light; or, better yet, use radiosity
> instead.
>
> Also note that for the sunset, you may also want to dim the sun light
> source and give it a more redish tint. The sky sphere, too, should go
> through some more or less dramatic color changes.
>
>
> > I see that black fog seems to be the way to go.
> >
> > Is it ? Cause i would not like to see objects in far distance to disappear
> > completely (they should remain visible, they have dim emission + dim light
> > sources attached to them)
>
> No, black fog is not what you want. It would give you a totally
> different effect.

FYI, i use this global lights params + sky sphere. the sky sphere evolution
function should provide a dark blue shift and a dark red shift, with the blue
overtaking all azimuths. still reflecting where to plug the clock variable on
the sky sphere since my math skills are a bit "rusty". i will try to come up
with a solution but any help appreciated of course !

#declare night_factor = 0.6;

light_source { <4000,2000,10000>, rgb <4,4,4>/(1 + clock*0.1)
    parallel
    adaptive 1
    jitter
            }

#declare clouds = plane{<0,1,0>,14 hollow  //

 texture{
  pigment {color rgb<0.1,0.35,0.8>*0.8 transmit 0.95}
  //finish {ambient 0  diffuse 0}
  finish {ambient 1  diffuse 1}

 } // end texture 1

  texture{
   pigment { bozo turbulence 0.75
    octaves 6  omega 0.7 lambda 2
    color_map {
     [0.0  color rgb <0.95, 0.95, 0.95> ]
     [0.05  color rgb <1, 1, 1>*1.25 ]
     [0.15 color rgb <0.85, 0.85, 0.85> ]
     [0.55 color rgbt <1, 1, 1, 1>*1 ]
     [1.0 color rgbt <1, 1, 1, 1>*1 ]
                   } // end color_map
    translate< 3, 0,-1>
    scale <0.3, 0.4, 0.2>*300
           } // end pigment
   finish {ambient 0 diffuse 0}
                } // end texture 2

        scale 10000
      }

clouds


//-------------------------------------------------------------------------------
following sky sphere credits :
// http://povray.tashcorp.net/tutorials/qd_realskysphere/

sky_sphere {

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



          }


Post a reply to this message

From: Thomas de Groot
Subject: Re: Animation : simulating sunset and day/night transition
Date: 15 Jun 2012 02:49:44
Message: <4fdadb08$1@news.povray.org>
On 15-6-2012 0:11, clipka wrote:
> Am 14.06.2012 23:25, schrieb rodv92:
>> Hello, i would like to know how to make this day/sunset/night transition.
>>

I think you should read the tutorials by Bruno Cabasson in 
povray.binaries.tutorials: TerraPOV - Sky system - .

For Sun colours/temperatures, I use LightSysIV 
http://www.ignorancia.org/en/index.php?page=Lightsys and in particular 
the module CIE.inc which lets you modulate the light colour from Kelvin 
2800=red to 7500=blue white.

A typical set of code I use myself is like this (with thanks to Jaime 
Vives Piqueres in particular):

#declare Kelvin         = 6200;
#declare SunFactor      = 4;

#include "CIE.inc"
#declare SunColor     = Blackbody(Kelvin)*SunFactor;
#declare SunDis       = vlength(MySunPosition)*2/215;

#if (Area)
   #debug "\nUsing an area_light for the Sun.\n"
   light_source{
     SunPosition
     color SunColor
     area_light
     SunDis*x, SunDis*z,
     5, 5
     adaptive 2
     jitter
     circular
     orient
     parallel
     point_at <0, 0, 0>
   }
#else
   light_source {
     SunPosition
     color SunColor
     parallel
     point_at <0, 0, 0>
   }
#end

// a sky sphere
#declare fn_horizon = function {max(y, 0)}

#declare fn_sun =
function {
   pattern {
     spherical
     scale 3
     translate z
     rotate -Al*x
     rotate Az*y
   }
}

sky_sphere {
   pigment {
     function {pow(fn_horizon(x,y,z)*(1-fn_sun(x,y,z)), 0.400)}
     color_map {
       [0.000 color SunColor/SunFactor]
       [0.426 color srgb <94,  115,  215>/255]
     }
   }
}

I think you could adapt this for your needs.

Thomas


Post a reply to this message

From: rodv92
Subject: Re: Animation : simulating sunset and day/night transition
Date: 15 Jun 2012 10:40:00
Message: <web.4fdb489f551e4e605d50475e0@news.povray.org>
Excellent !
Thank you !

Thomas de Groot <tho### [at] degrootorg> wrote:
> On 15-6-2012 0:11, clipka wrote:
> > Am 14.06.2012 23:25, schrieb rodv92:
> >> Hello, i would like to know how to make this day/sunset/night transition.
> >>
>
> I think you should read the tutorials by Bruno Cabasson in
> povray.binaries.tutorials: TerraPOV - Sky system - .
>
> For Sun colours/temperatures, I use LightSysIV
> http://www.ignorancia.org/en/index.php?page=Lightsys and in particular
> the module CIE.inc which lets you modulate the light colour from Kelvin
> 2800=red to 7500=blue white.
>
> A typical set of code I use myself is like this (with thanks to Jaime
> Vives Piqueres in particular):
>
> #declare Kelvin         = 6200;
> #declare SunFactor      = 4;
>
> #include "CIE.inc"
> #declare SunColor     = Blackbody(Kelvin)*SunFactor;
> #declare SunDis       = vlength(MySunPosition)*2/215;
>
> #if (Area)
>    #debug "\nUsing an area_light for the Sun.\n"
>    light_source{
>      SunPosition
>      color SunColor
>      area_light
>      SunDis*x, SunDis*z,
>      5, 5
>      adaptive 2
>      jitter
>      circular
>      orient
>      parallel
>      point_at <0, 0, 0>
>    }
> #else
>    light_source {
>      SunPosition
>      color SunColor
>      parallel
>      point_at <0, 0, 0>
>    }
> #end
>
> // a sky sphere
> #declare fn_horizon = function {max(y, 0)}
>
> #declare fn_sun =
> function {
>    pattern {
>      spherical
>      scale 3
>      translate z
>      rotate -Al*x
>      rotate Az*y
>    }
> }
>
> sky_sphere {
>    pigment {
>      function {pow(fn_horizon(x,y,z)*(1-fn_sun(x,y,z)), 0.400)}
>      color_map {
>        [0.000 color SunColor/SunFactor]
>        [0.426 color srgb <94,  115,  215>/255]
>      }
>    }
> }
>
> I think you could adapt this for your needs.
>
> Thomas

Excellent !
Thank you !


Post a reply to this message

From: Alain
Subject: Re: Animation : simulating sunset and day/night transition
Date: 15 Jun 2012 22:17:24
Message: <4fdbecb4$1@news.povray.org>

> clipka <ano### [at] anonymousorg> wrote:
>> Am 14.06.2012 23:25, schrieb rodv92:
>>> Hello, i would like to know how to make this day/sunset/night transition.
>>>
>>> So far, the obvious i should manage to do :
>>>
>>> sun light source going below the ground plane
>>> sky sphere dimming (with rgb color factor decreasing ?)
>>> sky sphere superposition of a night sky coming in
>>>
>>> The question is that i cannot get the intrinsic luminosity of the scene to dim
>>> very much
>>
>> You probably want to adjust ambient_light; or, better yet, use radiosity
>> instead.
>>
>> Also note that for the sunset, you may also want to dim the sun light
>> source and give it a more redish tint. The sky sphere, too, should go
>> through some more or less dramatic color changes.
>>
>>
>>> I see that black fog seems to be the way to go.
>>>
>>> Is it ? Cause i would not like to see objects in far distance to disappear
>>> completely (they should remain visible, they have dim emission + dim light
>>> sources attached to them)
>>
>> No, black fog is not what you want. It would give you a totally
>> different effect.
>
> FYI, i use this global lights params + sky sphere. the sky sphere evolution
> function should provide a dark blue shift and a dark red shift, with the blue
> overtaking all azimuths. still reflecting where to plug the clock variable on
> the sky sphere since my math skills are a bit "rusty". i will try to come up
> with a solution but any help appreciated of course !
>
> #declare night_factor = 0.6;
>
> light_source { <4000,2000,10000>, rgb <4,4,4>/(1 + clock*0.1)
>      parallel
>      adaptive 1
As you don't use an area_light, adaptive is of no use.
If you use an area_light with adaptive 1, the array should be 9x9, 
17x17, 33x33,... (use thise formula: 1+ n^2)
Smaller values will make the effect of adaptive less usefull.
Other intermediate values are not effecient given the way that adaptive 
work.
>      jitter
Same as above.
>              }
>
> #declare clouds = plane{<0,1,0>,14 hollow  //
>
>   texture{
>    pigment {color rgb<0.1,0.35,0.8>*0.8 transmit 0.95}
>    //finish {ambient 0  diffuse 0}
>    finish {ambient 1  diffuse 1}

The value of ambient plus diffuse should be less that 1 to have correct 
results.



Alain


Post a reply to this message

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