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

Clipping range issue #119

Open
tomsal opened this issue Aug 27, 2021 · 0 comments
Open

Clipping range issue #119

tomsal opened this issue Aug 27, 2021 · 0 comments

Comments

@tomsal
Copy link

tomsal commented Aug 27, 2021

Hi,

I am using ipygany together with pyvista in a jupyter notebook. I am mostly working with large point clouds of traffic scenes. When zooming in on certain parts of the point cloud, points are disappearing. It is a behavior I do not experience with for example the ipyvtklink backend of pyvista.

Unfortunately, I cannot give you a minimal working example at the moment, because the data I am using is not public, but here's a short video of what I am experiencing. (Note the backend was set globally to ipygany.)
https://user-images.githubusercontent.com/21262762/131076118-225bac83-5408-4462-bf11-1ade3a31f80a.mp4

I am guessing is that this is a clipping issue. Specifically, I suspect that line https://github.com/QuantStack/ipygany/blob/20b82f08c41f415919da11bf161c7dee2d97b2c7/src/widget.ts#L987 and https://github.com/QuantStack/ipygany/blob/20b82f08c41f415919da11bf161c7dee2d97b2c7/src/widget.ts#L1015 could cause this issue. Is there a way to change the clipping range? Using the camera object of pyvista does not seem to have an effect.

The reason I suspect that this is the issue, is that the order in which I add meshes to the plotter matters. For example,

...
plotter.add_mesh(pc, point_size=5, render_points_as_spheres=True, color='g')
arrow = pv.Arrow()
plotter.add_mesh(arrow)
...

works fine (except for the clipping when zooming in), whereas doing it the other way around

...
arrow = pv.Arrow()
plotter.add_mesh(arrow)
plotter.add_mesh(pc, point_size=5, render_points_as_spheres=True, color='g')
...

leads to a blank scene.

I really like the idea of ipygany, but this makes it unusable for me at this point, unfortunately. It would be great to see this fixed 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

1 participant