Skip to content

feat: SG-41316: Add Dissolve blend composite mode to stackIPNode with UI controls#940

Merged
cedrik-fuoco-adsk merged 4 commits intoAcademySoftwareFoundation:mainfrom
nigelsumner:feature/dissolve-blend
Apr 21, 2026
Merged

feat: SG-41316: Add Dissolve blend composite mode to stackIPNode with UI controls#940
cedrik-fuoco-adsk merged 4 commits intoAcademySoftwareFoundation:mainfrom
nigelsumner:feature/dissolve-blend

Conversation

@nigelsumner
Copy link
Copy Markdown
Contributor

Add dissolve blend composite mode with UI controls

This PR implements a new dissolve blend composite mode for OpenRV's stack compositor with full UI integration and real-time controls.

OpenRV_dissolveBlend.mov

Features Added

  • Dissolve blend mode in StackIPNode for 2-input compositing
  • GPU shader implementation (Dissolve2.glsl) with configurable amount
  • UI slider and text input controls in Session Manager
  • Real-time dissolve amount adjustment (0.0 to 1.0 range)
  • Immediate UI updates when switching between composite modes

Technical Implementation

Core Implementation

  • StackIPNode.cpp: Added dissolve mode support with m_dissolveAmount property
  • StackIPNode.h: Added property declaration for dissolve amount control
  • ShaderCommon.cpp/.h: Implemented newDissolveBlend() function for GPU shader management

GPU Shaders

  • Dissolve2.glsl: GLSL shader for hardware-accelerated dissolve blending

UI Integration

  • composite.ui: Added QSlider and QLineEdit controls for dissolve amount
  • Composite_edit_mode.mu: Enhanced with slider integration and UI synchronization

Build System

  • CMakeLists.txt: Updated build configuration for dissolve shader compilation

Testing

  • Successfully builds on macOS with existing OpenRV build system
  • UI controls properly show/hide when switching composite modes
  • Slider and text field remain synchronized during interaction
  • Dissolve blending works correctly with 2-input stacks

Usage

  1. Load two media sources into a stack
  2. In Session Manager, set composite mode to "Dissolve"
  3. Use the slider or text input to control dissolve amount (0.0 = first input, 1.0 = second input)
  4. Real-time preview updates as you adjust the dissolve amount

Copy link
Copy Markdown
Contributor

@pbergeron-adsk pbergeron-adsk left a comment

Choose a reason for hiding this comment

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

This looks OK to me, needs to be view tested.

@bernie-laberge bernie-laberge added the community Contribution from the Open RV Community label Dec 1, 2025
Comment thread src/lib/ip/IPCore/ShaderCommon.cpp
Comment thread src/lib/ip/IPBaseNodes/IPBaseNodes/StackIPNode.h Outdated
Comment thread .gitignore Outdated
Copy link
Copy Markdown
Contributor

@bernie-laberge bernie-laberge left a comment

Choose a reason for hiding this comment

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

Thank you @nigelsumner for this great contribution !

@bernie-laberge bernie-laberge changed the title Add Dissolve blend composite mode to stackIPNode with UI controls SG-41316: Add Dissolve blend composite mode to stackIPNode with UI controls Dec 1, 2025
@cedrik-fuoco-adsk
Copy link
Copy Markdown
Contributor

Hi @nigelsumner,

Thank you for the contribution! Could you fix the pre-commit issue? You might have to run the pre-commit manually on the files you modified.

Signed-off-by: nigel sumner <nigelsumner@mac.com>
@nigelsumner nigelsumner force-pushed the feature/dissolve-blend branch from 37823ae to 7b2e27a Compare February 18, 2026 18:04
@nigelsumner
Copy link
Copy Markdown
Contributor Author

Hey Cedrik, apologies for the messy commits. I'm still learning my way around the nuances of github. I figured a clean and rebase was the easiest fix. Still so much to learn on this platform. Cheers.

@cedrik-fuoco-adsk cedrik-fuoco-adsk changed the title SG-41316: Add Dissolve blend composite mode to stackIPNode with UI controls feat: SG-41316: Add Dissolve blend composite mode to stackIPNode with UI controls Feb 19, 2026
@cedrik-fuoco-adsk
Copy link
Copy Markdown
Contributor

It's ok, no problem! We will be testing your PR soon. Thank you for your contribution!

@savoiei
Copy link
Copy Markdown

savoiei commented Mar 19, 2026

Hi @nigelsumner ! Nice work on the Dissolve compare feature! It works well, but the addition of this new operation unfortunately cause an issue with the selection of the different options in the "Stack" top-menu of the application. We should make sure to fix this before going forward with the merge.

Here is more information about the issue and the steps to reproduce it:

Issue
The selection of the compare options from the Stack top-menu are affected and offset with the addition of the "Dissolve" compare mode.

Steps to reproduce

  1. Launch a version of OpenRV from the current branch (nigelsumner:feature/dissolve-blend)
  2. Access the "File / Open" menu
  3. Import at least 2 clips
  4. If not already open, hit the "x" hotkey to open the Session Manager
  5. In the "Sources" section, select 2 clips, then right-click on one of them and select "New Viewable / Stack"
  6. Make sure the the Stack view created on step 5 is loaded in OpenRV's Player, then, in the Session Manager, select the "Edit" tab to see the "Composite Function" values of the Stack mode
  7. Change the "Composite Function" value 1 by 1 through the "Stack" top-menu and look at the value being updated in the "Edit" section of the Stack view, in the Session Manager (i.e: Over, Add, Dissolve (New option), Difference...)

