POV-Ray : Newsgroups : povray.programming : Another question about radiosity Server Time
28 Jul 2024 06:20:06 EDT (-0400)
  Another question about radiosity (Message 1 to 3 of 3)  
From: Christoph Hormann
Subject: Another question about radiosity
Date: 3 Sep 2002 14:31:38
Message: <3D75000A.6D273FD1@gmx.de>
I found another strange thing in the radiosity code: There is a 'scale'
factor in the ra_gather() function (file radiosit.cpp) that is used in
line 794:

VAddScaledEq(Colour_Sums, scale, Temp_Colour);

to scale the color.  It's value is set to 1.0 in line 668 but not used or
changed anywhere else.  It seems to be a remainder from megapov when there
was a 'PHOTONS_DIRECT' switch - i'm not sure what it was about.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Nathan Kopp
Subject: Re: Another question about radiosity
Date: 3 Sep 2002 22:58:59
Message: <3d7576f3$1@news.povray.org>
Yes, that's old MegaPov code.  The feature that you are referring to
(PHOTONS_DIRECT) was also called "global photons."  When enabled, global
photons would be used to focus the radiosity rays towards brighter objects
in the scene.  The purpose was to give better results with fewer samples.
It wasn't completely successful, so it didn't get included in POV 3.5.

The purpose of the "scale" variable was to offset the bias introduced by the
non-uniform distribution function.  Because the regular distribution is
uniform (or at least carefully selected to be specifically non-uniform), we
don't have any bias to offset, so the scale factor is 1.0.  Of course, now
this is an unnecessary computation that wastes CPU cycles.

-Nathan


"Christoph Hormann" <chr### [at] gmxde> wrote...
>
> I found another strange thing in the radiosity code: There is a 'scale'
> factor in the ra_gather() function (file radiosit.cpp) that is used in
> line 794:
>
> VAddScaledEq(Colour_Sums, scale, Temp_Colour);
>
> to scale the color.  It's value is set to 1.0 in line 668 but not used or
> changed anywhere else.  It seems to be a remainder from megapov when there
> was a 'PHOTONS_DIRECT' switch - i'm not sure what it was about.
>
> Christoph
>
> --
> POV-Ray tutorials, IsoWood include,
> TransSkin and more: http://www.tu-bs.de/~y0013390/
> Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Christoph Hormann
Subject: Re: Another question about radiosity
Date: 4 Sep 2002 06:52:19
Message: <3D75E5E2.917955B9@gmx.de>
Nathan Kopp wrote:
> 
> Yes, that's old MegaPov code.  The feature that you are referring to
> (PHOTONS_DIRECT) was also called "global photons."  When enabled, global
> photons would be used to focus the radiosity rays towards brighter objects
> in the scene.  The purpose was to give better results with fewer samples.
> It wasn't completely successful, so it didn't get included in POV 3.5.

Ah, thanks for clearing this up.

I thought global photons were just desactivated by default but not removed
in POV-Ray 3.5, there is a lot of '#ifdef GLOBAL_PHOTONS' in the source at
various places.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

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