polyscope icon indicating copy to clipboard operation
polyscope copied to clipboard

Question: adding volumetric flame-like lighting (raymarching or alternatives)

Open Lichenyueyue opened this issue 2 months ago • 1 comments

Hi! I’m using Polyscope for visualization and was wondering:

Do you think Polyscope could support a “realistic flame”-style volumetric lighting effect with relatively small modifications (e.g., raymarching / volume shading), or is that outside the scope of Polyscope’s design?

Lichenyueyue avatar Dec 18 '25 04:12 Lichenyueyue

Hi! This is a good question.

There's no support for volumetric raymarching or anything like that right now. Although, Polyscope does support depth-peeling transparency, so you might be able to fake a volume effect with nested transparent meshes, if you really wanted.

It would make sense to support volumetric raymarching on the VolumeGrid structure, I'd love to add that (though I'm not currently working on it). One challenge is how to implement it without using CUDA or compute shaders, etc. Right now Polyscope targets OpenGL 3.3 core-profile, which is quite old, but very widely supported; this is part of why it's easy to run everywhere. I am not sure if it's possible to write a performant raymarcher in OpenGL 3.3.... Maaaaaaybe we could add optional raymarching that is only available if OpenGL is >3.3, but I would have to think hard about whether it is worth it to add features only supported on certain platforms.

A last option is that you can render your raymarched flame in any other rendering engine, and composite it into the Polyscope viewport as a RenderImage alongside existing meshes/points/etc. We use this often to visualize the outputs of custom renderers, Gaussian splats, etc. This puts the work on the user-side, but at least makes it possible to visualize fancy custom rendered data.

nmwsharp avatar Dec 18 '25 04:12 nmwsharp