|
![](/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) |