Original Post
hi, I'm writing a simple raytracer and would want to use a space partitioning algorithm. I've been thinking about using kd-trees, but AFAIK the trees take a very long time to get built. Also, I think building an octrees takes significantly less time to be built and the results are worse, but not that much (octree_buildtime + octree_traversal + intersections < kd_tree_buildtime + traversal + intersection). Here are the questions 1) why is kd-tree used in raytracing when it takes so long to get built? 2) are there any other algorithms you would suggest?