Skip to content

ENH: support per-vertex opacity in 3D overlays#13706

Open
PragnyaKhandelwal wants to merge 7 commits intomne-tools:mainfrom
PragnyaKhandelwal:enh-vertex-opacity
Open

ENH: support per-vertex opacity in 3D overlays#13706
PragnyaKhandelwal wants to merge 7 commits intomne-tools:mainfrom
PragnyaKhandelwal:enh-vertex-opacity

Conversation

@PragnyaKhandelwal
Copy link

@PragnyaKhandelwal PragnyaKhandelwal commented Feb 28, 2026

Reference issue
Fixes #13679

What does this implement/fix?
This PR adds support for per-vertex opacity in 3D distributed source overlays.

Previously, overlay opacity was effectively handled as a scalar value. This change allows opacity to be either:

a scalar (existing behavior), or
a 1D array with one value per vertex ([shape (n_vertices,)]
Implementation details:

Keeps the existing per-vertex RGBA pipeline and lets VTK handle triangle interpolation.
Adds explicit validation and clear error messages for invalid opacity shapes.
Updates related documentation for overlay alpha behavior.
Adds tests for:
valid per-vertex opacity usage, and
invalid-shape opacity failure cases.

Additional information
The branch is clean and focused on this issue.
No extra/demo files are included in the PR.
Targeted tests and pre-commit checks for modified files pass locally.

Copy link
Contributor

@wmvanvliet wmvanvliet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we modify one of the examples, or add a new one, to show off this functionality?

Code looks good!

@PragnyaKhandelwal PragnyaKhandelwal marked this pull request as draft March 1, 2026 07:08
@PragnyaKhandelwal PragnyaKhandelwal marked this pull request as ready for review March 1, 2026 07:51
@PragnyaKhandelwal PragnyaKhandelwal marked this pull request as draft March 1, 2026 08:13
@PragnyaKhandelwal PragnyaKhandelwal marked this pull request as ready for review March 1, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

set opacity per-vertex

2 participants