POV-Ray : Newsgroups : povray.newusers : Real sky Server Time
30 Jul 2024 06:18:22 EDT (-0400)
  Real sky (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Tim Nikias
Subject: Re: Real sky
Date: 7 Nov 2004 08:42:48
Message: <418e2658$1@news.povray.org>
> Till now I can get a "pseudo-real" blue sky, and "pseudo-real" sunset but
> I'm using different sets of media. I'd like to find THE set that would
> render blue when the "sun" is placed along the normal to the landscape,
> reddish when the sun is close to the horizon etc...

That's not possible with a reasonable PC. You're asking for actual
light-scattering according to wavelengths, which POV-Ray doesn't do unless
you use photons, and using photons to light up the sky is... well... out of
reach with current standard desktop PCs.

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: ingo
Subject: Re: Real sky
Date: 7 Nov 2004 10:33:26
Message: <Xns959AA86E5E059seed7@news.povray.org>
in news:418e2658$1@news.povray.org Tim Nikias wrote:

> You're asking for actual
> light-scattering according to wavelengths, which POV-Ray doesn't do
> unless you use photons, and using photons to light up the sky is...
> well... out of reach with current standard desktop PCs.
> 

Sky-POV has (simulates) wavelength dependent raleigh scattering:
http://www.geocities.com/SiliconValley/Program/9231/povray.html

Ingo


Post a reply to this message

From: Reynald
Subject: Re: Real sky
Date: 9 Nov 2004 11:10:01
Message: <web.4190ebcb7f847b5df5f6f3660@news.povray.org>
"Tim Nikias" <JUSTTHELOWERCASE:timISNOTnikias(at)gmx.netWARE> wrote:
> That's not possible with a reasonable PC. You're asking for actual
> light-scattering according to wavelengths, which POV-Ray doesn't do unless
> you use photons, and using photons to light up the sky is... well... out of
> reach with current standard desktop PCs.

Yes, I was exaggerating a little bit when asking for a real sky... I
understand that any simulation suppose some limitations. Let's see if my
understanding of "Photons" is correct:

We assume our scene is made of an atmosphere a sphere (earth) and a light
source. In that case the only elements we lose when rendering without
photons are some contrasts (in the media and on the sphere) due to
refraction of light in the atmosphere. Isn't it?

So, for a first simulation of earth atmosphere we could forget refraction
effects. I think it is reasonable since as far as I know the main physical
phenomena that determine the color of the sky are scattering and
absorbtion, but not refraction.

Now we could simulate the atmosphere using a first media with Rayleigh
scattering (chosing a higher coefficient in the blue)... and a second media
that would simulate the effects (absorbtion and diffusion) of aerosols...
maybe we need a third one...!

Limitations of these simulations are "single scattering", very simplified
wavelenght dependencies of scattering and absorbtion as well as simplified
atmosphere structure.

Please tell me if I missed something. At that point I still think we can
obtain somthing which is not too far from the real sky? I'm working on it,
and I'm learning some more about Povray, thanks Tim for your very
instructive website.

[Reynald] - www.guidevtt.com


Post a reply to this message

From: Tim Nikias
Subject: Re: Real sky
Date: 9 Nov 2004 11:46:55
Message: <4190f47f$1@news.povray.org>
> Please tell me if I missed something.

No, I think you concluded the details very nicely. As POV-Ray doesn't
simulate actual wavelength scattering, you could only simulate the effect by
using pre-colored media, of which the color might be calculated via some
algorithm which works out the color in regard to the sun's position or so.

As for doing that entirely using media, I only see the advantage of this if
you plan to actually place objects visibly behind the atmosphere. For
example, for a scene I once did I used media to create the blue color of the
sky, so that I might place a moon behind the atmosphere. Thus, the black
shadow of the moon would be tinted blue as well and I got the same effect as
in real life.
For the major part of scenes, I simply use some distant ground fog to
simulate the distance-haze along with a properly colored sky-sphere. Clouds
are layered in shells above the scene. I seldomly use scattering media for
the entire atmosphere, it's often a local effect which I achieve by using a
large enough container and fading the scattering to the edges (e.g. using
the "spherical" pattern as a multiplier, or the "planar" pattern to simulate
volumetric ground fog).

> I'm working on it,
> and I'm learning some more about Povray, thanks Tim for your very
> instructive website.

Always a pleasure seeing that someone has a use for it! :-)

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Slime
Subject: Re: Real sky
Date: 9 Nov 2004 13:58:23
Message: <4191134f$1@news.povray.org>
> No, I think you concluded the details very nicely. As POV-Ray doesn't
> simulate actual wavelength scattering, you could only simulate the effect
by
> using pre-colored media

