![](/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) |
> > That's what I thought, except I expected the probability to be
> > sin(theta)
> > (or cos(theta), if theta is the angle between ray and TANGENT), implying
> > fewer rays close to normal than close to tangent. Is this a typo?
>
> I don't think so.
Then somebody should explain why they want their rays to be more
dense at the normal.
Especially with respect to your challenge below ;-)
> I'm sure if you come op with a method to generate a high quality
> distribution within a fraction of a second or so everyone would be eager
> to see it...
How was the built-in array created? (I would like to know,
which quality I have to beat). In fact you already mentioned,
that you want the same quality contraints for initial segments
of the array, so my earlier suggestion might already do the trick.
Mark
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) |
> > A bit of theory: The goal is to create a set of "random" direction rays
> > so that the probability of close-to-normal versus close-to-tangent rolls
> > off in a cos-theta curve, where theta is the deviation from normal.
> > That is, lots of rays close to normal, and very few close to tangent.
> > You also want to have all of the rays be evenly spread, no matter how
> > many you want to use. The lookup array has an array of points carefully
> > chosen to meet all of these criteria.
>
> That's what I thought, except I expected the probability to be
> sin(theta)
> (or cos(theta), if theta is the angle between ray and TANGENT), implying
> fewer rays close to normal than close to tangent. Is this a typo?
Am posting examples in p.b.i.
Mark
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Michael Andrews
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 09:59:22
Message: <3de780ca@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Mark Weyer wrote:
> That's what I thought, except I expected the probability to be
> sin(theta)
> (or cos(theta), if theta is the angle between ray and TANGENT), implying
> fewer rays close to normal than close to tangent. Is this a typo?
What you must remember is that you are trying to estimate the lighting
at a particular point.
If you have a light source almost tangential to the surface it doesn't
illuminate much and one almost normal to the surface gives high
illumination. So, if all the samples are weighted the same you want most
samples from the normal direction and few from tangential to give the
best estimate.
>
> Why is the lookup array fixed? It might be calculated at program start,
> allowing for varying length.
I suppose it could be, and I've thought about doing this. However you
would have to calculate an array for each level of radiosity recursion
because the code reduces the number of samples taken at each subsequent
recursion level. And the results wouldn't be very different anyway.
>
> Mark
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) |
On Fri, 29 Nov 2002 15:01:24 +0100, Mark Weyer
<wey### [at] frege mathematik uni-freiburg de> wrote:
>Why is the lookup array fixed? It might be calculated at program start,
>allowing for varying length.
Probably for the same reason most other jitters use fixed arrays - for
true platform independence (at least that's how I read it).
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Michael Andrews
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 10:16:49
Message: <3de784e1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi Christoph,
The cos-theta distribution on the hemisphere is given by creating an
even distribution on a unit circle and then projecting up or down to a
unit hemisphere.
You can see this by taking a copy of the radiosity sample array, editing
it to pov syntax and including it in a small scene which puts a sphere
at the <X,Y,0> points. If you do an animation which adds 1 or a few
sample positions each frame you can see how the distribution builds up.
Mike Andrews.
Christoph Hormann wrote:
> Quoting from the source:
>
> A bit of theory: The goal is to create a set of "random" direction rays
> so that the probability of close-to-normal versus close-to-tangent rolls
> off in a cos-theta curve, where theta is the deviation from normal.
> That is, lots of rays close to normal, and very few close to tangent.
> You also want to have all of the rays be evenly spread, no matter how
> many you want to use. The lookup array has an array of points carefully
> chosen to meet all of these criteria.
>
> The problem is similar to the classical "How can I arrange N points evenly
> on a sphere" problem like described in:
>
> http://www.ogre.nu/sphere.htm
>
> Just that it is hemispherical, not really uniform and it not only has to
> be good for N points but also for N-X points (X = 1..N-1)
>
> Christoph
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Christoph Hormann
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 10:23:51
Message: <3DE78686.8FFBA5EB@gmx.de>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Mark Weyer wrote:
>
> [...]
>
> How was the built-in array created? (I would like to know,
> which quality I have to beat). In fact you already mentioned,
> that you want the same quality contraints for initial segments
> of the array, so my earlier suggestion might already do the trick.
You don't need to know how the original distribution was created to
compare quality. If you follow the link i posted you will find several
measurements of the quality of distributions. Apart from the maximum
uniformity the distribution should not be regular to be well suited for
radiosity sampling.
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 15 Nov. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Christoph Hormann
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 10:29:33
Message: <3DE787DA.DD661D55@gmx.de>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Michael Andrews wrote:
>
> Hi Christoph,
>
> The cos-theta distribution on the hemisphere is given by creating an
> even distribution on a unit circle and then projecting up or down to a
> unit hemisphere.
>
> [...]
It is fairly possible that this is the method how the directions array was
originally created but there is no way how to prove this.
Another method (which probably produces higher quality for a fixed number
of rays if done well) would be a repulsion algorithm with a non uniform
force field (i.e. higher repulsive forces between the points at low angle)
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 15 Nov. 2002 _____./\/^>_*_<^\/\.______
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) |
> If you have a light source almost tangential to the surface it doesn't
> illuminate much and one almost normal to the surface gives high
> illumination. So, if all the samples are weighted the same you want most
> samples from the normal direction and few from tangential to give the
> best estimate.
Ok, that explains it. As a purist I was assuming you take an
even distribution and weight the samples with cos. But it would
be hard to sell that to running-time-theists...
> I suppose it could be, and I've thought about doing this. However you
> would have to calculate an array for each level of radiosity recursion
> because the code reduces the number of samples taken at each subsequent
> recursion level. And the results wouldn't be very different anyway.
The way Christoph was putting it, you reuse an initial segment of the
array. My current approach would be to build in a precomputed array
for everyday use with the possibility to replace it by something larger.
Mark
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) |
> > The cos-theta distribution on the hemisphere is given by creating an
> > even distribution on a unit circle and then projecting up or down to a
> > unit hemisphere.
> [...]
> Another method (which probably produces higher quality for a fixed number
> of rays if done well) would be a repulsion algorithm with a non uniform
> force field (i.e. higher repulsive forces between the points at low angle)
I do not see why the quality is better than using repulsion
inside the unit circle with a uniform force field before projecting.
Mark
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Christoph Hormann
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 11:11:12
Message: <3DE791A0.B5682EBB@gmx.de>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Mark Weyer wrote:
>
> I do not see why the quality is better than using repulsion
> inside the unit circle with a uniform force field before projecting.
To me it seems fairly obvious that projecting a disc on a hemisphere does
not maintain the distance relations and therefore reduces the uniformity
of a distribution.
To be precise, the points at the rim of the hemisphere will be quite dense
in direction of the circumference but will be moved apart in theta
direction.
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 15 Nov. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |