POV-Ray : Newsgroups : povray.newusers : Real sky Server Time
30 Jul 2024 06:18:11 EDT (-0400)
  Real sky (Message 11 to 15 of 15)  
<<< Previous 10 Messages Goto Initial 10 Messages
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 10 Messages Goto Initial 10 Messages

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