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:15:15 EDT (-0400)
  Re: ANN: New, open-source, free software rendering system for physically co=  
From: Warp
Date: 25 Oct 2007 18:34:38
Message: <472119fe@news.povray.org>
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.
  In regular raytracing this 80% would be the color of the refracted ray
(which is mixed with the actual color of the surface). However, since we
are not calculating refraction for this ray, we don't have the color of
the refraction.
  The only thing we have left is the surface's own color. However, if we
simply mix 20% of the reflected ray color with 80% of the surface's color,
we are basically making the surface less transparent in the overall process.
Also, what *is* this color if the surface has been defined to be completely
transparent? In that case the surface basically has no color, so there's
nothing we can mix our reflected ray color with.
  Just returning the reflected ray color is no good. That would mean that
in the end result the surface would look much more reflective and opaque
than it was set for.

  "Return only the reflected ray color, but when you are calculating the
average of all the rays sent for that pixel, only use 20% of the color of
all rays which reflected, and 80% of the color of those rays which refracted"
doesn't work either. This would work for max_trace_level 2, but no further.
If at trace level 3 the ray reflects again, we have the same problem again:
We have to mix its color at 20% with what? Or what if the ray hits another
object with a different reflection %? Moreover, what if the ray now refracts
instead?

-- 
                                                          - Warp


Post a reply to this message

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