POV-Ray : Newsgroups : povray.general : Bug with dispersion Server Time
17 Nov 2024 11:11:00 EST (-0500)
  Bug with dispersion (Message 1 to 9 of 9)  
From: Daniel Nilsson
Subject: Bug with dispersion
Date: 25 Mar 2003 14:27:39
Message: <3e80adab$1@news.povray.org>
In my last image I came across a bug in the dispersion code that other
people also seems to have found.
I posted a small part of the image showing the bug in a message titled
"Dispersion bug?" in p.b.i. I got an answer pointing me to the thread "Lucy
in the sky with diamonds". Reading it I found out that the bug is present in
the official win32 build and disappears if you recompile with MSVC. I could
not find any more information about the bug so I have started to make an
investigation.

I made a little test scene to see when the bug shows up.
The source is posted in p.b.s-f and the results on my computer is posted in
p.b.i.

The error that happens is that the red channel is missing from the image at
some places resulting in areas that are blue-cyan-green. The red is not only
missing from the refracted part but also from reflections and specular
highlights.
I think that the problem shows up when total internal reflection occurs
because the error in the image is near the edge of the sphere.
It seems it is only when you use despersion in combination with both fresnel
reflection and the conserve_enegry keyword that the bug is there.

I would like that other people try my test scene and post the result here so
we can get a list of what versions have the bug.

My system:
PovRay 3.5 win32 official build, Windows XP SP1, Athlon XP 2400+ => Buggy

--
Daniel Nilsson


Post a reply to this message

From: Manuel Kasten
Subject: Re: Bug with dispersion
Date: 25 Mar 2003 15:59:15
Message: <3e80c323$2@news.povray.org>
"Daniel Nilsson" <dan### [at] daniel-nilssoncom> schrieb:
> My system:
> PovRay 3.5 win32 official build, Windows XP SP1, Athlon XP 2400+ => Buggy

My system:

Athlon XP 1900+


PovRay 3.5 win32 official, WinXP SP1   -> Buggy

MegaPov 1.0, WinXP SP1   -> not Buggy

PovRay 3.5 Linux official, Debian/GNU Linux   -> Buggy (different shades of
cyan, see p.b.i)



--
MfG

Manuel Kasten


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Bug with dispersion
Date: 25 Mar 2003 16:05:35
Message: <3e80c49f@news.povray.org>
Win98, Athlon 1.4 GHz, 768 MB RAM,
POV-Ray for Windows 3.5

Buggy, just cyan as in initial demo-image.

--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

> In my last image I came across a bug in the dispersion code that other
> people also seems to have found.
> I posted a small part of the image showing the bug in a message titled
> "Dispersion bug?" in p.b.i. I got an answer pointing me to the thread
"Lucy
> in the sky with diamonds". Reading it I found out that the bug is present
in
> the official win32 build and disappears if you recompile with MSVC. I
could
> not find any more information about the bug so I have started to make an
> investigation.
>
> I made a little test scene to see when the bug shows up.
> The source is posted in p.b.s-f and the results on my computer is posted
in
> p.b.i.
>
> The error that happens is that the red channel is missing from the image
at
> some places resulting in areas that are blue-cyan-green. The red is not
only
> missing from the refracted part but also from reflections and specular
> highlights.
> I think that the problem shows up when total internal reflection occurs
> because the error in the image is near the edge of the sphere.
> It seems it is only when you use despersion in combination with both
fresnel
> reflection and the conserve_enegry keyword that the bug is there.
>
> I would like that other people try my test scene and post the result here
so
> we can get a list of what versions have the bug.
>
> My system:
> PovRay 3.5 win32 official build, Windows XP SP1, Athlon XP 2400+ => Buggy
>
> --
> Daniel Nilsson
>
>


Post a reply to this message

From: Daniel Nilsson
Subject: Re: Bug with dispersion
Date: 26 Mar 2003 06:18:59
Message: <3e818ca3@news.povray.org>
I managed to get a MSVC 6 compiled version of povray 3.5 (from official
source code).

Now the result is like Manuel Kasten's result on linux. The image with both
fresnel and conserve_energy have a cyan "edge" but it is not sharp as with
the official win32 version. The other images looks fine.

To Manuel Kasten: What did the images produced by MegaPov look like?

I would expect all four images to be exactly the same. But I am not sure of
what the currect image is, I think it is the image without the cyan edge,
but the image with the soft edge (from MSVC or linux) looks somewhat ok too
if you increase dispersion_sample.

