POV-Ray : Newsgroups : povray.off-topic : ANN: New, open-source, free software rendering system for physically correc= : Re: ANN: New, open-source, free software rendering system for physically co= Server Time
11 Oct 2024 19:17:19 EDT (-0400)
  Re: ANN: New, open-source, free software rendering system for physically co=  
From: Vincent Le Chevalier
Date: 25 Oct 2007 19:01:10
Message: <47212036$1@news.povray.org>
Warp wrote:
> Rune <aut### [at] runevisioncom> wrote:
>> I'd guess that whenever rays hits a both reflective and refractive surface, 
>> each ray is not split in two, but some of the rays go through while others 
>> are reflected (say, 50/50).
> 
>   I have been thinking about this, but there's one problem I can't think
> a solution for:
> 
>   For approximately half of the rays which hit the surface only reflection
> is calculated (and for the rest of the rays only refraction). So basically
> for those rays the surface is only reflective, but not refractive. Or in
> other words, for those rays it's an *opaque* surface.
> 
>   The problem is: For these rays, which see the object as opaque, what
> surface color should they use? They cannot simply return the color of
> the reflected ray because it may not be 100% reflection. If the surface
> is, for example, 20% reflective, than only 20% of the reflected ray color
> will be mixed with 80% of something else.

As far as I understand, there is no mixing going on in these methods, 
not at the ray level. You don't shoot one ray per pixel, you shoot many 
of them, and make them bounce around surfaces or refract with 
probabilities according to the transparency.

In your example, you would fire 100 rays, and have:
~80 that are refracted, and colored by the "transmitted" color of the 
surface
~20 that are reflected, and colored by the "reflective" color of the surface

In the end you average all the intensities, and you get, statistically, 
the same result you'd get with a classical raytracer: 80% of refracted 
ray color * "transmitted" color, 20% of reflected ray color * 
"reflective" color.

This sounds horridly ineffective, but since you spawn only one ray at 
each surface intersection, instead of two, you are able to go much 
further, without stopping at a fixed bailout, because you are not 
stopped by the exponential growth in the number of rays. This is roughly 
what makes the renderer unbiased.

I'm quite sure there are better explanations than this floating around, 
though :-)

-- 
Vincent


Post a reply to this message

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