<p>Hi Damon,</p>
<p>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 :-)</p>
<p>Best regards,<br>
Sylvain</p>
<p><blockquote type="cite">On 28 Apr 2010 23:45, "Damon Blanchette" <<a href="mailto:damonbla@gmail.com">damonbla@gmail.com</a>> wrote:<br><br><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>I hope this helps your understanding!</div><p><font color="#500050"><br>Have a good day,<br>Damon<br><br><br></font></p><p><font color="#500050">On Thu, Apr 22, 2010 at 10:23 PM, Sylvain Bougerel <<a href="mailto:sylvain.bougerel.devel@gmail.com">sylvain.bougerel.devel@gmail.com</a>> wrote:<br>
><br>> Hi ...</font></p></blockquote></p>