POV-Ray : Newsgroups : povray.programming : Tracing Secondary Rays : Re: Tracing Secondary Rays Server Time
28 Apr 2024 15:36:09 EDT (-0400)
  Re: Tracing Secondary Rays  
From: Pfingstei
Date: 14 Feb 2008 11:10:00
Message: <web.47b4671896e4f04a4df537e50@news.povray.org>
Thank you Thorsten.

Sorry for asking again, but I have to be sure.

diffuse component at intersection point 1 (primary ray): A
diffuse component at intersection point 2 (secondary ray): B


Pixel color C in image:

C = A + B            (1)

or

C = A + w*B          (2)

with w = weight factor

So your answer is: version (2) is correct?

To this end, it would be important for me to know, where this weight is applied
in the source code or how it is called (so I can search it in Microsoft Visual
Studio). So far I was looking in the functions
"compute_lighted_texture", "Reflect" and "Determine_Reflectivity"

I need to know this because I would like to test a different diffuse reflection
model. So I also need to know how the different reflection components (for
primary rays and secondary rays) are finally composed together to avoid errors.


Thorsten Froehlich <tho### [at] trfde> wrote:
> Pfingstei wrote:
> > So I would assume that POV Ray just adds diffuse reflection components of
> > primary and secondary rays without any weighting. Am I right with this
> > assumption?
>
> The weight is managed in a weight list, which is a bit complicated (and not
> really necessary, but that is another story). Either way, the texturing code
> manages that, but it also is used for secondary rays. The 3.7 source code
> might be a bit easier to follow in this regard (there you can also see why
> the list is not needed ... in case anybody wants to change that, I have some
> details about it which I should probably post somewhere).
>
>  Thorsten


Post a reply to this message

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