danieljprice / splash

SPLASH is an interactive visualisation and plotting tool using kernel interpolation, mainly used for Smoothed Particle Hydrodynamics simulations
https://splash-viz.readthedocs.io
GNU General Public License v2.0
55 stars 43 forks source link

Gradual transparency in double rendering #54

Closed themikelau closed 3 years ago

themikelau commented 3 years ago

Currently, the double rendering option sets the top layer to become transparent in regions where the rendered quantity falls outside the colour bar, which is a hard cutoff. It would be nice to implement double rendering such that the top layer follows a "transparency/alpha bar" where the transparency scales with the rendered quantity.

An example use case is to indicate the hydrogen partial ionisation region on top of density as follows: Render density on the bottom layer (not necessarily with a grayscale colorbar), and render hydrogen ionisation fraction (between 0 and 1) on the top layer in some other colour, but with that colour fading away towards 0 and 1 so that the regions with ionisation fraction near 0.5 are most opaque.