Couldn't it be said that POV-Ray does support wavelength-dependant
scattering, but that it only works with three wavelengths (R,G,B), and you
must specify the scattering for each one manually?

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Reynald
Subject: Re: Real sky
Date: 11 Nov 2004 14:50:00
Message: <web.4193c11f7f847b5d8a5317770@news.povray.org>
> Couldn't it be said that POV-Ray does support wavelength-dependant
> scattering, but that it only works with three wavelengths (R,G,B), and you
> must specify the scattering for each one manually?

eh! eh! good question! I'm also waiting for an answer...

Meanwhile I have found a very nice paper about the structure and the
physical properties of the atmosphere (in french):
http://www.techniques-ingenieur.fr/affichage/DispIntro.asp?nGcmId=E4030

From this paper I get this "atmosphere":
http://www.guidevtt.com/Z_Povland/PovRay_atmosphere/SphereAtmosphere3.php

.... promising!... but still not realistic. Probably the main difficulty is
the lack of multiple scattering with povray. Any suggestion?

[Reynald] - www.guidevtt.com


Post a reply to this message

From: Tim Nikias
Subject: Re: Real sky
Date: 11 Nov 2004 15:10:21
Message: <4193c72d$1@news.povray.org>
> > Couldn't it be said that POV-Ray does support wavelength-dependant
> > scattering, but that it only works with three wavelengths (R,G,B), and
you
> > must specify the scattering for each one manually?
>
> eh! eh! good question! I'm also waiting for an answer...

Well. You *could* say that POV-Ray only supports three wavelengths for
scattering, but that would still not be entirely true. Wavelength-dependant
scattering implies that you can throw white light at an object, and it will
spit the entire spectrum of colored light out. POV-Ray, in no manner
whatsoever aside of using photons, does that. And if you have to manually
define the scattering for each wavelength by yourself, where is that true to
the concept of stating that POV-Ray scatters only three wavelengths?
Additionally, unless you use photons, the light isn't focussed and
refracted, which is what happens with wavelength-dependant scattering: while
passing through the air (notice the "while", it doesn't get refracted only
upon entry and exit as POV-Ray does it), the different wavelengths are
scattered differently. Hence the red sky on sundown, the light only gets
"bent" towards the viewer, straight lines of light would actually not reach
the viewer.

The only true thing about that is that you can do just about anything with
POV-Ray, given the time it might take to render a complex scene, but that
hardly proves that POV-Ray can do wavelength-dependant scattering.

If you're interested on the technical aspect: POV-Ray traces straight rays,
not curved rays, which would be required for proper wavelength-scattering.
Or, if curves aren't possible, to at least approximate the effect by
permitting rays only to a certain length, then recalculate if the direction
changes, and move onward. But then, the results aren't easily predictable
and may vary greatly in animations or when dealing with small-scale
turbulences.

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Reynald
Subject: Re: Real sky
Date: 7 Dec 2004 17:45:01
Message: <web.41b631de7f847b5d34040fb90@news.povray.org>
Thanks Tim for your explanations. Sorry for waiting so much since your last
post... I made some more tests, I'm quite happy with the results but they
are some aspect of the behaviour of POV light in the atmosphere that I
don't understand. First, and since english is not my mother tongue, let me
fix some keywords...

