POV-Ray : Newsgroups : povray.advanced-users : Radiosity flouroescent lighting troubles Server Time
29 Jul 2024 12:23:55 EDT (-0400)
  Radiosity flouroescent lighting troubles (Message 28 to 37 of 47)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Mark Weyer
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 09:07:20
Message: <3DE776E1.81EB6466@frege.mathematik.uni-freiburg.de>
> > 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

From: Mark Weyer
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 09:36:46
Message: <3DE77DC6.DBB51BC2@frege.mathematik.uni-freiburg.de>
> > 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

From: Michael Andrews
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 09:59:22
Message: <3de780ca@news.povray.org>
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

From: Peter Popov
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 10:01:17
Message: <580fuu4eg5rnsk3fvr1aotj5t5pqh4ufa6@4ax.com>
On Fri, 29 Nov 2002 15:01:24 +0100, Mark Weyer
<wey### [at] fregemathematikuni-freiburgde> 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] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Michael Andrews
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 10:16:49
Message: <3de784e1@news.povray.org>
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

From: Christoph Hormann
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 10:23:51
Message: <3DE78686.8FFBA5EB@gmx.de>
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

From: Christoph Hormann
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 10:29:33
Message: <3DE787DA.DD661D55@gmx.de>
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

From: Mark Weyer
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 10:39:43
Message: <3DE78C86.171B378C@frege.mathematik.uni-freiburg.de>
> 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

From: Mark Weyer
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 10:44:16
Message: <3DE78D99.5CBE035@frege.mathematik.uni-freiburg.de>
> > 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

From: Christoph Hormann
Subject: Re: Radiosity flouroescent lighting troubles
Date: 29 Nov 2002 11:11:12
Message: <3DE791A0.B5682EBB@gmx.de>
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

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

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