![](/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) |
Some reverse engineering of your formulation here (never mind my
terminology please):
range_divider = 100000
intensity*128 = 0.00001
intensity = 0.000000078125
spread = 0.0002795084972
spacing_for_object = 0.015 (only approximation)
distance_from_light_to_object = 54 (only approximation in POV units)
So if a light is 54 POV units from the object having photon mapping using
a 0.015 spacing (? not sure which parameter this is in the photon
statement) then you would get the acceptable range value. Obviously these
last two things is what it all hinges upon. Increase the light to object
distance and you need to also increase the spacing.
Does this make sense? So to get good results always increase or decrease
both together? I can see where having a parameter to vary this without
need to move the light_source would be a good thing if so.
Nathan Kopp wrote:
>
> Alan Kong wrote:
> >
> > Nathan, rather than post the image for a third time I thought I'd
> > show the relevant part that illustrates how the caustics look now.
> > "range_divider 100000" fixed my scene. Is there a rule of thumb for
> > one to follow on setting this value?
>
> I'm glad that worked!
>
> There is a rule to follow, but it's not very straight forward. First,
> you have to compute the photon spread at a distance of one unit:
>
> spread = spacing_for_object / distance_from_light_to_object;
>
> Next, estimate the intensity of one photon (assume that the light has
> an intensity of <1,1,1> at the spot where the photons are recorded)
>
> intensity = spread*spread;
>
> Finally, set the range divider using the following formula:
>
> range_divider = 1.0/(intensity*128.0);
>
> These are the same formulas that my new code uses to automatically choose
> an appropriate range_divider. I assume that the intensity of all photons
> in the scene will be very similar. Hopefully, this formula will come up
> with a number close to 100000 for your scene (give or take an order of
> magnitude ;-) ).
>
> -Nathan
--
omniVERSE: beyond the universe
http://members.aol.com/inversez/homepage.htm
mailto://inversez@aol.com?Subject=PoV-News
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) |
By 'spacing' I meant 'separation'. In the future you won't have to
adjust range_divider manually. Currently, the default value will work
unless you go shooting 9 million photons like Alan. Most scenes need
less than 500,000, and the default value is good for that number.
The choice for range_divider doesn't need to be exact, since it
gives a range of many orders of magnitude.
Remember, range_divider only relates to the compression of one photon's
color from three floats down to four bytes.
-Nathan
Bob wrote:
>
> Some reverse engineering of your formulation here (never mind my
> terminology please):
>
> range_divider = 100000
> intensity*128 = 0.00001
> intensity = 0.000000078125
> spread = 0.0002795084972
> spacing_for_object = 0.015 (only approximation)
> distance_from_light_to_object = 54 (only approximation in POV units)
>
> So if a light is 54 POV units from the object having photon mapping using
> a 0.015 spacing (? not sure which parameter this is in the photon
> statement) then you would get the acceptable range value. Obviously these
> last two things is what it all hinges upon. Increase the light to object
> distance and you need to also increase the spacing.
> Does this make sense? So to get good results always increase or decrease
> both together? I can see where having a parameter to vary this without
> need to move the light_source would be a good thing if so.
>
> Nathan Kopp wrote:
> >
> > Alan Kong wrote:
> > >
> > > Nathan, rather than post the image for a third time I thought I'd
> > > show the relevant part that illustrates how the caustics look now.
> > > "range_divider 100000" fixed my scene. Is there a rule of thumb for
> > > one to follow on setting this value?
> >
> > I'm glad that worked!
> >
> > There is a rule to follow, but it's not very straight forward. First,
> > you have to compute the photon spread at a distance of one unit:
> >
> > spread = spacing_for_object / distance_from_light_to_object;
> >
> > Next, estimate the intensity of one photon (assume that the light has
> > an intensity of <1,1,1> at the spot where the photons are recorded)
> >
> > intensity = spread*spread;
> >
> > Finally, set the range divider using the following formula:
> >
> > range_divider = 1.0/(intensity*128.0);
> >
> > These are the same formulas that my new code uses to automatically choose
> > an appropriate range_divider. I assume that the intensity of all photons
> > in the scene will be very similar. Hopefully, this formula will come up
> > with a number close to 100000 for your scene (give or take an order of
> > magnitude ;-) ).
> >
> > -Nathan
>
> --
> omniVERSE: beyond the universe
> http://members.aol.com/inversez/homepage.htm
> mailto://inversez@aol.com?Subject=PoV-News
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) |
Think I'll stick to rendering only. No programming math for me, thankyou.
But back to the question about light source distance :) is it directly proportional to
the "separation" then? In other words, the closer or farther away a light, a narrower
or
wider separation is needed to keep the same end result?
Nathan Kopp wrote:
>
> By 'spacing' I meant 'separation'. In the future you won't have to
> adjust range_divider manually. Currently, the default value will work
> unless you go shooting 9 million photons like Alan. Most scenes need
> less than 500,000, and the default value is good for that number.
> The choice for range_divider doesn't need to be exact, since it
> gives a range of many orders of magnitude.
>
> Remember, range_divider only relates to the compression of one photon's
> color from three floats down to four bytes.
>
--
omniVERSE: beyond the universe
http://members.aol.com/inversez/homepage.htm
mailto://inversez@aol.com?Subject=PoV-News
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) |
Not really. The separation keyword allows you to specify the spacial
separation of photons at the center of the target object. Of course,
photons are always spreading out (from the light source location) so the
actual spacing is always increasing as the photon moves farther from the
light source (unless it gets focused by a lens, of course).
I could have made the user specify an angular spacing (or a total number of
photons, for that matter) instead of a spacial separation. I chose
spacial separation because it correlates directly with the size of the
gather radius (which the user must also specify). Thus, once you have
the settings figured out for a scene, you can scale the separation
values and gather radius by the same amount to increase/decrease the
total number of photons.
As you move the light source closer and farther from the target object,
the angular density of the photons will change, but the total number of
photons will remain approximately the same.
-Nathan Kopp
Bob wrote:
>
> Think I'll stick to rendering only. No programming math for me, thankyou.
> But back to the question about light source distance :) is it directly proportional
to
> the "separation" then? In other words, the closer or farther away a light, a
narrower or
> wider separation is needed to keep the same end result?
>
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) |
I see, what my mind was doing was thinking of it as a relative thing which a person
setting the objects and lights up would be adjusting for (like so many other
tweakings).
This makes more sense to me now as a kind of photon falloff with distance, that is to
say the farther a light the less photons counted (less dense). Or am I going off the
track there? Well, anyway, it's making more and more sense all the time.
Nathan Kopp wrote:
>
> Not really. The separation keyword allows you to specify the spacial
> separation of photons at the center of the target object. Of course,
> photons are always spreading out (from the light source location) so the
> actual spacing is always increasing as the photon moves farther from the
> light source (unless it gets focused by a lens, of course).
>
> I could have made the user specify an angular spacing (or a total number of
> photons, for that matter) instead of a spacial separation. I chose
> spacial separation because it correlates directly with the size of the
> gather radius (which the user must also specify). Thus, once you have
> the settings figured out for a scene, you can scale the separation
> values and gather radius by the same amount to increase/decrease the
> total number of photons.
>
> As you move the light source closer and farther from the target object,
> the angular density of the photons will change, but the total number of
> photons will remain approximately the same.
>
> -Nathan Kopp
>
> Bob wrote:
> >
> > Think I'll stick to rendering only. No programming math for me, thankyou.
> > But back to the question about light source distance :) is it directly
proportional to
> > the "separation" then? In other words, the closer or farther away a light, a
narrower or
> > wider separation is needed to keep the same end result?
> >
--
omniVERSE: beyond the universe
http://members.aol.com/inversez/homepage.htm
mailto://inversez@aol.com?Subject=PoV-News
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) |
I agree that another parameter to tweak is bad, so in the next version, the
computer will automatically choose a good setting for range_divider so you
should not ever have to worry about it again. :-)
-Nathan
Bob wrote:
>
> I see, what my mind was doing was thinking of it as a relative thing which a person
> setting the objects and lights up would be adjusting for (like so many other
tweakings).
> This makes more sense to me now as a kind of photon falloff with distance, that is
to
> say the farther a light the less photons counted (less dense). Or am I going off the
> track there? Well, anyway, it's making more and more sense all the time.
>
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) |