SCATTERING: according to my understanding it corresponds the probability
that, withing a given volume of the media, a photon will change his
direction of flight. This probability is given by the Rayleigh function
(molecular scattering). It has nothing to do with refraction. It is (to my
understanding) the origin of the blue sky and the reddish sunset.

REFRACTION: this is the deviation of rays due to a change in the n index
(refraction index) according to the law of Snell-Descartes. Since this
deviation  is wavelength dependant it will split a real white light into
the whole spectrum (like a glass prism that separates a white ray into
different colors from red to violet). In povray, refraction is only
effective if we use photons. As pointed out by Tim it is the origin of the
bending of light in the atmosphere (since n, which is related to density,
is smoothly increasing).

As a first approximation (I think) we can neglect the refraction effects and
only consider scattering.

So if we simplify the atmosphere with 3 layers (according to the paper I
mentioned in a previous post) and if (by trials and errors) we adjust the
coefficients for scattering color, extinction and absorbtion, then we can
get something which is not too far from reality. I have some exemples here:
www.guidevtt.com/GPS/softs_povray.php. The only difference between these 4
images is the position on the light source.

O.K. but as I mentioned before I'm still confused. Why does the color of
light change that way in the media when varying the scattering and/or the
extinction coefficient. I have added new pictures
(http://www.guidevtt.com/Z_Povland/PovRay_atmosphere/SphereAtmosphere3.php)
with a huge set of media and varying thickness, scattering coefficient and
extinction. This set was very useful to improve my atmosphere... I don't
have the code in this computer but I will add the code tomorrow. As a
summary I would like to understand the colors of this set of images...
probably it has something to do with a clear understanding of the *rgb*
function.

As usual any information is welcome!

Well, enough for today...
[Reynald] - www.guidevtt.com


Post a reply to this message

From: Tim Nikias
Subject: Re: Real sky
Date: 7 Dec 2004 18:19:24
Message: <41b63a7c$1@news.povray.org>
You're explanations of scattering and refraction are physically correct (as
far as I can tell), but POV-Ray can't, not even with photons, create the
physical scattering effect you describe.

POV-Ray will only bend a ray or a photon's direction once it hits a surface
with a refractive value. When using photons and dispersion, a white photon
will be split into several photons with colors set according to the
wavelength, but still *only* rgb-value, not real wavelengths. The dispersion
itself is also just dependant of the refractive value and the dispersion
value, the color of the light will have no influence.

Scattering in POV-Ray will just "brighten" the media where light rays or
photons pass through. Neither the rays, nor the photons will be bent along
different paths when going from dense to sparse regions, it's always a
straight path. The scattering media types only *simulate* this bending by
brightening the samples according to the angle they are being hit by light
rays and where the camera is positioned.

To your technique with three hulls, varying extinction and absorption
values: it should work with some tweaking and the correct use of different
scattering types (or different values for the rayleigh scattering) so that
one or the other hull is more predominant when the sun is at a certain
position. I think you'd have to resort more to experimentation and tweaking,
rather than much mathematical research. Judging by your posts, the needed
background knowledge is present, it's just a matter of implementation and
artistic merit.

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Reynald
Subject: Re: Real sky
Date: 9 Dec 2004 05:00:00
Message: <web.41b821e37f847b5df5f6f3660@news.povray.org>
Well, now I understand how POV-Ray *simulates* the scattering of light in a
media.
Meanwhile I have added the source code used to test the Rayleigh media, the
link is with the pictures. This test media is inside a box, it is a single
media with rayleigh scattering.

When I will be finished with my 3 hulls atmosphere I will try to put
everything in an include file and add a link in this thread.

Thanks for your help.

[Reynald] - guidevtt.com


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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