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

Is there a way to include mutliple colour arrays for Points (or any other) drawables? #436

Open
akshayvkamath opened this issue Nov 21, 2023 · 3 comments
Assignees

Comments

@akshayvkamath
Copy link

  • K3D version: 2.16.0
  • Python version: 2.16.0
  • Operating System: Mac OS Ventura 13.5 (Intel core i5 Macbook Pro)

Description

I am trying to use k3d to plot a point cloud with RGB values for every point. I've managed to get the drawable object and even exported an HTML (as that is my final goal for all the point cloud data I have). The problem I'm facing is not an error but more of a question. Is there a way I can include multiple arrays in the drawable object (when I call k3d.points(..., colors=[])) and toggle through the different stored color arrays after rendering, in the ipywidget menu (something like toggling through various shader options in the dropdown menu)?

The way I have been doing it so far is plotting multiple point clouds with the same xyz locations but different color arrays, which works for small point clouds; but the file I'm working with has ~3 Million points, and the HTML file is already at a size of ~52MB. I would like to minimize the size, and use the fact that the positions of the data are same across all the different point clouds I'm plotting. I also wanted to extend this to meshes I'm plotting, where I have to input the color arrays for every vertex (i.e., I was wondering if there was a way to provide multiple color arrays to the function that generates the drawable (e.g., k3d.mesh()) so that I can toggle through them after rendering, without the need to render multiple meshes and toggle their visibility).

@artur-trzesiok artur-trzesiok self-assigned this Jan 4, 2024
@artur-trzesiok
Copy link
Collaborator

Hi @akshayvkamath

At this moment K3D have limited option to handle your case. I do that by entering to JS API level and there I do that kind of operation. I will try to add example for that

@artur-trzesiok
Copy link
Collaborator

@akshayvkamath
Copy link
Author

Will do, thanks for the reply.

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

No branches or pull requests

2 participants