--
Daniel Nilsson


Post a reply to this message

From: Manuel Kasten
Subject: Re: Bug with dispersion
Date: 26 Mar 2003 10:50:43
Message: <3e81cc53$1@news.povray.org>
Daniel Nilsson wrote:
>
> To Manuel Kasten: What did the images produced by MegaPov look like?
>
> I would expect all four images to be exactly the same.


All 4 images look identical to me in MegaPov.
(That's what I would expect anyway...)

--
MfG

Manuel Kasten


Post a reply to this message

From: Daniel Nilsson
Subject: Re: Bug with dispersion
Date: 26 Mar 2003 16:16:17
Message: <3e8218a1$1@news.povray.org>
"Manuel Kasten" <kas### [at] gmxde> wrote in message
news:3e81cc53$1@news.povray.org...
>
> All 4 images look identical to me in MegaPov.
> (That's what I would expect anyway...)

Then there is a bug in all versions of povray 3.5 (and a worse one in the
win32 official) that are not in megapov.
I will download megapov source and compare to povray when I get some spare
time...

Thanks for taking the time to test the scene for me!

--
Daniel Nilsson


Post a reply to this message

From: Jellby
Subject: Re: Bug with dispersion
Date: 26 Mar 2003 17:10:55
Message: <3e82256e@news.povray.org>
Among other things, Daniel Nilsson wrote:

> "Manuel Kasten" <kas### [at] gmxde> wrote in message
> news:3e81cc53$1@news.povray.org...
>>
>> All 4 images look identical to me in MegaPov.
>> (That's what I would expect anyway...)
> 
> Then there is a bug in all versions of povray 3.5 (and a worse one in the
> win32 official) that are not in megapov.
> I will download megapov source and compare to povray when I get some spare
> time...
> 
> Thanks for taking the time to test the scene for me!

I tried with my self-compiled (with gcc3.2, under RedHat 7.3) povray 3.5, I 
didn't see any difference between the 4 images.

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: Hughes, B 
Subject: Re: Bug with dispersion
Date: 27 Mar 2003 03:40:02
Message: <3e82b8e2@news.povray.org>
Yes, I see it too.

Massimo Valentini pointed out to me, a couple months back, a possible
relevant part of lighting.cpp from the POV-Ray source code which might be
flawed. The section deals with dispersion in fresnel reflectivity and a part
is commented out as being experimental. Perhaps that was uncommented for use
in MegaPOV 1.0 but I haven't got the source for it to check on that. So,
anyone curious about it might want to have a look there in lighting.cpp; the
part in question is for 'determine_reflectivity'.

I haven't been POVing much these past two months, even less reading of these
newsgroups lately... until now. This does seem to be related to what Dick
Conley had pointed out before. There apparently hasn't been more discussion
of it besides this thread now, just so you know.


Post a reply to this message

From: Roz
Subject: Re: Bug with dispersion
Date: 9 Apr 2003 12:13:37
Message: <3e9446b1@news.povray.org>
Jellby wrote:
> Among other things, Daniel Nilsson wrote:
> 
> 
>>"Manuel Kasten" <kas### [at] gmxde> wrote in message
>>news:3e81cc53$1@news.povray.org...
>>
>>>All 4 images look identical to me in MegaPov.
>>>(That's what I would expect anyway...)
>>
>>Then there is a bug in all versions of povray 3.5 (and a worse one in the
>>win32 official) that are not in megapov.
>>I will download megapov source and compare to povray when I get some spare
>>time...
>>
>>Thanks for taking the time to test the scene for me!
> 
> 
> I tried with my self-compiled (with gcc3.2, under RedHat 7.3) povray 3.5, I 
> didn't see any difference between the 4 images.
> 

When Daniel Nilsson first reported this bug in this thread I tested my 
self-compiled povray 3.5 (Linux gcc 3.2.2) out and didn't see any blue 
in the 4th image either. Then a few days ago I downloaded and compiled 
the most recent povray sources and the blue coloring appeared in the 4th 
image.

I noticed during the compiling that there were more optimization flags 
being used than I had used in prior compiles. After some experimentation 
  I isolated the problem. It is the -ffast-math flag. If I take that 
flag out of the src/Makefile CFLAGS and CXXFLAGS then the blue tainting 
disappears.

-Roz


Post a reply to this message

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