POV-Ray : Newsgroups : povray.general : Q about dispersion and spectrum macro Server Time
7 Aug 2024 19:22:09 EDT (-0400)
  Q about dispersion and spectrum macro (Message 1 to 6 of 6)  
From: Thomas Lake
Subject: Q about dispersion and spectrum macro
Date: 3 Aug 2001 20:56:48
Message: <3b6b4850$1@news.povray.org>
I was playing around with dispersion a little last night, great feature! I
especially like the sphere example posted on the MegaPov examples page, the
one where you can see some dispersion in the reflection of two box's with
high ambient:

http://users.skynet.be/smellenbergh/demopictures/disp2b.jpg

I got to wondering in what situations do you need to specify the spectrum of
a light source? In the above example no spectrum has been specified yet
dispersion can be clearly scene in the reflection of the two ambient boxes.
Is a spectrum only necessary if you want the caustics cast to contain
colours? I tried specifying a spectrum for the light in the sphere scene but
all I managed to do was wash out the scene or get a very harsh yellow tinted
light, it didn't seem to change the caustics or the dispersion. Do you need
objects with sharp corners to get good results from caustics and photons,
such as a diamond or prism? I also took a look at the macro in the prism
example for creating the spectrum. Now I'm not very good at writing, let
alone reading scripts, but from some of the experiments I did and from what
I can understand of the macro it seems to simply create a color_map which
with the specified number of entries that blends through the colors of the
rainbow, ROYGBIV. When I specified my own colour map using seven entries,
ROYGBIV, I got pretty much the same results as the macro. Is this really all
the macro does? The code makes it seem more complicated than that. Thanks
for listening to this babble:-)


Post a reply to this message

From: Bob H 
Subject: Re: Q about dispersion and spectrum macro
Date: 4 Aug 2001 11:38:49
Message: <3b6c1709@news.povray.org>
"Thomas Lake" <tla### [at] homecom> wrote in message
news:3b6b4850$1@news.povray.org...
> I was playing around with dispersion a little last night, great feature! I
> especially like the sphere example posted on the MegaPov examples page,
the
> one where you can see some dispersion in the reflection of two box's with
> high ambient:
>
> http://users.skynet.be/smellenbergh/demopictures/disp2b.jpg

I believe the dispersed parts are refracted through the glass from
reflections showing up inside the sphere opposite the external reflections.
So no, dispersion doesn't affect reflections.

> I got to wondering in what situations do you need to specify the spectrum
of
> a light source? In the above example no spectrum has been specified yet
> dispersion can be clearly scene in the reflection of the two ambient
boxes.
> Is a spectrum only necessary if you want the caustics cast to contain
> colours? I tried specifying a spectrum for the light in the sphere scene
but
> all I managed to do was wash out the scene or get a very harsh yellow
tinted
> light, it didn't seem to change the caustics or the dispersion. Do you
need
> objects with sharp corners to get good results from caustics and photons,
> such as a diamond or prism? I also took a look at the macro in the prism
> example for creating the spectrum. Now I'm not very good at writing, let
> alone reading scripts, but from some of the experiments I did and from
what
> I can understand of the macro it seems to simply create a color_map which
> with the specified number of entries that blends through the colors of the
> rainbow, ROYGBIV. When I specified my own colour map using seven entries,
> ROYGBIV, I got pretty much the same results as the macro. Is this really
all
> the macro does? The code makes it seem more complicated than that. Thanks
> for listening to this babble:-)

Isn't it all some kind of babble anyway?

Sure, it's only a color_map doing any range of colors to blend that you want
it to be if making a custom one.  The fancier one provided attempts to
correct for colors you'd expect to see from sunlight, I think, but not
positive about that.
It's for photon caustics.  Regular POV caustics only use the filtered color
of the object pigment.  I don't think the light_source color_map has
anything to do with object interiors, aside from the photon mapping produced
with dispersion.

Maybe someone will correct me if I'm wrong about any of that.

Bob H.


Post a reply to this message

From: Ron Parker
Subject: Re: Q about dispersion and spectrum macro
Date: 5 Aug 2001 23:28:37
Message: <slrn9ms3n7.2h8.ron.parker@fwi.com>
On Sat, 4 Aug 2001 10:40:49 -0500, Bob H. wrote:
>It's for photon caustics.  Regular POV caustics only use the filtered color
>of the object pigment.  I don't think the light_source color_map has
>anything to do with object interiors, aside from the photon mapping produced
>with dispersion.

That's correct.  What nobody's said yet, though, is that the model in MegaPOV
is badly broken.  The "spectrum" in the original code was experimental and
buggy and looked nothing like a real spectrum, and the ability to specify a 
spectrum for a light source was broken in another way entirely: it turns
out that you can't take a color and definitively map it to a wavelength of
light; magenta, for example, does not appear in the EM spectrum.  After 
some discussion and tweaking and much research, that functionality has been
removed from POV 3.5.  Oh, and the spectrum it uses is something that at
least looks superficially like the real EM spectrum instead of a few 
simplistic linear functions and fudge factors as before.

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

From: MikeH
Subject: Re: Q about dispersion and spectrum macro
Date: 6 Aug 2001 02:58:12
Message: <3B6E3E6A.5D2837E7@aol.com>
> What nobody's said yet, though, is that the model in MegaPOV
> is badly broken.

That's for sure.  More obvious than not matching the EM spectrum was the way the
sample colors were produced.  At high sampling levels it kind of fudged towards
white but in most cases everything had a tendency to look a bit orange.  This can be
seen in the image of the sphere.  I hope 3.5 took care of this problem.

The macro than Nathan included for creating light color maps is the same one used to
create dispersion n_elems in the dispersion patch if I remember right.  The point of
having the color_map for the light was so you could create colors that look a little
better than the macro could create.

Doubt if anyone remembers, but I created that image of the sphere to serve as the
slash screen to my windows compile of Daren's dispersion patch.

-Mike


Post a reply to this message

From: Ken
Subject: Re: Q about dispersion and spectrum macro
Date: 6 Aug 2001 03:08:04
Message: <3B6E42B6.93A42827@pacbell.net>
MikeH wrote:

> Doubt if anyone remembers, but I created that image of the sphere to serve as the
> slash screen to my windows compile of Daren's dispersion patch.

I do.

-- 
Ken Tyler


Post a reply to this message

From: Ron Parker
Subject: Re: Q about dispersion and spectrum macro
Date: 6 Aug 2001 09:15:45
Message: <slrn9mt643.369.ron.parker@fwi.com>
On Mon, 06 Aug 2001 01:51:22 -0500, MikeH wrote:
>> What nobody's said yet, though, is that the model in MegaPOV
>> is badly broken.
>
>That's for sure.  More obvious than not matching the EM spectrum was the way the
>sample colors were produced.  At high sampling levels it kind of fudged towards
>white but in most cases everything had a tendency to look a bit orange.  This can be
>seen in the image of the sphere.  I hope 3.5 took care of this problem.

It's supposed to have, but if you have some test scenes I can run through 
it to make sure, I certainly wouldn't refuse them.

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

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