POV-Ray : Newsgroups : povray.binaries.images : Sky Server Time
11 Aug 2024 05:13:26 EDT (-0400)
  Sky (Message 1 to 5 of 5)  
From: Dave VanHorn
Subject: Sky
Date: 1 May 2004 01:30:47
Message: <40933607$1@news.povray.org>
How can I get a decent looking sky, given that I'm actually modeling the
surface of a planet, with light coming from a sun at scale distance?

I haven't been able to make top lit clouds work at all..


IOW:

#declare Inch    = 1;
#declare Foot    = (Inch * 12);
#declare Yard    = (Foot * 3);
#declare CM      = (Inch / 2.54);
#declare MM      = (CM / 10);
#declare Meter   = (CM * 100);
#declare kM      = (Meter * 1000);
#declare Mile    = (Foot * 5280);

//El Sol
#declare Solar_Radius = (696000 * kM);
#declare Hours        = 12;
#declare Minutes      = 35;
#declare Seconds      = 00;
#declare Latitude     = 40;

#declare Time = (360 / (24 * 60 *60)) * ((Hours * 60 * 60) + (Minutes * 60)
+ Seconds);

//For animating the sun, use this
//#declare Time = ((360 / (24 * 60 * 60)) * ((clock + .25) * 60 * 60 * 24))

#declare Ceiling   = (25000 * Foot) / (2 * pi);
#declare Sun_Dist  = (93000000 * Mile);
#declare Sun_Rad   = sin(radians(0.5))*Sun_Dist;
#declare Sun_Pos   = <0, 1, 0>; //y+z+x
#declare Sun_Pos   = vnormalize ( vrotate ( Sun_Pos, 0*x )) * Sun_Dist;
#declare Sun_Paint = texture { pigment {White * 1} finish {Dull} };

//This model assumes the sun orbits 0.0.0, and that the planet is a sphere,
translated to put
//the interesting part of the surface at 0.0.0
//Not exactly accurate, but close enough.
//It's also northern-hemispheric.
light_source { 0*x color White * 1.1 * (Sun_Dist * Sun_Dist) // Follows
inverse square law
               media_attenuation on
               translate Sun_Pos
               fade_distance 1
               fade_power 2
               rotate <-Latitude, 0, (180 + Time)>
               looks_like { sphere {<0,0,0> Solar_Radius texture {
Sun_Paint }}}
               media_attenuation on
               }


-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?


Post a reply to this message

From: Abe
Subject: Re: Sky
Date: 1 May 2004 09:47:06
Message: <4093aa5a@news.povray.org>
Dave VanHorn wrote:
> How can I get a decent looking sky, given that I'm actually modeling the
> surface of a planet, with light coming from a sun at scale distance?
> 
> I haven't been able to make top lit clouds work at all..
> 
> 
> IOW:
> 
> #declare Inch    = 1;
> #declare Foot    = (Inch * 12);
> #declare Yard    = (Foot * 3);
> #declare CM      = (Inch / 2.54);
> #declare MM      = (CM / 10);
> #declare Meter   = (CM * 100);
> #declare kM      = (Meter * 1000);
> #declare Mile    = (Foot * 5280);
> 
> //El Sol
> #declare Solar_Radius = (696000 * kM);
> #declare Hours        = 12;
> #declare Minutes      = 35;
> #declare Seconds      = 00;
> #declare Latitude     = 40;
> 
> #declare Time = (360 / (24 * 60 *60)) * ((Hours * 60 * 60) + (Minutes * 60)
> + Seconds);
> 
> //For animating the sun, use this
> //#declare Time = ((360 / (24 * 60 * 60)) * ((clock + .25) * 60 * 60 * 24))
> 
> #declare Ceiling   = (25000 * Foot) / (2 * pi);
> #declare Sun_Dist  = (93000000 * Mile);
> #declare Sun_Rad   = sin(radians(0.5))*Sun_Dist;
> #declare Sun_Pos   = <0, 1, 0>; //y+z+x
> #declare Sun_Pos   = vnormalize ( vrotate ( Sun_Pos, 0*x )) * Sun_Dist;
> #declare Sun_Paint = texture { pigment {White * 1} finish {Dull} };
> 
> //This model assumes the sun orbits 0.0.0, and that the planet is a sphere,
> translated to put
> //the interesting part of the surface at 0.0.0
> //Not exactly accurate, but close enough.
> //It's also northern-hemispheric.
> light_source { 0*x color White * 1.1 * (Sun_Dist * Sun_Dist) // Follows
> inverse square law
>                media_attenuation on
>                translate Sun_Pos
>                fade_distance 1
>                fade_power 2
>                rotate <-Latitude, 0, (180 + Time)>
>                looks_like { sphere {<0,0,0> Solar_Radius texture {
> Sun_Paint }}}
>                media_attenuation on
>                }
> 
> 

