POV-Ray : Newsgroups : povray.unofficial.patches : Sampling in pov3.5 Server Time
8 Jul 2024 17:13:30 EDT (-0400)
  Sampling in pov3.5 (Message 21 to 30 of 32)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 2 Messages >>>
From: Christoph Hormann
Subject: Re: Sampling in pov3.5
Date: 4 Jan 2003 12:17:20
Message: <3E171720.2AC78C5@gmx.de>
Nathan Kopp wrote:
> 
> Also, this brings up a good point that if we can find a fast way to generate
> a new set of samples for each render, we could theoretically come up with
> better distributions for all sample counts.  The key here is to be able to
> generate a good sample list quickly.

I doubt that such a 'fast and good' algorithm is possible.  Apart from
that you have the problem that it is not known in advance which samples
from the table are used (see the 'while(rayOk...' loop in radiosit.cpp).  

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 31 Dec. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Christoph Hormann
Subject: Re: Sampling in pov3.5
Date: 5 Jan 2003 16:48:19
Message: <3E18A823.8D20ED82@gmx.de>
I have made some first actual renders with new distributions, here are
some results:

http://www.schunter.etc.tu-bs.de/~chris/files/rad_test.html

The sample sets i generated have 300 samples which are sorted afterwards
for best results at lower count values.  The scene uses a count of 50. 
Sorting is somewhat tricky with non uniform distributions so the 50
samples are probably quite different from a perfect cosine theta
distribution.

The first two images are the old and the new distribution.  It can be seen
that the differences are not that strong but i think that the second one
is somewhat better.  Testing with a distribution optimized for exactly 50
samples could be worth trying too.

The third image shows the result when using a completely uniform
distribution and weighting the samples according to cosine theta.  The
result seems worse although a final conclusion would require further
tests.  The interesting thing is that turning off the different weighting
strongly weakens the artefacts (fourth image).  

The final image shows the same settings with randomly rotated sample set
(based on an idea by Michael Andrews:

Subject: Fluorescent strip radiosity test scene  (22K + 24K)
Date: Thu, 28 Nov 2002 13:25:06 +0000
From: Michael Andrews <m.c### [at] readingacuk>
Newsgroups: povray.binaries.images

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 31 Dec. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Anders K 
Subject: Re: Sampling in pov3.5
Date: 5 Jan 2003 19:07:41
Message: <3e18c8cd@news.povray.org>
Christoph Hormann wrote:
> I have made some first actual renders with new distributions, here are
> some results:

I'm curious -- could you also try random sampling, without using precomputed
tables?

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: Warp
Subject: Re: Sampling in pov3.5
Date: 5 Jan 2003 22:48:41
Message: <3e18fc99@news.povray.org>
Anders K. <and### [at] kaseorgcom> wrote:
> I'm curious -- could you also try random sampling, without using precomputed
> tables?

  I would guess that this might add more graininess to the lighting, as the
amount and color of the light will change more randomly from one sampling
point to the next. This might also make it slower as the algorithm can't
reuse old values so often (because now they change more than the error bound
threshold more often).
  (Naturally I can't know for sure as I only have a vague idea about how
Ward's stochastic global illumination algorithm works. This was just a
guess.)

-- 
#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

From: Mael
Subject: Re: Sampling in pov3.5
Date: 6 Jan 2003 08:07:38
Message: <3e197f9a$1@news.povray.org>
> The third image shows the result when using a completely uniform
> distribution and weighting the samples according to cosine theta.  The
> result seems worse although a final conclusion would require further
> tests.  The interesting thing is that turning off the different weighting
> strongly weakens the artefacts (fourth image).

there is an error in the comment in povray source code, the samples are
distributed according to cos(theta)*sin(theta) (we can also confirm this by
looking at the illuminance integral)
I've made a graph with the distribution for the pov samples (compared to cos
and cos*sin) at http://195.221.122.126/samples/proba.jpg

M


Post a reply to this message

From: Christoph Hormann
Subject: Re: Sampling in pov3.5
Date: 6 Jan 2003 08:14:50
Message: <3E19814A.5E148BDE@gmx.de>
Mael wrote:
> 
> there is an error in the comment in povray source code, the samples are
> distributed according to cos(theta)*sin(theta) (we can also confirm this by
> looking at the illuminance integral)
> I've made a graph with the distribution for the pov samples (compared to cos
> and cos*sin) at http://195.221.122.126/samples/proba.jpg

I am not sure what you measure in that graph but when i talk about 'cosine
theta distribution' i mean the density of the samples (i.e. the inverse of
the mean distance between samples).  Of course there are very few samples
at small theta because the region of the hemisphere with small theta is
small - none the less the density is high.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 31 Dec. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Mael
Subject: Re: Sampling in pov3.5
Date: 6 Jan 2003 08:22:34
Message: <3e19831a@news.povray.org>
> I am not sure what you measure in that graph

This graph shows the probability to have a ray for a given theta (theta =
deviation / normal)

M


Post a reply to this message

From: Mael
Subject: Re: Sampling in pov3.5
Date: 6 Jan 2003 08:26:11
Message: <3e1983f3@news.povray.org>
And the same for the halton sequence :
http://195.221.122.126/samples/proba2.jpg

M


Post a reply to this message

From: Mael
Subject: Re: Sampling in pov3.5
Date: 6 Jan 2003 08:31:59
Message: <3e19854f@news.povray.org>
> I am not sure what you measure in that graph but when i talk about 'cosine
> theta distribution' i mean the density of the samples (i.e. the inverse of
> the mean distance between samples).  Of course there are very few samples
> at small theta because the region of the hemisphere with small theta is
> small - none the less the density is high.

ok, i understand, if I divide by the area for a theta, I will get the
cos(theta) distribution
this is more clear now :)

M


Post a reply to this message

From: Christoph Hormann
Subject: Re: Sampling in pov3.5
Date: 6 Jan 2003 08:33:39
Message: <3E1985B2.AEED713C@gmx.de>
Mael wrote:
> 
> > I am not sure what you measure in that graph
> 
> This graph shows the probability to have a ray for a given theta (theta =
> deviation / normal)

This is of course something different.  I think the sin(theta) factor is
logical then.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 31 Dec. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

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

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