![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Michael Andrews wrote:
> On a related theme, in the same function there is a block starting at
> line 1179 which calculates 'gather_grey' from 'Radiosity_Gather_Total'
> and 'Radiosity_Gather_Total_Count'.
OK, now I'm confused.
I had a look for these variables in the source:
$ grep -n 'Radiosity_Gather_Total' *.cpp
octree.cpp:1082: Make_Colour(Radiosity_Gather_Total, 0., 0., 0.);
octree.cpp:1083: Radiosity_Gather_Total_Count = 0;
radiosit.cpp:110:COLOUR Radiosity_Gather_Total;
radiosit.cpp:111:long Radiosity_Gather_Total_Count;
radiosit.cpp:837: VAddEq(Radiosity_Gather_Total, Illuminance);
radiosit.cpp:838: Radiosity_Gather_Total_Count++;
render.cpp:967: Make_Colour(Radiosity_Gather_Total, 0.0, 0.0, 0.0);
render.cpp:968: Radiosity_Gather_Total_Count = 0;
render.cpp:1185: if ( Radiosity_Gather_Total_Count )
render.cpp:1187: VInverseScale(avg_gather,
Radiosity_Gather_Total, (DBL)Radiosity_Gather_Total_Count);
$ grep -n 'Radiosity_Gather_Total' *.h
radiosit.h:89:extern COLOUR Radiosity_Gather_Total;
radiosit.h:90:extern long Radiosity_Gather_Total_Count;
$ grep -n 'avg_gather' *.cpp
render.cpp:957: COLOUR Colour, avg_gather;
render.cpp:1187: VInverseScale(avg_gather,
Radiosity_Gather_Total, (DBL)Radiosity_Gather_Total_Count);
render.cpp:1188: gather_grey = avg_gather[pRED] +
avg_gather[pGREEN] + avg_gather[pBLUE];
$ grep -n 'gather_grey' *.cpp
render.cpp:956: DBL grey, gather_grey;
render.cpp:1188: gather_grey = avg_gather[pRED] +
avg_gather[pGREEN] + avg_gather[pBLUE];
render.cpp:1189: if ( gather_grey > 0. )
render.cpp:1193: /*opts.Radiosity_Brightness = 3. /
gather_grey; */
Looking at the code I can not see that these variables do anything. Am I
wrong?
Could someone please tell me what does effect the automatic radiosity
brightness adjustment?
A very puzzled,
Mike Andrews.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Two words:
Legacy code.
-Nathan
"Michael Andrews" <m.c### [at] reading ac uk> wrote...
> Michael Andrews wrote:
> > On a related theme, in the same function there is a block starting at
> > line 1179 which calculates 'gather_grey' from 'Radiosity_Gather_Total'
> > and 'Radiosity_Gather_Total_Count'.
>
> OK, now I'm confused.
>
> I had a look for these variables in the source:
>
> $ grep -n 'Radiosity_Gather_Total' *.cpp
> octree.cpp:1082: Make_Colour(Radiosity_Gather_Total, 0., 0., 0.);
> octree.cpp:1083: Radiosity_Gather_Total_Count = 0;
> radiosit.cpp:110:COLOUR Radiosity_Gather_Total;
> radiosit.cpp:111:long Radiosity_Gather_Total_Count;
> radiosit.cpp:837: VAddEq(Radiosity_Gather_Total, Illuminance);
> radiosit.cpp:838: Radiosity_Gather_Total_Count++;
> render.cpp:967: Make_Colour(Radiosity_Gather_Total, 0.0, 0.0, 0.0);
> render.cpp:968: Radiosity_Gather_Total_Count = 0;
> render.cpp:1185: if ( Radiosity_Gather_Total_Count )
> render.cpp:1187: VInverseScale(avg_gather,
> Radiosity_Gather_Total, (DBL)Radiosity_Gather_Total_Count);
>
> $ grep -n 'Radiosity_Gather_Total' *.h
> radiosit.h:89:extern COLOUR Radiosity_Gather_Total;
> radiosit.h:90:extern long Radiosity_Gather_Total_Count;
>
> $ grep -n 'avg_gather' *.cpp
> render.cpp:957: COLOUR Colour, avg_gather;
> render.cpp:1187: VInverseScale(avg_gather,
> Radiosity_Gather_Total, (DBL)Radiosity_Gather_Total_Count);
> render.cpp:1188: gather_grey = avg_gather[pRED] +
> avg_gather[pGREEN] + avg_gather[pBLUE];
>
> $ grep -n 'gather_grey' *.cpp
> render.cpp:956: DBL grey, gather_grey;
> render.cpp:1188: gather_grey = avg_gather[pRED] +
> avg_gather[pGREEN] + avg_gather[pBLUE];
> render.cpp:1189: if ( gather_grey > 0. )
> render.cpp:1193: /*opts.Radiosity_Brightness = 3. /
> gather_grey; */
>
> Looking at the code I can not see that these variables do anything. Am I
> wrong?
>
> Could someone please tell me what does effect the automatic radiosity
> brightness adjustment?
>
> A very puzzled,
> Mike Andrews.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Christoph Hormann" <chr### [at] gmx de> wrote...
>
> I was studying the radiosity code and found the following in render.cpp,
> function 'Start_Tracing_Radiosity_Preview()', line 1223:
>
> opts.Radiosity_Error_Bound /= opts.Radiosity_Low_Error_Factor;
> opts.Radiosity_Error_Bound = opts.Real_Radiosity_Error_Bound;
>
> Unless i'm finally going mad there is something wrong here. Maybe someone
> more familiar with the radiosity code (Nathan?) could clear that up (and
> check if there is some hidden problem i did not see). I have the
> impression it behaves correctly, just the first line is obsolete.
The first line is obsolete. Actually, either would probably do the job (see
lines 962-963 of the same file).
-Nathan
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Nathan Kopp <pov### [at] nkopp mailshell com> wrote:
> Legacy code.
Could you explain what does that mean? (I don't know, and I'm curious.)
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi Nathan,
Nathan Kopp wrote:
>
> Two words:
>
> Legacy code.
>
> -Nathan
>
Ahh, thats OK then. There was a lot of changes going on so I'm not
surprised there's bits left hanging :-)
Can you tell me where the automatic radiosity brightness adjustment code
is then? At first I thought it was to do with the code blocks I was
looking at, but obviously I was wrong and I can't see any other code
blocks which seem relevant.
Thanks,
Mike Andrews.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Michael Andrews" <m.c### [at] reading ac uk> wrote...
>
> Can you tell me where the automatic radiosity brightness adjustment code
> is then? At first I thought it was to do with the code blocks I was
> looking at, but obviously I was wrong and I can't see any other code
> blocks which seem relevant.
It no longer exists. It was completely unrealistic.
-Nathan
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Nathan Kopp
Subject: Re: Related question concerning radiosity code
Date: 4 Sep 2002 23:37:27
Message: <3d76d177@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Warp" <war### [at] tag povray org> wrote...
> Nathan Kopp <pov### [at] nkopp mailshell com> wrote:
> > Legacy code.
>
> Could you explain what does that mean? (I don't know, and I'm curious.)
I've heard the term "legacy code" used to refer to old code that formerly
had meaning, but now serves no purpose except to eat CPU cycles.
-Nathan
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Nathan Kopp wrote:
>
> "Michael Andrews" <m.c### [at] reading ac uk> wrote...
> >
> > Can you tell me where the automatic radiosity brightness adjustment code
> > is then? At first I thought it was to do with the code blocks I was
> > looking at, but obviously I was wrong and I can't see any other code
> > blocks which seem relevant.
>
> It no longer exists. It was completely unrealistic.
>
OK, I agree with that. It was useful to an extent back when the
radiosity code was ambient-only.
But hasn't this been the main argument against doing distributed
rendering of image pieces (either tiles or strips) when using radiosity?
Maybe I've misunderstood the problem ...
> -Nathan
Bye for now,
Mike Andrews.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3d76d177@news.povray.org>,
"Nathan Kopp" <pov### [at] nkopp mailshell com> wrote:
> > Could you explain what does that mean? (I don't know, and I'm curious.)
>
> I've heard the term "legacy code" used to refer to old code that formerly
> had meaning, but now serves no purpose except to eat CPU cycles.
I have also heard it used to mean an existing codebase...for example,
when moving from Windows to Linux, code that depends on Windows would be
legacy code.
This, I'd just call "code rot".
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3D772CCC.11C85853@reading.ac.uk>,
Michael Andrews <m.c### [at] reading ac uk> wrote:
> But hasn't this been the main argument against doing distributed
> rendering of image pieces (either tiles or strips) when using radiosity?
> Maybe I've misunderstood the problem ...
Sounds like you misunderstand it, since I've never heard about
brightness adjustment being a problem. The radiosity data doesn't stay
constant through the render, it is constantly added to. The problem is
keeping the data up to date between multiple threads, with each thread
constantly modifying the same data.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |