K3D-tools / K3D-jupyter

K3D lets you create 3D plots backed by WebGL with high-level API (surfaces, isosurfaces, voxels, mesh, cloud points, vtk objects, volume renderer, colormaps, etc). The primary aim of K3D-jupyter is to be easy for use as stand alone package like matplotlib, but also to allow interoperation with existing libraries as VTK.
MIT License
942 stars 123 forks source link

k3d.points slow with shade='mesh' #334

Closed marcinofulus closed 2 years ago

marcinofulus commented 2 years ago

k3d.points(np.random.randn(1000,3),point_size=0.1,shader='mesh') renders with fps<1

artur-trzesiok commented 2 years ago

Hi @marcinofulus

Can you provide a little bit more information about your platform? Please open k3d plot and check developer console and copy a lines like that:

K3D: (UNMASKED_VENDOR_WEBGL) Google Inc. (NVIDIA)
Renderer.js:138 K3D: (UNMASKED_RENDERER_WEBGL) ANGLE (NVIDIA, NVIDIA GeForce GTX 1070 Direct3D11 vs_5_0 ps_5_0, D3D11-30.0.14.9613)
Renderer.js:139 K3D: (depth bits) 24
Renderer.js:140 K3D: (stencil bits) 8

I checked your code and I have 60 fps. But please look closer to parameter:

        mesh_detail: `int`.
            Default is 2. Setting this to a value greater than 0 adds more vertices making it no longer an
            icosahedron. When detail is greater than 1, it's effectively a sphere. Only valid if shader='mesh'

Best regards,

artur-trzesiok commented 2 years ago

@marcinofulus ?

marcinofulus commented 2 years ago

I tried other browser - in firefox it works as it used to work - it looks like a google-chrome regression after some upgrade....