yt-project / yt_idv

Interactive volume rendering for yt
Other
9 stars 6 forks source link

isocontour improvements #43

Closed chrishavlin closed 1 year ago

chrishavlin commented 2 years ago

The main change in this PR is the ability to set the alpha channel for isocontours individually from the user interface.

Also includes:

Draft for now as I'd like to:

chrishavlin commented 2 years ago

I think this is at a good stage for final review + merge.

I ended up doing a wider refactor beyond adding the alpha channel. To summarize the changes :

Here's an example of selecting three layers, 10^-29, 10^-30 and 10^-28 with tolerance within +/-1% of the target values:

isocontours

Note, I did not end up adding tests or moving the isocontour attributes into a single tuple.... because I think a larger refactor is warranted: I think we should move the isocontour behavior to its own scene_component or scene_annotation class. I'm not sure on which, I think its behavior is kind of in between the two: it's data behavior is more like the scene_components as it still needs the full data textures to render, but the user interaction feels more like a scene_annotation. And it'd be nice to be able to use one of the volume rendering shaders while also rendering isocontours... in any case, that feels much further beyond the scope of this PR.