POV-Ray : Newsgroups : povray.newusers : Where's my chromatic dispersion? Server Time
26 Nov 2024 17:42:37 EST (-0500)
  Where's my chromatic dispersion? (Message 1 to 8 of 8)  
From: Jack Twilley
Subject: Where's my chromatic dispersion?
Date: 8 Mar 2004 08:46:31
Message: <863c8jcv3h.fsf@duchess.twilley.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I read that POV-Ray supports chromatic dispersion, so I designed a
scene that would demonstrate this but it doesn't seem to be working.

The simple scene has a light case generating a small effectively
collimated beam of light which is directed at a prism with a target on
the far side of the prism.  

I expected to get a rainbow pattern on the target, but instead the
light passes directly through the prism without refracting or
reflecting in any noticeable way.

The scene file:  http://www.twilley.org/~jmt/tmp/chromatic.pov
The output file:  http://www.twilley.org/~jmt/tmp/chromatic.png

For the output, I used the following command line:

povray -h600 -w800 +A +AM2 +R7 +J -ichromatic.pov

The "+A +AM2 +R7 +J" don't seem to really matter, though, because I
get effectively the same results without the added settings, and it
takes seven seconds instead of thirteen minutes on my machine.

What am I missing?

Jack.
- -- 
Jack Twilley
jmt at twilley dot org
http colon slash slash www dot twilley dot org slash tilde jmt slash
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFATHiXGPFSfAB/ezgRAl6LAJ9Yrvu0BUJ1FF5wPd8ETVuz/Zn/dACgijcu
wX88GUJmhAJbPb78ybJpdu0=
=/0i9
-----END PGP SIGNATURE-----


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Where's my chromatic dispersion?
Date: 8 Mar 2004 11:10:59
Message: <404c9b13$1@news.povray.org>
> What am I missing?

Probably the photons. A raytracer just shoots a ray at a point in the scene,
checks the lighting on that point by looking if the lightsources are blocked
by other objects. Now, when there's a transparent object in the way, the
light just gets dimmed.

In order to truly trace where the light goes, you need photon lightmapping.
What it does is shoot photons out of lightsources and direct those onto
reflective or refractive objects. They will cast solild black shadows then,
but the photons will light the scene where they end up, so a transparent
object with ior 1 will look almost the same.

But then you can use dispersion, and photons don't stay white little
lightsources, but rather are divided into an amount of colored lightsources
that are refracted slightly differently, voila: the dispersion effect is
born!

So, trudge to the docs and look for photons. :-)

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>
Email: tim.nikias (@) nolights.de


Post a reply to this message

From: Christopher James Huff
Subject: Re: Where's my chromatic dispersion?
Date: 8 Mar 2004 20:59:36
Message: <cjameshuff-F24AD0.20593608032004@news.povray.org>
In article <404c9b13$1@news.povray.org>,
 "Tim Nikias v2.0" <tim.nikias (@) nolights.de> wrote:

> > What am I missing?
> 
> Probably the photons. A raytracer just shoots a ray at a point in the scene,
> checks the lighting on that point by looking if the lightsources are blocked
> by other objects. Now, when there's a transparent object in the way, the
> light just gets dimmed.

Dispersion affects transmitted view rays as well as photons. The image 
of an object viewed through a refracting object with dispersion will 
exhibit the dispersion. In fact, this form of the dispersion feature 
predated the photon mapping version.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Where's my chromatic dispersion?
Date: 8 Mar 2004 21:25:52
Message: <cjameshuff-D5A403.21255108032004@news.povray.org>
In article <863### [at] duchesstwilleyorg>,
 Jack Twilley <jmt+use### [at] twilleyorg> wrote:

> I expected to get a rainbow pattern on the target, but instead the
> light passes directly through the prism without refracting or
> reflecting in any noticeable way.

Hmm...I see a rainbow. Even in the image you gave. Do you expect it to 
be spread out more?
First, your dispersion_samples is quite high, and your photon count a 
bit low. I dropped dispersion_samples to 20, and raised photon count to 
5000000, the result was a clearer looking rainbow spot. Second, 1.2 is a 
pretty low ior for glass, I replaced it with 1.4, and raised dispersion 
to 1.06 and the light source brightness to 5 in order to exaggerate the 
effect.

BTW, the maximum max_trace_level is 256, 20000 is a little high.


> The "+A +AM2 +R7 +J" don't seem to really matter, though, because I
> get effectively the same results without the added settings, and it
> takes seven seconds instead of thirteen minutes on my machine.

It will make no difference as far as dispersion is concerned. As for the 
speed...you could probably get a big improvement in speed by lowering 
the recursion level. 7 is quite deep for this, lower recursions can 
usually give good results with much less of an impact on speed.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Jack Twilley
Subject: Re: Where's my chromatic dispersion?
Date: 9 Mar 2004 00:44:53
Message: <86smgibmq8.fsf@duchess.twilley.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Christopher" == Christopher James Huff <cja### [at] earthlinknet> writes:

