search for a specific number of nodes?

Sylvain Bougerel sylvain.bougerel.devel at gmail.com
Fri Apr 30 16:34:53 UTC 2010


Hi Damon,

I totally get it. Admittedly, i knew nothing about photon mapping. Thanks a
lot for your explanation. I'm glad to know the library serves your purpose
:-)

Best regards,
Sylvain

On 28 Apr 2010 23:45, "Damon Blanchette" <damonbla at gmail.com> wrote:

Hi Sylvain, when you do ray tracing, it doesn't necessarily have to be on
boxes or voxels.  You sometimes do break up a scene into box-shaped sections
in order to speed up rendering, because then you don't have to test your
rays for intersection on every object.  It's mostly an optimization thing.

With something like photon mapping (which rests on top of ray tracing)
however, in a first step you shoot individual "photons" into a scene out of
each light source, much like what happens in nature.  The photons may hit an
object, and that intersection point is what you save into the kd-tree.  So,
for this particular algorithm, you are saving points and not boxes.  In the
second step, you shoot rays out of the camera into the scene.  They bounce
off the same objects, and at each of these intersection points you search
the kd-tree for any photons that may have bounced in the same general area
to get their light contribution.  Getting these photons is where the
question comes in - do you search in a certain specific area around the
interesection point, like "get me all the photons within 2 units of this
point" or, and this is what most photon mapping algorithms involve, do you
"get me the nearest 50 photons to this point, regardless of distance"?  I
managed to figure out a way to do it by getting all the photons within a
certain distance (what your library and the other library I'm using do) and
just adding up their contributions in a slightly different way.

I hope this helps your understanding!


Have a good day,
Damon


On Thu, Apr 22, 2010 at 10:23 PM, Sylvain Bougerel <
sylvain.bougerel.devel at gmail.com> wrote:
>
> Hi ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libkdtree-devel/attachments/20100501/9c668098/attachment.htm>


More information about the libkdtree-devel mailing list