POV-Ray : Newsgroups : povray.binaries.images : Planetary atmosphere using media Server Time
31 Jul 2024 08:31:35 EDT (-0400)
  Planetary atmosphere using media (Message 11 to 14 of 14)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: clipka
Subject: Re: Planetary atmosphere using media
Date: 24 Apr 2010 04:38:59
Message: <4bd2ae23$1@news.povray.org>
Am 24.04.2010 05:57, schrieb Ray Gardener:
> clipka wrote:
>> Am 15.04.2010 11:07, schrieb Ray Gardener:
>>
>>> The problem turned out to be the color model. In RGB, it's hard or
>>> perhaps intractable; in CIE it's easy because the color units are more
>>> directly mapped to actual radiation wavelengths which the
>>> scattering/absorption equations prefer, and tonemapping to handle eye
>>> dark/light adaptation is easy too.
>>
>> Is that "CIE" as in "CIE RGB", "CIE XYZ", or "CIE L*a*b*"?
>
> CIE XYZ.

Hm... I don't see how that would more directly map to wavelengths - 
except maybe that the CIE tristimulus tables are closely related to the 
XYZ model, but that's a rather arbitrary "coincidence", and with some 
simple math you can make corresponding tables for any RGB model you choose.

Of course operating in an RGB model does require you to allow for 
negative color components to get the same gamut as XYZ.

Then again, it may be that the XYZ model just happens to be more 
forgiving when it comes to such things as multiplying two colors - which 
in theory will /never/ work out in /any/ color model that uses the 
standard three-component color vector approach.


As for tonemapping, shouldn't that just be a change in brightness? AFAIK 
the eye's brightness adaptation is a pretty linear thing.


Post a reply to this message

From: Le Forgeron
Subject: Re: Planetary atmosphere using media
Date: 24 Apr 2010 15:51:10
Message: <4bd34bae$1@news.povray.org>
Le 24/04/2010 10:38, clipka nous fit lire :

> Hm... I don't see how that would more directly map to wavelengths -
> except maybe that the CIE tristimulus tables are closely related to the
> XYZ model, but that's a rather arbitrary "coincidence", and with some
> simple math you can make corresponding tables for any RGB model you choose.
> 
> Of course operating in an RGB model does require you to allow for
> negative color components to get the same gamut as XYZ.
> 
> Then again, it may be that the XYZ model just happens to be more
> forgiving when it comes to such things as multiplying two colors - which
> in theory will /never/ work out in /any/ color model that uses the
> standard three-component color vector approach.
> 

If you wanted to have actual spectrum (discret) interaction by
multiplication, you would need to distinguish between ray colour (as a
vector) and interacting colour (as a square matrix, of same dimension)

Most of the time, the matrix would be a simple diagonal one, which might
collapse to a vector, but that's a bad approach for some material (laser
pumping ruby for instance would propably have a positive column for
694.3 nm; frequency doubling material might also be interesting and
reluctant to the pure diagonal matrix).

If you go that way, you might also want to replace ior index with a
vector (and transform refraction single ray into a collection of
spectrum-discret-number ray), or even worst construct for birefringent
material. The whole domain of nonlinear optics also opens to you... you
might start applying electric field equations into material...

A ray has a vector colour, a light source too, but media & pigment would
get matrixes. And at the end of your pixel calculation, you ends up
converting your spectrum vector into the colour space of your
image-format...
Excepted for color interpolation of color map, whose curve might be a
pain to provide in RGB when a natural model exist in another colour
space, and unless you are ready to go with the matrix-replacement for
pigment & media, very little interest, IMHO.


Post a reply to this message

From: clipka
Subject: Re: Planetary atmosphere using media
Date: 24 Apr 2010 18:39:42
Message: <4bd3732e$1@news.povray.org>
Am 24.04.2010 21:51, schrieb Le_Forgeron:

>> Then again, it may be that the XYZ model just happens to be more
>> forgiving when it comes to such things as multiplying two colors - which
>> in theory will /never/ work out in /any/ color model that uses the
>> standard three-component color vector approach.
>
> If you wanted to have actual spectrum (discret) interaction by
> multiplication, you would need to distinguish between ray colour (as a
> vector) and interacting colour (as a square matrix, of same dimension)
>
> Most of the time, the matrix would be a simple diagonal one, which might
> collapse to a vector, but that's a bad approach for some material (laser
> pumping ruby for instance would propably have a positive column for
> 694.3 nm; frequency doubling material might also be interesting and
> reluctant to the pure diagonal matrix).

I didn't even think that far; and no, even that would not be enough.

The classic color models essentially approximate a color by integrating 
over functions of the wavelength; and they approximate filtering effects 
of pigments by multiplying these integrals.

However, note that this only works out properly if the functions of the 
wavelength (whatever they may exactly represent) happen to be 
"rectangular", i.e. f'(x)=0 for any wavelength where that function is 
differentiable - or at least approximately so. Otherwise, the product of 
the integrals of two functions is typically /not/ equal to the integral 
of the two functions' product (which would be the proper way to do it).

For instance, f(x)=x and g(x)=1-x integrated over [0..1] gives 0.5 in 
both cases; multiplying these integrals gives 0.25; however, multiplying 
the functions gives f(x)*g(x)=x-x^2, the integral of which is about 0.167.


Post a reply to this message

From: Bruno Cabasson
Subject: Re: Planetary atmosphere using media
Date: 7 May 2010 08:25:00
Message: <web.4be40573b7f1ac964aa45fdf0@news.povray.org>
Ive <"ive### [at] lilysoftorg"> wrote:
> Have you looked at p.b.tutorials "TerraPOV - Sky system - Atmosphere" by
> Bruno Cabasson?
> I did use (a just slightly modified version) of his atmosphere and it
> did work fairly well and realistic.
>
> -Ive

Thank you Ive for reminding me ... My work on TerraPOV has been in a standby
state since a few months, but I still intend to go on. Firstly, I'd like to
finish my tutorials on atmosphere ans clouds. For the next chapter, I need to
work further on my model.

See you all soon.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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