POV-Ray : Newsgroups : povray.general : Photon Settings Server Time
3 Nov 2024 16:04:07 EST (-0500)
  Photon Settings (Message 1 to 2 of 2)  
From: Jim
Subject: Photon Settings
Date: 22 Sep 2007 22:25:00
Message: <web.46f5cd9a1fe30a4e91227f400@news.povray.org>
I have been experimenting with POV's photon mapping, and I'm pretty familiar
with the basic idea. I've read some of Jensen's papers, and the Nathan Kopp
paper. After reading and experimentation I still have some pretty basic
questions about settings. Obviously all of the settings interact. But right
now I have questions about spacing and count. Quoting the docs:
http://povray.org/documentation/view/3.6.1/425/

#  If spacing is used, it specifies approximately the average distance
between photons on surfaces.

# If count is used, POV-Ray will shoot the approximately number of photons
specified.

That quickly covers the theory, but I could use more practical knowledge. My
(mis)understanding, at a basic level, is as follows - please correct,
augment, etc.

1) The quality of the final result is influenced by the precision of the
generated map. If you don't have sufficient photon density, subtle details
will not be visible or rendered poorly. More photons are better, at least
to a point. More photons take more time.

2) Using "count" sets a rough upper bound on the time to generate a map for
an arbitrary scene. But there is no guaranty that there will be sufficient
precision in the map to show desired features. But surprisingly small
numbers of photons can yield very pleasing results.

3) Using "spacing" sets the approximate level of precision (photon density)
in the final map, but that can result in arbitrarily long map generation
times. Using extremely small spacing won't guaranty more visible detail,
but it will almost definitely result in longer map generation times.

4) Specific details about scenes makes all of these numbers "fuzzy" because
of complexity of the light transport problem. If there was any
easier/faster way to do it, there wouldn't be a need for photon maps in the
first place.

So, assuming I'm not totally wrong about how it all should work, this leads
me to several questions:

1) In what situations is it "better" to use count vs. spacing, and why?

2) Are there good rules of thumb for setting these values? (POV seems to
choose pretty good defaults - was it just trial and error, or was there a
method?) What are the major factors in the decision?

3) What do the photon statistics indicate about the scene, and the choices
for the spacing/count values selected? Just for instance: If there are a
large number of "Gather radius expanded" in relation to "Gather function
called" then perhaps it would be good to reduce spacing or increase count.
Yes? No? Maybe?



Also, this is a little "off topic" - but just occurred to me... if
dispersion is used, I know the effects will show up for photons - does it
affect the generated photon map at all, or is dispersion a "post gather"
type of operation?


Post a reply to this message

From: Alain
Subject: Re: Photon Settings
Date: 23 Sep 2007 12:20:15
Message: <46f6923f$1@news.povray.org>
Jim nous apporta ses lumieres en ce 2007/09/22 22:21:
> I have been experimenting with POV's photon mapping, and I'm pretty familiar
> with the basic idea. I've read some of Jensen's papers, and the Nathan Kopp
> paper. After reading and experimentation I still have some pretty basic
> questions about settings. Obviously all of the settings interact. But right
> now I have questions about spacing and count. Quoting the docs:
> http://povray.org/documentation/view/3.6.1/425/
> 
> #  If spacing is used, it specifies approximately the average distance
> between photons on surfaces.
> 
> # If count is used, POV-Ray will shoot the approximately number of photons
> specified.
> 
> That quickly covers the theory, but I could use more practical knowledge. My
> (mis)understanding, at a basic level, is as follows - please correct,
> augment, etc.
> 
> 1) The quality of the final result is influenced by the precision of the
> generated map. If you don't have sufficient photon density, subtle details
> will not be visible or rendered poorly. More photons are better, at least
> to a point. More photons take more time.
> 
> 2) Using "count" sets a rough upper bound on the time to generate a map for
> an arbitrary scene. But there is no guaranty that there will be sufficient
> precision in the map to show desired features. But surprisingly small
> numbers of photons can yield very pleasing results.
> 
> 3) Using "spacing" sets the approximate level of precision (photon density)
> in the final map, but that can result in arbitrarily long map generation
> times. Using extremely small spacing won't guaranty more visible detail,
> but it will almost definitely result in longer map generation times.
> 
> 4) Specific details about scenes makes all of these numbers "fuzzy" because
> of complexity of the light transport problem. If there was any
> easier/faster way to do it, there wouldn't be a need for photon maps in the
> first place.
> 
> So, assuming I'm not totally wrong about how it all should work, this leads
> me to several questions:
> 
> 1) In what situations is it "better" to use count vs. spacing, and why?
If you have several light_source that emit photons and several objects set as 
target, spacing is probably a better solution.
If you have only one light and few target objects, they are equivalent.
> 
> 2) Are there good rules of thumb for setting these values? (POV seems to
> choose pretty good defaults - was it just trial and error, or was there a
> method?) What are the major factors in the decision?
You need smaller spacing if, on average, one POV-unit ocupy a large image area.
> 
> 3) What do the photon statistics indicate about the scene, and the choices
> for the spacing/count values selected? Just for instance: If there are a
> large number of "Gather radius expanded" in relation to "Gather function
> called" then perhaps it would be good to reduce spacing or increase count.
> Yes? No? Maybe?
> 
> 
> 
> Also, this is a little "off topic" - but just occurred to me... if
> dispersion is used, I know the effects will show up for photons - does it
> affect the generated photon map at all, or is dispersion a "post gather"
> type of operation?
> 
> 
> 
> 
> 
If you use dispersion, the generated photon map will be affected as it is 
generated during the photon shooting step. This will greatly increase the 
photon's count. If you use 7 dispersion sample, each refracted photon will get 
splitted in 7 coloured ones. You will probably need more dispersion sample than 
that to get smooth results.

Also, if you use blured reflection for a target surface, it will multiply every 
photon hitting it. Same for blured refraction, only worst: there are always two 
surfaces contributing, and you also can have dispersion contributing...

You should note that if you also use radiosity, the photons effect will affect 
the radiosity results.

-- 
Alain
-------------------------------------------------
HAMMER:  Originally employed as a weapon of war, the hammer nowadays is used as 
a kind of divining rod to locate expensive bike parts not far from the object we 
are trying to hit.


Post a reply to this message

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