Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#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)

surfscenes.cxs (8.9 MB ) - added by Elaine Meng 3 weeks ago.
Added by email2trac
Screenshot 2025-10-15 at 1.20.41 PM.png (1.5 MB ) - added by Elaine Meng 3 weeks ago.
Added by email2trac

Change History (6)

comment:1 by Tom Goddard, 3 weeks ago

Cc: Zach Pearson Eric Pettersen Elaine Meng added
Resolution: fixed
Status: assignedclosed

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.

comment:2 by Elaine Meng, 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
.

surfscenes.cxs

Added by email2trac


Last edited 3 weeks ago by Tom Goddard (previous) (diff)

by Elaine Meng, 3 weeks ago

Attachment: surfscenes.cxs added

Added by email2trac

by Elaine Meng, 3 weeks ago

Added by email2trac

comment:3 by Elaine Meng, 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.

Last edited 3 weeks ago by Tom Goddard (previous) (diff)

comment:4 by Tom Goddard, 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.

Note: See TracTickets for help on using tickets.