Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recovering "split axis" from MiniTreeBuilder #55

Closed
EricAtPlanGrid opened this issue Feb 9, 2023 · 1 comment
Closed

Recovering "split axis" from MiniTreeBuilder #55

EricAtPlanGrid opened this issue Feb 9, 2023 · 1 comment
Labels
question Further information is requested

Comments

@EricAtPlanGrid
Copy link

Hello! I was wondering whether it would be possible to either include as part of the data, or to recover based on the tree, which access a node was split on?

@madmann91
Copy link
Owner

madmann91 commented Feb 12, 2023

If you need that information for traversal, I recommend using a method that intersects the two children and sorts them based on their distance instead. Otherwise, this information can be obtained by either one of two options:

  1. Recovering it from the two bounding boxes and choosing the axis which minimizes min(min2 - max1, min1 - max2) (the overlap between the two children)
  2. Storing it somewhere by packing it in the BVH node during construction. Since this is not used in the current design, and would take up useful bits from the BVH layout, it is not currently done and would require hacking the library a little.

Also, keep in mind that there might not be any split axis for other builders (e.g. ordered clustering), and that reinsertion will interfere with option 2. In general, BVHs need not be split along one axis, they just have to partition the set of objects in some way.

I hope this answered your question. If not, please re-open.

@madmann91 madmann91 added the question Further information is requested label Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants