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

Use lower-precision data for bounding volumes #165

Open
aprokop opened this issue Oct 28, 2019 · 1 comment · May be fixed by #670
Open

Use lower-precision data for bounding volumes #165

aprokop opened this issue Oct 28, 2019 · 1 comment · May be fixed by #670
Assignees
Labels
enhancement New feature or request performance Something is slower than it should be

Comments

@aprokop
Copy link
Contributor

aprokop commented Oct 28, 2019

Some things to consider:

  • Does the box size has to be aligned with the word size?
  • For correctness, the lower-precision AABB bounds must fully enclose the volume of the higher-precision AABB or object
    The lower bound of the AABB should be computed by rounding down to the nearest representable single-precision value. The upper bound should be computed by rounding up.
    There is also an issue that the range of values represented by float is smaller than that represented by double. Thus, scaling would be required.
  • Floats may not be the final answer
    For example, this paper considers quantized bounds. The scene bounding box is partitioned in $2^{10}$ bins in each direction, and the bounding boxes are snapped to bin boundaries. This allows to store each bound using only 10 bits, resulting in the overall bounding volume of the node taking 64 bits (4 unused), i.e. 8 bytes, compared to 24 required by 4 floats. Together with 2 ints the node size is 16 bytes.
@aprokop aprokop added enhancement New feature or request performance Something is slower than it should be labels Oct 28, 2019
@aprokop aprokop changed the title Use lower-precision data for tree bounding volumes Use lower-precision data for bounding volumes Oct 28, 2019
@aprokop
Copy link
Contributor Author

aprokop commented Mar 4, 2020

The move to float was addressed in #235. Other options remain to be investigated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Something is slower than it should be
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants