Ray Tracing concers: Efficient Data Structure and Photon Mapping
Posted
by
Grieverheart
on Game Development
See other posts from Game Development
or by Grieverheart
Published on 2012-11-14T10:25:17Z
Indexed on
2012/11/14
11:19 UTC
Read the original article
Hit count: 307
data-structure
|raytracing
I'm trying to build a simple ray tracer for specific target scenes. An example of such scene can be seen below.
I'm concerned as to what accelerating data structure would be most efficient in this case since all objects are touching but on the other hand, the scene is uniform.
The objects in my ray tracer are stored as a collection of triangles, thus I also have access to individual triangles.
Also, when trying to find the bounding box of the scene, how should infinite planes be handled? Should one instead use the viewing frustum to calculate the bounding box?
A few other questions I have are about photon mapping. I've read the original paper by Jensen and many more material. In the compact data structure for the photon they introduce, they store photon power as 4 chars, which from my understanding is 3 chars for color and 1 for flux. But I don't understand how 1 char is enough to store a flux of the order of 1/n, where n is the number of photons (I'm also a bit confused about flux vs power).
The other question about photon mapping is, if it would be more efficient in my case to store photons per object (or even per Object's triangle) instead of using a balanced kd-tree.
Also, same question about bounding box of the scene but for photon mapping. How should one find a bounding box from the pov of the light when infinite planes are involved?
© Game Development or respective owner