---> Notice that once you select "Difference", nothing changes in the "Composite Function" values of the Session Manager. If you then select "Stack / Inverted Difference" option, the "Edit" section in the Session Manager will update to "Difference". The addition of the "Dissolve" option in the Stack menu is creating an issue trying to select the "Difference" option, then it will set an offset when selecting the following options (i.e: Inverted Difference, Replace, Topmost). This will ultimately cause the "Topmost" option now being available anymore for selection.

@nigelsumner
Copy link
Copy Markdown
Contributor Author

Hey There,
Sure thing let me take a look. It works as expected on my end, can you let me know what platform you're running on so i can see if i can reproduce it on a similar platform. thanks!

Your description of what is (or isn't) happening is pretty clear, but as i'm not seeing that on my build perhaps you could send a screen grab / recording of the issue. In the meantime i'll start digging in.

cheers!

Hi @nigelsumner ! Nice work on the Dissolve compare feature! It works well, but the addition of this new operation unfortunately cause an issue with the selection of the different options in the "Stack" top-menu of the application. We should make sure to fix this before going forward with the merge.

Here is more information about the issue and the steps to reproduce it:

Issue The selection of the compare options from the Stack top-menu are affected and offset with the addition of the "Dissolve" compare mode.

Steps to reproduce

  1. Launch a version of OpenRV from the current branch (nigelsumner:feature/dissolve-blend)
  2. Access the "File / Open" menu
  3. Import at least 2 clips
  4. If not already open, hit the "x" hotkey to open the Session Manager
  5. In the "Sources" section, select 2 clips, then right-click on one of them and select "New Viewable / Stack"
  6. Make sure the the Stack view created on step 5 is loaded in OpenRV's Player, then, in the Session Manager, select the "Edit" tab to see the "Composite Function" values of the Stack mode
  7. Change the "Composite Function" value 1 by 1 through the "Stack" top-menu and look at the value being updated in the "Edit" section of the Stack view, in the Session Manager (i.e: Over, Add, Dissolve (New option), Difference...)

---> Notice that once you select "Difference", nothing changes in the "Composite Function" values of the Session Manager. If you then select "Stack / Inverted Difference" option, the "Edit" section in the Session Manager will update to "Difference". The addition of the "Dissolve" option in the Stack menu is creating an issue trying to select the "Difference" option, then it will set an offset when selecting the following options (i.e: Inverted Difference, Replace, Topmost). This will ultimately cause the "Topmost" option now being available anymore for selection.

@nigelsumner nigelsumner reopened this Mar 19, 2026
@savoiei
Copy link
Copy Markdown

savoiei commented Mar 25, 2026

Hi @nigelsumner ,
I saw that issue on MacOS Tahoe 26.3 (ARM64), Windows 11 and Linux Rocky 9. Here's a recording of the issue:

Dissolve-Stack-Issue.mov

Thanks!

@nigelsumner
Copy link
Copy Markdown
Contributor Author

nigelsumner commented Mar 26, 2026

Hey @savoiei !
Thanks for the movie, its doing exactly what i thought, the good news is i know whats causing it (and i can replicate it if i change the code back to an older version), the confusing thing for me is. If i do a clean pull i can't reproduce it.

The code that's causing it is from some legacy lines in the Composite_edit_mode.mu, specifically:

#OLD code:
140 menuItem(" Dissolve", "", "viewmode_category", setOpEvent(,2), opState("dissolve")),
141 menuItem(" Difference", "", "viewmode_category", setOpEvent(,2), opState("difference")),
142 menuItem(" Inverted Difference", "", "viewmode_category", setOpEvent(,3), opState("-difference")),
...

#Correct code (this should be the checked in version):
140 menuItem(" Dissolve", "", "viewmode_category", setOpEvent(,2), opState("dissolve")),
141 menuItem(" Difference", "", "viewmode_category", setOpEvent(,3), opState("difference")),
142 menuItem(" Inverted Difference", "", "viewmode_category", setOpEvent(,4), opState("-difference")),
...

There was an older check in i had done that hadn't fixed this issue (i hadn't fixed the top menu items, so the old indices were in there). Is it possible you picked up the older one before it got fixed?
Would it be possible to do a new pull of the latest, and a full rebuild just to make sure?

I'm still not 100% comfortable with everything i'm doing in git, so it's possible the issue is still on my end, but if i look at the checked in code, the fix looks to be there.

If you could pull the latest and let me know, that would be great. I'd also be curious if you grepped the Composite_edit_mode.mu which version of the lines above you see.

thanks!

@savoiei
Copy link
Copy Markdown

savoiei commented Mar 27, 2026

Hi @nigelsumner !
You are right. I just tested your latest version of the PR and I am not seeing the issue mentioned in my previous comment. I will let @cedrik-fuoco-adsk do a follow-up with you, but testing-wise, I believe the last changes are good!
Thanks!

@cedrik-fuoco-adsk
Copy link
Copy Markdown
Contributor

Thank you @nigelsumner ! I did a quick review again since it has been a while, merging it!

@cedrik-fuoco-adsk cedrik-fuoco-adsk merged commit 6d1c478 into AcademySoftwareFoundation:main Apr 21, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Contribution from the Open RV Community tracked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants