POV-Ray : Newsgroups : povray.beta-test : Iridescense Bug Server Time
23 Dec 2024 12:49:38 EST (-0500)
  Iridescense Bug (Message 1 to 9 of 9)  
From: clipka
Subject: Iridescense Bug
Date: 8 Aug 2009 14:50:25
Message: <4a7dc8f1$1@news.povray.org>
If one has a closer look at Iridescence, the results are devastating.

Take the scene below, for instance:
- We have two spheres, one with "irid" and one without.
- The non-iridescent sphere is set to be 100% white, the brightest you 
can realistically have. The iridescent one is set to pitch black except 
for the iridescence contribution.
- We have two very dim light sources, one of which is a spotlight with 
smooth falloff.

What's wrong?
- The iridescent sphere is brighter than the white one!
- The iridescence effect breaks the smooth spotlight.

If you toy around more with lighting, you'll notice that the iridescence 
effect perfectly ignores how bright the light of any particular source 
is - as long as it isn't zero.

What else?
- Try setting the "thickness" value to something extremely low; 
theoretically, this should kill off any interference at visible 
wavelengths; yet the iridescence effect adds some plain grey.
- If you toy around with camera perspective, you may notice that it has 
no influence on the iridescence effect; theoretically, it should be 
influenced by both the light source *and* observer position.

To make a long story short: Iridescence is badly broken (and has always 
been, by the way). I suggest to give it a major overhaul - even at the 
cost of breaking compatibility with 3.6.

----------------------------
camera {
   location  <0.0, 0.5, -4.0>
   direction 1.5*z
   right     x*image_width/image_height
   look_at   <0,0,0>
}

light_source { <0,30,-30> color rgb 0.2
   spotlight point_at 0.0 radius 0.5 falloff 1.0
}

light_source { <-30,30,-30> color rgb 0.1 }

default {
   finish { ambient 0 diffuse 1 specular 0 }
}

plane { y, -1
   pigment { checker color rgb 1 color rgb 0.5 rotate y*30 }
}

sphere { -x, 1
   pigment { color rgb 1 }
}

sphere { x, 1
   pigment { color rgb 0 }
   finish { irid { 0.5 thickness 1 turbulence 0.5 } }
}
----------------------------


Post a reply to this message

From: Thomas de Groot
Subject: Re: Iridescense Bug
Date: 9 Aug 2009 11:35:13
Message: <4a7eecb1$1@news.povray.org>
"clipka" <ano### [at] anonymousorg> schreef in bericht 
news:4a7dc8f1$1@news.povray.org...
> To make a long story short: Iridescence is badly broken (and has always 
> been, by the way). I suggest to give it a major overhaul - even at the 
> cost of breaking compatibility with 3.6.

That last should not be a problem imo. Good spotting by the way.

Thomas


Post a reply to this message

From: clipka
Subject: Re: Iridescense Bug
Date: 9 Aug 2009 11:52:49
Message: <4a7ef0d1$1@news.povray.org>
Thomas de Groot schrieb:
>> To make a long story short: Iridescence is badly broken (and has always 
>> been, by the way). I suggest to give it a major overhaul - even at the 
>> cost of breaking compatibility with 3.6.
> 
> That last should not be a problem imo. Good spotting by the way.

I actually stumbled across it while examining the code, to get a better 
understanding of the various functions involved in illumination.


Post a reply to this message

From: Warp
Subject: Re: Iridescense Bug
Date: 9 Aug 2009 11:57:12
Message: <4a7ef1d8@news.povray.org>
Thomas de Groot <tDOTdegroot@interdotnlanotherdotnet> wrote:
> "clipka" <ano### [at] anonymousorg> schreef in bericht 
> news:4a7dc8f1$1@news.povray.org...
> > To make a long story short: Iridescence is badly broken (and has always 
> > been, by the way). I suggest to give it a major overhaul - even at the 
> > cost of breaking compatibility with 3.6.

> That last should not be a problem imo.

  Especially since iridescence seems to be one of the features seldom used
by anybody, for some reason.

-- 
                                                          - Warp


Post a reply to this message

From: MDenham
Subject: Re: Iridescense Bug
Date: 10 Aug 2009 00:20:00
Message: <web.4a7f9ef56edb0afeff536cf30@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Thomas de Groot <tDOTdegroot@interdotnlanotherdotnet> wrote:
> > "clipka" <ano### [at] anonymousorg> schreef in bericht
> > news:4a7dc8f1$1@news.povray.org...
> > > To make a long story short: Iridescence is badly broken (and has always
> > > been, by the way). I suggest to give it a major overhaul - even at the
> > > cost of breaking compatibility with 3.6.
>
> > That last should not be a problem imo.
>
>   Especially since iridescence seems to be one of the features seldom used
> by anybody, for some reason.
>
> --
>                                                           - Warp
Probably because it's a royal pain in the neck to tune properly, and rarely
looks "right". :-)

Really, between iridescence, dispersion, and photons, an alternate color system
- basically, "give us the spectrum" rather than "give us the effective color" -
seems like it's almost a necessity.  (Probably wouldn't hurt the whole
subsurface system either.)

