Have you looked at the patch that I posted to povray.unofficial.patches a
little while ago? I implemented the KD-tree from Vlastimil Havran's
thesis. Unfortunately I chose to call it a BSP-tree rather than the
KD-tree, because it seems to be referred to as BSP-tree in other
raytracers. I haven't had time to look at your patch yet, but the
performance is very sensitive to the way in which the tree is constructed.
I chose to use the cost function from the thesis to choose splitting
points along with a depth bound based on the size of the scene, which
seems to give good performance for most cases.
I've done some work on improving the previous patch to work on meshes and
fix some bugs (and better comment the code) but haven't had time to
prepare and test the patch yet.
I will have a look at your code as soon as I have time.
Andrew
Post a reply to this message
|