How can I efficiently render 1 billion cubes in VTK.js?

Hi all,

I’m working on a web-based 3D visualization using VTK.js, and I need to render a very large number of cubes — on the order of 1 billion. I’m looking for suggestions or best practices on how to handle this efficiently in the browser.

So far, I’ve tried approaches using vtkGlyph3DMapper, but I’m hitting performance and memory limitations long before reaching that scale. Are there any techniques in VTK.js (or WebGL generally) that can help me to achieve that.

Has anyone successfully visualized data at this scale in VTK.js, or is this better suited for native VTK?

Any advice or pointers would be appreciated!

Thanks in advance.

While not a cube, does the sphere mapper handle that scale? If so, something similar using some “fake cube” could do the trick.

Just to clarify — I’m working with VTK.js, where vtkOpenGLSphereMapper doesn’t exist. So I’m trying to find a way to replicate that performance in the browser.

When you mention the “sphere mapper,” are you referring specifically to vtkOpenGLSphereMapper in native VTK? If so, is there any known equivalent strategy or workaround in VTK.js.

I’d appreciate any guidance or examples if someone has already done something similar in VTK.js.