glue-viz / glue-vispy-viewers

3-d data viewers for glue based on VisPy
http://glueviz.org/en/stable/whatsnew/experimental_3d.html#experimental-3d
BSD 2-Clause "Simplified" License
25 stars 21 forks source link

Refactor isosurface viewer #356

Open astrofrog opened 4 years ago

astrofrog commented 4 years ago

The isosurface viewer is now very out of date. The current isosurface directory should be removed, and instead we should add an isosurface rendering option to the current volume viewer. I think the best way forward would be to add isosurface vs volume rendering as a volume layer option, and then if that mode is enabled, allow the user to show (for now) one contour level, which they can specify as a float. Then, the shaders should be updated so that for each ray propagation, it checks if the current texture needs to be rendered as an isosurface or a volume, and if an isosurface, we should use a similar approach to the current isosurface shader, where we first use bisection to find the actual level of the isocontour and then compute the color taking into account the lighting. All this should be reasonably straightforward, but the main trick will be to figure out how to combine the isosurface and volume rendering results. If this is too tricky to solve, we could also make volume vs isosurface a viewer-level option for now since that should be easier to do.