POV-Ray : Newsgroups : povray.general : transparent objects appear opaque Server Time
28 Nov 2024 02:49:24 EST (-0500)
  transparent objects appear opaque (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: stevenvh
Subject: transparent objects appear opaque
Date: 18 Aug 2007 06:00:00
Message: <web.46c6c2a766ffc8e99dba500@news.povray.org>
Hi,
if I stack a number of transparent objects the area where light has to go
through 3 or more becomes opaque. Is there a logical explanation for this,
or is it a bug?
TIA

Steven


/* code
********************************************************************/
box { < 10, 0, 10 >, < -30, 1, -30 >  pigment { SteelBlue transmit 0.95 } }
box { < -10, 10, 10 >, < 30, 11, -30 >  pigment { SteelBlue transmit 0.95 }
}
box { < 10, 20, -10 >, < -30, 21, 30 >  pigment { SteelBlue transmit 0.95 }
}

camera {
    location <-40, 120, -50>
    right 1.333 * x
    look_at <0, 0, 0 >
    angle 50
    }

light_source { < -40, -200, -40 > color White }
background{Gray80}


Post a reply to this message

From: Christian Froeschlin
Subject: Re: transparent objects appear opaque
Date: 18 Aug 2007 06:10:07
Message: <46c6c57f$1@news.povray.org>
stevenvh wrote:

> if I stack a number of transparent objects the area where light has to go
> through 3 or more becomes opaque. Is there a logical explanation for this,
> or is it a bug?

global_settings
{
   max_trace_level 10
}

Every time a ray is reflected or refracted, new rays need to be shot
which could take long (or forever) to render if there were no limit.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: transparent objects appear opaque
Date: 18 Aug 2007 06:13:43
Message: <46c6c657@news.povray.org>
Christian Froeschlin wrote:

> Every time a ray is reflected or refracted

or when just passing through a transparent surface as in your case.


Post a reply to this message

From: Warp
Subject: Re: transparent objects appear opaque
Date: 18 Aug 2007 06:59:09
Message: <46c6d0fd@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> > Every time a ray is reflected or refracted

> or when just passing through a transparent surface as in your case.

  That's, technically speaking, refraction. The refraction just doesn't
modify the direction of the ray.

  (One cool developement idea for povray would be, I think, that if a
surface has transparency, no reflection and no ior, iow. rays just pass
through unmodified (just taking the color of the surface), povray could
skip incrementing the recursion counter. That way you could have and
indefinite amount of transparent surfaces even if max_trace_level is
small.)

-- 
                                                          - Warp


Post a reply to this message

From: Alain
Subject: Re: transparent objects appear opaque
Date: 18 Aug 2007 08:41:57
Message: <46c6e915@news.povray.org>
Warp nous apporta ses lumieres en ce 2007/08/18 06:59:
> Christian Froeschlin <chr### [at] chrfrde> wrote:
>>> Every time a ray is reflected or refracted
> 
>> or when just passing through a transparent surface as in your case.
> 
>   That's, technically speaking, refraction. The refraction just doesn't
> modify the direction of the ray.
> 
>   (One cool developement idea for povray would be, I think, that if a
> surface has transparency, no reflection and no ior, iow. rays just pass
> through unmodified (just taking the color of the surface), povray could
> skip incrementing the recursion counter. That way you could have and
> indefinite amount of transparent surfaces even if max_trace_level is
> small.)
> 
The same thing could be used for only reflective surfaces. The ray could just 
bounce.


-- 
Alain
-------------------------------------------------
EVERYTHING HAS A GENDER

You may not know this but many nonliving things have a gender...

An Hourglass is Female, because over time, the weight shifts to the bottom.


Post a reply to this message

From: Warp
Subject: Re: transparent objects appear opaque
Date: 18 Aug 2007 08:53:30
Message: <46c6ebca@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> The same thing could be used for only reflective surfaces. The ray could just 
> bounce.

  Not, it couldn't. With reflection an infinite loop can happen if the
recursion level is not limited.

-- 
                                                          - Warp


Post a reply to this message

From: Alain
Subject: Re: transparent objects appear opaque
Date: 18 Aug 2007 10:20:31
Message: <46c7002f$1@news.povray.org>
Warp nous apporta ses lumieres en ce 2007/08/18 08:53:
> Alain <ele### [at] netscapenet> wrote:
>> The same thing could be used for only reflective surfaces. The ray could just 
>> bounce.
> 
>   Not, it couldn't. With reflection an infinite loop can happen if the
> recursion level is not limited.
> 
OUPS! Missed that possibility.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you wonder if ground fog or 
athmosphere will look better for your company's market share pie chart.
Christoph Rieder


Post a reply to this message

From: Zeger Knaepen
Subject: Re: transparent objects appear opaque
Date: 18 Aug 2007 19:08:19
Message: <46c77be3$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:46c6d0fd@news.povray.org...
> Christian Froeschlin <chr### [at] chrfrde> wrote:
>> > Every time a ray is reflected or refracted
>
>> or when just passing through a transparent surface as in your case.
>
>  That's, technically speaking, refraction. The refraction just doesn't
> modify the direction of the ray.
>
>  (One cool developement idea for povray would be, I think, that if a
> surface has transparency, no reflection and no ior, iow. rays just pass
> through unmodified (just taking the color of the surface), povray could
> skip incrementing the recursion counter. That way you could have and
> indefinite amount of transparent surfaces even if max_trace_level is
> small.)

although probably a bit more complicated, couldn't this idea be expanded to 
objects that do have reflections and/or an ior?
I might be mistaken, but I believe the only way to get in an infinite loop, is 
if the ray hits the same object more than once.
So: if a ray is reflected or refracted, the recursion counter doesn't increment 
until the same object gets hit again.

there are probably some cases I'm overseeing...

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

From: Tim Attwood
Subject: Re: transparent objects appear opaque
Date: 18 Aug 2007 20:18:35
Message: <46c78c5b@news.povray.org>
>>  (One cool developement idea for povray would be, I think, that if a
>> surface has transparency, no reflection and no ior, iow. rays just pass
>> through unmodified (just taking the color of the surface), povray could
>> skip incrementing the recursion counter. That way you could have and
>> indefinite amount of transparent surfaces even if max_trace_level is
>> small.)

My thought would be that after a ray hits the max trace depth it should
ignore transmit, filter and reflection for that hit, and return a pigment
color instead of just returning black. In many cases where there is
multiple semi-transparent, or partially colored reflections, this "guess"
would result in a pixel that (after being shaded by the first hits) would
be somewhat correct. In other cases you'd get multi-color speckling,
but that is just similar to the black speckling we have now.


Post a reply to this message

From: Alain
Subject: Re: transparent objects appear opaque
Date: 18 Aug 2007 22:12:48
Message: <46c7a720$1@news.povray.org>
Tim Attwood nous apporta ses lumieres en ce 2007/08/18 20:18:
>>>  (One cool developement idea for povray would be, I think, that if a
>>> surface has transparency, no reflection and no ior, iow. rays just pass
>>> through unmodified (just taking the color of the surface), povray could
>>> skip incrementing the recursion counter. That way you could have and
>>> indefinite amount of transparent surfaces even if max_trace_level is
>>> small.)
> 
> My thought would be that after a ray hits the max trace depth it should
> ignore transmit, filter and reflection for that hit, and return a pigment
> color instead of just returning black. In many cases where there is
> multiple semi-transparent, or partially colored reflections, this "guess"
> would result in a pixel that (after being shaded by the first hits) would
> be somewhat correct. In other cases you'd get multi-color speckling,
> but that is just similar to the black speckling we have now. 
> 
> 
That's whey you have adc_bailout. It can be used to limit the depth when the 
last surface contribution fals under the threshold.

-- 
Alain
-------------------------------------------------
99 percent of lawyers give the rest a bad name.


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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