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

What is the purpose of buildSplatTree function? #378

Open
nerpa87 opened this issue Nov 26, 2024 · 1 comment
Open

What is the purpose of buildSplatTree function? #378

nerpa87 opened this issue Nov 26, 2024 · 1 comment

Comments

@nerpa87
Copy link

nerpa87 commented Nov 26, 2024

Hello, thank you for sharing great viewer!
I have a question about buildSplatTree function in SplatMesh.js - it seems that during tree building much resources could be consumed in case of scenes with big amount of splats. This makes viewer crash on mobile devices.
However viewer works without buildSplatTree, can you please explain what is the purpose of SplatTree building? What for parameters maximumDepth and maxCentersPerNode are responsible?
Thanks in advance.

@mkkellogg
Copy link
Owner

The splat tree is an octree structure that enables performance enhancements in a couple of ways:

  1. It is used to speed up raycasting
  2. It is used to help cull splats that are outside the view frustum so they they don't get rendered

maximumDepth is the maximum depth for the octree and maxCentersPerNode is the maximum number of splats to store in a node before splitting the node into 8 sub-nodes and recursively applying the algorithm to the child nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants