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

Potree not loading more than arbitrary threshold, regardless of budget #50

Open
geoff-harper opened this issue Nov 7, 2019 · 3 comments

Comments

@geoff-harper
Copy link

My starting point was the example in the repo. I'm setting the point budget in the initialize function like so:

initialize(targetEl: HTMLElement): void {
    if (this.targetEl || !targetEl) {
      throw new Error('Viewer already mounted or no target passed.');
    }

    this.targetEl = targetEl;
    targetEl.appendChild(this.renderer.domElement);

    this.potree.pointBudget = 3600000;

    // camera
    this.camera.position.set(91, 91, 91);
    this.camera.lookAt(0, 0, 0);
    this.cameraControls = new OrbitControls(this.camera, this.targetEl);

    this.resize();
    window.addEventListener('resize', this.resize);
    this.targetEl.addEventListener('click', this.handleClick);

    requestAnimationFrame(this.loop);
  }

I have verified that if I set the budget under the threshold, say 200k, that the loader does respect that and limits the points accordingly. However with my desired 3.6M for this data set, I can't cross ~940k. I've spun up the same data set with the full Potree lib and it will render all 3.6M points if the budget is >=3.6M (both minNodeSize === 30). This is the only Object in the scene.

I'm not sure what other data I should provide so let me know

@hccampos
Copy link
Collaborator

I'll see what I can find, but things seem to work on our apps at Pix4D, so it is rather strange.

@hccampos
Copy link
Collaborator

One thing that came to my mind is that you might have to set the minNodePixelSize on the PointCloudOctree. The default is 50px and if nodes would end up being smaller than 50px on the screen, we don't load them.

@geoff-harper
Copy link
Author

geoff-harper commented Nov 25, 2019

I tried to set the material point size type to fixed in case that was telling potree to cull excess points. As far as I can tell I've matched the full potree lib's options as close as I can. Could you share what material and octree params you're using so I could investigate further? I am doing some things with the camera projection matrix but they aren't very drastic and I'm not sure how much of a bearing that has on point loading

It isn't critical at this time since the point cloud visually looks fine, I'm just concerned that it may lead to problems in the future

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