#19150 closed enhancement (fixed)
Add scene support for volumes
| Reported by: | Tom Goddard | Owned by: | Tom Goddard |
|---|---|---|---|
| Priority: | moderate | Milestone: | |
| Component: | Volume Data | Version: | |
| Keywords: | Cc: | Zach Pearson, Eric Pettersen, Elaine Meng | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
Make the scenes command and tool work with volumes.
Attachments (2)
Change History (6)
comment:1 by , 4 weeks ago
| Cc: | added |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
comment:2 by , 3 weeks ago
Is this improvement restricted to map surfaces? Per-vertex coloring of molecular surfaces does not seem to be saved/restored via scenes. See screenshot and session attached. Scenes: ribbon alone, mlp surf, esp surf, esp surf 50% transparent, you can kinda see those in the thumbnails. Restoring session and trying to restore scenes only toggles molecular surface display -- coloring and transparency do not change
.
comment:3 by , 3 weeks ago
I can confirm it works in the daily build for volume data surfaces: isosurface level, mesh vs. solid vs. volume, color including per-vertex (e.g. radial). Sorry about injecting the molecular surface topic, probably is a separate ticket.
comment:4 by , 3 weeks ago
The per-vertex coloring and triangle masking in scenes is only support for volume surfaces. It of course makes sense for them to also apply to molecular surfaces or other surface models. I think that will be possible by making those changes instead apply to any model instead of currently just volume surfaces. But I decided initially to only see how it works with volume surfaces to limit the damage if it has bugs. It would be good to make a separate ticket for per-vertex coloring and masking (zones) for molecular surfaces or other surfaces.

Done.
Zach had added some initial scene support for volumes that worked with image style rendering. I added scene support for the VolumeSurface model. So contour level, color, and mesh style are correctly saved. I also made per-vertex coloring for instance with color zone or the surface color tool work, and masking such as with the surface dust tool work. The per-vertex coloring and masking were a bit tricky because they are managed by other tools rather than by the models. But the models have auto_recolor_vertices and auto_remask_triangles attributes that are callable class instances that can be saved in sessions so the scene code I added simply remembers those. Remarkably the scenes are correctly saved and restored in sessions too. I tried color zone, color radially, color by volume value, and hide dust and all worked.
I have not thoroughly tested the many volume display capabilities (slabs, orthoplanes, ...) so there are likely volume scene bugs to be discovered. But this is an initial version.