Jack> I expected to get a rainbow pattern on the target, but instead
Jack> the light passes directly through the prism without refracting
Jack> or reflecting in any noticeable way.

The version of the file sitting at that URL is newer than the original
post.  I had followed the photon hint and gotten a rainbow.

Christopher> Hmm...I see a rainbow. Even in the image you gave. Do you
Christopher> expect it to be spread out more?  First, your
Christopher> dispersion_samples is quite high, and your photon count a
Christopher> bit low. I dropped dispersion_samples to 20, and raised
Christopher> photon count to 5000000, the result was a clearer looking
Christopher> rainbow spot. Second, 1.2 is a pretty low ior for glass,
Christopher> I replaced it with 1.4, and raised dispersion to 1.06 and
Christopher> the light source brightness to 5 in order to exaggerate
Christopher> the effect.

Ahhh!  I was looking for how to crank up the brightness!  It's not in
the manual under "brightness", but a reread of 6.5.7.1 shows that I
just needed to crank up the three RGB values.  Sometimes I amaze
myself.  

Christopher> BTW, the maximum max_trace_level is 256, 20000 is a
Christopher> little high.

Yeah, I gathered that.

Jack> The "+A +AM2 +R7 +J" don't seem to really matter, though,
Jack> because I get effectively the same results without the added
Jack> settings, and it takes seven seconds instead of thirteen minutes
Jack> on my machine.

Christopher> It will make no difference as far as dispersion is
Christopher> concerned. As for the speed...you could probably get a
Christopher> big improvement in speed by lowering the recursion
Christopher> level. 7 is quite deep for this, lower recursions can
Christopher> usually give good results with much less of an impact on
Christopher> speed.

That's what I figured.  Thanks for the tip!

Now to figure out why pov-mode.el is disregarding the customize
settings I've made...

Jack.
- -- 
Jack Twilley
jmt at twilley dot org
http colon slash slash www dot twilley dot org slash tilde jmt slash
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFATVk1GPFSfAB/ezgRAuLiAKDNjSTFP6qRRyGF50CkNTOdXjNkZACcDQif
hsE1UsK/b+TGa1+Q4hmzz8c=
=RB1x
-----END PGP SIGNATURE-----


Post a reply to this message

From: Jack Twilley
Subject: Re: Where's my chromatic dispersion?
Date: 9 Mar 2004 03:50:41
Message: <86n06qpfsz.fsf@duchess.twilley.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Christopher" == Christopher James Huff <cja### [at] earthlinknet> writes:

Jack> I expected to get a rainbow pattern on the target, but instead
Jack> the light passes directly through the prism without refracting
Jack> or reflecting in any noticeable way.

Christopher> Hmm...I see a rainbow. Even in the image you gave. Do you
Christopher> expect it to be spread out more?

Upon further examination, I don't actually see a rainbow.  I see three
blobs, one for red, one for blue, and one for yellow or green.  I
don't see a continuous band.  How do I get a continuous band?

Jack.
- -- 
Jack Twilley
jmt at twilley dot org
http colon slash slash www dot twilley dot org slash tilde jmt slash
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFATYTBGPFSfAB/ezgRAnLHAKCsOleCMxvEE/6KSSiKKC9HQmRBGACg00Yu
q6tZ55lVx3uIHZmFAjZ23+c=
=1cDj
-----END PGP SIGNATURE-----


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Where's my chromatic dispersion?
Date: 9 Mar 2004 05:04:10
Message: <404d969a@news.povray.org>
> Dispersion affects transmitted view rays as well as photons. The image
> of an object viewed through a refracting object with dispersion will
> exhibit the dispersion. In fact, this form of the dispersion feature
> predated the photon mapping version.

Really? I didn't know that, that's great! Got to try that sometime soon. :-)

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>
Email: tim.nikias (@) nolights.de


Post a reply to this message

From: Christopher James Huff
Subject: Re: Where's my chromatic dispersion?
Date: 9 Mar 2004 21:39:25
Message: <cjameshuff-904557.21392309032004@news.povray.org>
In article <86n### [at] duchesstwilleyorg>,
 Jack Twilley <jmt+use### [at] twilleyorg> wrote:

> Christopher> Hmm...I see a rainbow. Even in the image you gave. Do you
> Christopher> expect it to be spread out more?
> 
> Upon further examination, I don't actually see a rainbow.  I see three
> blobs, one for red, one for blue, and one for yellow or green.  I
> don't see a continuous band.  How do I get a continuous band?

Well, it has a lot of artifacts because of the low photon count. You 
will get a cleaner band with more photons. Increasing the dispersion 
value will spread the spectrum out more, making it clearer. You will 
need to make the light source brighter to compensate, however.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

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