That's just asking for potentially ugly code, though, and is more the realm of
4.0 than 3.7 anyway...


Post a reply to this message

From: Alain
Subject: Re: Iridescense Bug
Date: 11 Aug 2009 13:16:11
Message: <4a81a75b$1@news.povray.org>

> Thomas de Groot <tDOTdegroot@interdotnlanotherdotnet> wrote:
>> "clipka" <ano### [at] anonymousorg> schreef in bericht 
>> news:4a7dc8f1$1@news.povray.org...
>>> To make a long story short: Iridescence is badly broken (and has always 
>>> been, by the way). I suggest to give it a major overhaul - even at the 
>>> cost of breaking compatibility with 3.6.
> 
>> That last should not be a problem imo.
> 
>   Especially since iridescence seems to be one of the features seldom used
> by anybody, for some reason.
> 
Some reasons:
  - hard to set up
  - seldom gives correct results
  - very small parameter changes can result in extreeme and unexpected 
changes
  - large parameter changes may not change the end result at all
  - it often goes from not to almost not visible effect to overwhelming

In one of my dablings, adding "turbulence 0.01" resulted in a totaly 
white surface.


Alain


Post a reply to this message

From: Alain
Subject: Re: Iridescense Bug
Date: 21 Aug 2009 20:27:48
Message: <4a8f3b84$1@news.povray.org>

> Thomas de Groot <tDOTdegroot@interdotnlanotherdotnet> wrote:
>> "clipka" <ano### [at] anonymousorg> schreef in bericht 
>> news:4a7dc8f1$1@news.povray.org...
>>> To make a long story short: Iridescence is badly broken (and has always 
>>> been, by the way). I suggest to give it a major overhaul - even at the 
>>> cost of breaking compatibility with 3.6.
> 
>> That last should not be a problem imo.
> 
>   Especially since iridescence seems to be one of the features seldom used
> by anybody, for some reason.
> 
Sample showing the problem when you use irid with turbulence.

With no turbulence, the two halves of the top part are identical.

They react to the positions of the two light_source.
With any amount of turbulence, the left part becomes extremely different.

It NO LONGER react to the direction of the incoming light. The perturbed 
pattern continue from area lighted by the two lights to areas 
illuminated by only one with only a difference in brightness. You cam 
move the lights any way you want, the perturbed irid pattern won't change.

Very small turbulence values result in a totaly washed out effect with 
no iridescence at all. Try "turbulence 0.01" or less.

union{
	union{
		box{<0,100,0><100,0,1>}
		sphere{<3,3,0>2}
		finish{irid{ 0.5 thickness 0.1}}}
	union{
		box{<0,100,0><-100,0,1>}
		sphere{<-3,3,0>2}
		finish{irid{ 0.5 thickness 0.1 	turbulence clock}}}
	union{
		box{<-100,0,0><100,-100,1>}
		sphere{<0,-3,0>2}
		}
	pigment{rgb 0.25}
	}

camera{location -15*z look_at 0 direction z up y right x}

light_source{<0,60,-50> rgb 0.4
//rotate 360*z*clock
}
light_source{<60,0,-50> rgb 0.4 spotlight point_at 0 radius 0 falloff 5
//rotate 360*z*clock
}


Post a reply to this message

From: clipka
Subject: Re: Iridescense Bug
Date: 22 Aug 2009 00:05:47
Message: <4a8f6e9b$1@news.povray.org>
Alain schrieb:
> Sample showing the problem when you use irid with turbulence.

I didn't even see /that/ problem yet, but yes, that part is bogus, too: 
The code is written in such a way that when turbulence is used...

(a) the effective turbulence "strength" is always 1.0
(b) the value specified with the "turbulence" keyword instead multiplies 
the thickness parameter

I guess that (a) causes the (apparent) angle-independence of the effect, 
as the film thickness varies too much to see any influence of the light 
direction, while (b) causes small turbulence values to kill the whole 
iridescence effect (with the wrong side effect of greying out the whole 
color).


Man, that code is probably the crappiest part in all of POV-Ray.


Post a reply to this message

From: Alain
Subject: Re: Iridescense Bug
Date: 22 Aug 2009 18:16:09
Message: <4a906e29$1@news.povray.org>

> Alain schrieb:
>> Sample showing the problem when you use irid with turbulence.
> 
> I didn't even see /that/ problem yet, but yes, that part is bogus, too: 
> The code is written in such a way that when turbulence is used...
> 
> (a) the effective turbulence "strength" is always 1.0
> (b) the value specified with the "turbulence" keyword instead multiplies 
> the thickness parameter
> 
> I guess that (a) causes the (apparent) angle-independence of the effect, 
> as the film thickness varies too much to see any influence of the light 
> direction, while (b) causes small turbulence values to kill the whole 
> iridescence effect (with the wrong side effect of greying out the whole 
> color).
> 
> 
> Man, that code is probably the crappiest part in all of POV-Ray.

I can agree with you. That peice of code is rotten to the core.

I think that this is a cese where you must recode the whole thing 
without regard to backware compatibility with older scenes.
Older scenes that do use the feature will probably benefit from the change.


Alain


Post a reply to this message

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