Just from your set up, I'd hazard a guess that you will run into 
numerical truncation problems related to the eplison value considering 
the largest and smallest values of scale (there is a better way to 
express this, but I can't think of it right now). Then again I could be 
wrong.

As an approximate alternative, since you are centering everything on 
<0,0,0>, you could 1) place the light_source far enough away that it is 
behind all scene elements, but not necessarily as far as Sun_Dist and 
give it the parallel attribute. 2) Use the sky_sphere with the 
appropriate pigment to provide the image of the sun disc.

Getting a good looking sky can be achieved any number of ways, but what 
is important is (in close order): the sky colors, how the sky ( or 
atmosphere) interacts with scene elements including light sources, and 
how the sky (or atmosphere) relates to the scene.

Could you be more specific as to what you are trying to do for top lit 
clouds?

Abe


Post a reply to this message

From: Dave VanHorn
Subject: Re: Sky
Date: 1 May 2004 11:08:00
Message: <4093bd50$1@news.povray.org>
> Just from your set up, I'd hazard a guess that you will run into
> numerical truncation problems related to the eplison value considering
> the largest and smallest values of scale (there is a better way to
> express this, but I can't think of it right now). Then again I could be
> wrong.

So far, I haven't.
I can set the planet diameter from 1' to 5000 miles, and the surface stays
exactly where it should relative to the scene origin, and components of the
objects are specified down to 0.001 inch with no problems so far.  When I
move the camera and zoom in on the details, they are still there.

> Could you be more specific as to what you are trying to do for top lit
clouds?

I'd like to set in some clouds, at a realistic altitude.
I'd like to have them as a sphere of some sort, around the planet, so that
they cast shadows on the ground, and that they don't look like cardboard
cutouts from underneath.

http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky2.htm
This looks good to me, but I can't see how to translate it to my world.


Post a reply to this message

From: Abe
Subject: Re: Sky
Date: 1 May 2004 15:10:37
Message: <4093f62d@news.povray.org>
Dave VanHorn wrote:

> I'd like to set in some clouds, at a realistic altitude.
> I'd like to have them as a sphere of some sort, around the planet, so that
> they cast shadows on the ground, and that they don't look like cardboard
> cutouts from underneath.
> 
> http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky2.htm
> This looks good to me, but I can't see how to translate it to my world.

My understanding is that this presentation is based on planar cloud 
layers. Substituting concentric spheres for the planes should make it 
work for you. Note though that in doing so you lose the availability of 
the third dimension of the texture for the time variable in animation.

I might also suggest reviewing the following:

http://3dgallery.dhs.org/tutorials/3d_clouds.html

http://www.oyonale.com/ressources/english/sources13.htm

This discussion should probably continue in one of the text groups.

Abe


Post a reply to this message

From: Dave VanHorn
Subject: Re: Sky
Date: 1 May 2004 16:15:21
Message: <40940559@news.povray.org>
"Abe" <bul### [at] taconicnet> wrote in message
news:4093f62d@news.povray.org...
> Dave VanHorn wrote:
>
> > I'd like to set in some clouds, at a realistic altitude.
> > I'd like to have them as a sphere of some sort, around the planet, so
that
> > they cast shadows on the ground, and that they don't look like cardboard
> > cutouts from underneath.
> >
> > http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky2.htm
> > This looks good to me, but I can't see how to translate it to my world.
>
> My understanding is that this presentation is based on planar cloud
> layers. Substituting concentric spheres for the planes should make it
> work for you. Note though that in doing so you lose the availability of
> the third dimension of the texture for the time variable in animation.

Hmm.. I would have thought I could maybe map the layers onto spheres or some
such..
In this project, I'll start out below them, and end up going above them, so
in the end, I would like to create 3D clouds that are not just layers of
planes.

> I might also suggest reviewing the following:
>
> http://3dgallery.dhs.org/tutorials/3d_clouds.html
>
> http://www.oyonale.com/ressources/english/sources13.htm

Thanks, this is giving me some ideas.


> This discussion should probably continue in one of the text groups.

Cool


Post a reply to this message

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