POV-Ray : Newsgroups : povray.programming : >1600 radiosity samples: right costheta distribution? Server Time
5 Oct 2024 01:20:16 EDT (-0400)
  >1600 radiosity samples: right costheta distribution? (Message 5 to 14 of 34)  
<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Fabien Mosen
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 4 Jan 2003 10:09:26
Message: <3e16f926@news.povray.org>
Maybe this might interest you : 2 years ago, Stephane Marty (who
created Virtualight) issued a POV-Ray patch whoch allowed users
to select amongst 8 samples distribution shemes for radiosity.

http://perso.wanadoo.fr/albedo/patchedpov.html

If you download and read the HTML docs, you will see samples
of the availiable distributions.

Fabien.


Post a reply to this message

From: Alf Peake
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 4 Jan 2003 10:21:22
Message: <3e16fbf2@news.povray.org>
Probably coincidence but 1st glance at "C" reminded me of the spirals
you get in the Golden-Ratio involving (sqrt(5)-1)/2.

Alf


Post a reply to this message

From: Nathan Kopp
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 4 Jan 2003 12:07:27
Message: <3e1714cf$1@news.povray.org>
"Apache" <apa### [at] yahoocom> wrote...
> I'm working on some C code that generates radiosity sample data. I want to
> have more than 1600 samples available. I have posted an image at pbi that
> I'm referring to in this post.
[clip]
> Finally I order the samples and write them to disk (see C and D in the
image
> at pbi). By ordering them, the set also is distributed the right way when
> only the first few samples are being used. (Think of count 35 etc etc
etc.)

The code you posted looks like it is on the order of O(n), unless the code
you posted is missing a "for" loop (maybe on the variable "i1").  I would
have expected the code that "moves the samples a bit around in order to
divide the samples more evenly" to be at least O(n^2).

If it realy is O(n), which would be great, couldn't you simply generate an
appropriate distribution each time, removing the need to order them.  If the
algorithm produces evenly spaced samples for small counts, this would also
ensure that small sample counts look their best.

-Nathan


Post a reply to this message

From: Apache
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 4 Jan 2003 12:28:29
Message: <3e1719bd@news.povray.org>
The cod that I posted is O(n), and the code that "moves the samples a bit
around" is O(n^2) indeed. And so is the code that orders the stuff. However,
I'm still trying to get a better ordering. Or I could precalculate tons of
sets for count 1, count 2, ..., count 3199, count 3200. It takes some time
and space, but renderings with low counts will have less artifacts then.
Let's say that a*quality+b*resources-c=0  :-)


Post a reply to this message

From: Apache
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 4 Jan 2003 12:32:30
Message: <3e171aae$1@news.povray.org>
> I'm still trying to get a better ordering. Or I could precalculate tons of
> sets for count 1, count 2, ..., count 3199, count 3200. It takes some time
> and space, but renderings with low counts will have less artifacts then.
 Oh, that won't work out as I thought is would, because in many cases
POV-Ray doesn't use as much samples as it is told to do with count when
there are more errors allowed. So every set has to be ordered anyhow. But I
still think that seperate sets can decrease artifacts.


Post a reply to this message

From: Apache
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 4 Jan 2003 12:41:54
Message: <3e171ce2$1@news.povray.org>
I was thinking the same.


Post a reply to this message

From: Apache
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 4 Jan 2003 12:44:50
Message: <3e171d92$1@news.povray.org>
Projecting the disk onto the hemisphere requires "blowing up" the set of
samples in order to prevent samples "sticking" nearby the edge of the
sphere/disk. The surface near the center of the disk grows more than the
surface near the edge, so near the center the samples move farther away.
That results in an uneven distribution.


Post a reply to this message

From: Anders K 
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 4 Jan 2003 12:46:25
Message: <3e171df1@news.povray.org>
Apache wrote:
> IS MY DISTRIBUTION CORRECT?

When viewed from above (+z), a cos theta distribution should look like
uniformly spaced points on a disc. (This isn't hard to show with a little
math.) But neither of your +z views look that way.

Anders

--
#macro E(D)(#if(D<2)D#else#declare I=I+1;mod(pow(.5mod(I 6))*asc(substr(
"X0(1X([\\&Q@TV'YDGU`3F(-V[6Y4aL4XFUTD#N#F8\\A+F1BFO4`#bJN61EM8PFSbFA?C"
I/6 1))2)<1#end)#end#macro R(D,I,T,X,Y)#if(E(D))R(D-1I,T,Y/2X)R(D-1I,T+Y
/2Y/2X)#else box{T T+X+Y pigment{rgb E(2)*9}}#end#end R(10,5z*3-1v*2u*2)


Post a reply to this message

From: Mael
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 4 Jan 2003 12:52:20
Message: <3e171f54@news.povray.org>
> Projecting the disk onto the hemisphere requires "blowing up" the set of
> samples in order to prevent samples "sticking" nearby the edge of the
> sphere/disk. The surface near the center of the disk grows more than the
> surface near the edge, so near the center the samples move farther away.
> That results in an uneven distribution.

I'm not sure your understood the projection
sample points evenly on disc (x,y)
then build (x,y,z) with same x,y and z=sqrt(x*x+y*y)
(and we do want an uneven distribution with more points near the center)

M


Post a reply to this message

From: Apache
Subject: Re: >1600 radiosity samples: right costheta distribution?
Date: 4 Jan 2003 12:52:29
Message: <3e171f5d$1@news.povray.org>
The set that POV-Ray uses currently doesn't look like that either. (see my
post, pbi "Re: >1600 radiosity samples: right costheta distribution?"). "My"
distribution has very similar properties to that of POV-Ray, except for the
ordering that I still have to fix.


Post a reply to this message

<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>

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