compositor rgb curve node is modifying the alpha channel. #110384

Closed
opened 2023-07-22 18:54:23 +02:00 by michael campbell · 9 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 535.98

Blender Version
Broken: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash: c7fc78b81ecb
Worked: (unknown)

Short description of error
compositor rgb curve node is modifying the alpha channel.

Exact steps for others to reproduce the error

  1. open attached file
  2. go to the compositor
  3. render a still frame
  4. mute and unmute the rgb curve node

You'll notice the white background which is added by the alpha over node, becomes grey when the rgb curve node is un-muted, indicating the rgb curve node is actually modifying the alpha channel rather than just the RGB channels as expected. It can be worked around using the alpha into the fac of the alpha over node, but that defeats the purpose of an alpha over node.

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 535.98 **Blender Version** Broken: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash: `c7fc78b81ecb` Worked: (unknown) **Short description of error** compositor rgb curve node is modifying the alpha channel. **Exact steps for others to reproduce the error** 1. open attached file 2. go to the compositor 3. render a still frame 4. mute and unmute the rgb curve node You'll notice the white background which is added by the alpha over node, becomes grey when the rgb curve node is un-muted, indicating the rgb curve node is actually modifying the alpha channel rather than just the RGB channels as expected. It can be worked around using the alpha into the fac of the alpha over node, but that defeats the purpose of an alpha over node.
michael campbell added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2023-07-22 18:54:24 +02:00
Member

Thank you for the report @3di.

The curve node is set to Extend Extrapolated. The line continues straight, making the color at X=0 negative, instead of 0 as expected. Background of 1.0 white plus a negative foreground color ends up gray.

To fix this, either set the Extend mode to Extend Horizontal, or add another point to the curve at (0, 0).

Does that make sense?

Thank you for the report @3di. The curve node is set to `Extend Extrapolated`. The line continues straight, making the color at X=0 negative, instead of 0 as expected. Background of 1.0 white plus a negative foreground color ends up gray. To fix this, either set the Extend mode to `Extend Horizontal`, or add another point to the curve at (0, 0). Does that make sense?
Evan Wilson added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-07-22 21:30:04 +02:00

Hi, thanks, but the issue is the RGB curve node shouldn't be affecting the Alpha channel at all, it's meant specifically for RGB channels only as the name suggests. You would never want the alpha to change when you're modifying the colour channels. When you want to modify the Alpha then you would connect the alpha pass to an RGB curve node or similar, and modify prior to a set alpha node to replace the alpha that's burned into the combined pass.

Hi, thanks, but the issue is the RGB curve node shouldn't be affecting the Alpha channel at all, it's meant specifically for RGB channels only as the name suggests. You would never want the alpha to change when you're modifying the colour channels. When you want to modify the Alpha then you would connect the alpha pass to an RGB curve node or similar, and modify prior to a set alpha node to replace the alpha that's burned into the combined pass.

Additionally, you generally need the curve to be extend extrapolated for correct results on the RGB channels. So setting it to Extend horizontal isn't possible.

Extend horizontal = incorrect results (see parade scope on the right)
image

Extend extrapolated = correct results (except the alpha is now broken):
image

Additionally, you generally need the curve to be extend extrapolated for correct results on the RGB channels. So setting it to Extend horizontal isn't possible. Extend horizontal = incorrect results (see parade scope on the right) ![image](/attachments/7b91d26b-4dfe-4035-8aa1-155222ee3a56) Extend extrapolated = correct results (except the alpha is now broken): ![image](/attachments/f2f8401e-a6ac-46be-badb-26cff00a064b)
2.7 MiB
3.1 MiB
Member

The curve node isn't modifying the alpha channel. Looking at the output of the curve node alone (by right-clicking the alpha section in the Image Viewer window), you can see that Alpha is still 0.0, while the RGB values are -0.56849. It is the adding of this negative color value that turns the output gray, not a change in the alpha value.

The curve node isn't modifying the alpha channel. Looking at the output of the curve node alone (by right-clicking the alpha section in the Image Viewer window), you can see that Alpha is still 0.0, while the RGB values are -0.56849. It is the adding of this negative color value that turns the output gray, not a change in the alpha value.

hmm, I've just checked, and the alpha can display as a negative. So hmm, something's not right. Why would the alpha over show gray if the alpha is set to 0? It should be letting pure white though where the alpha is 0.

hmm, I've just checked, and the alpha can display as a negative. So hmm, something's not right. Why would the alpha over show gray if the alpha is set to 0? It should be letting pure white though where the alpha is 0.

Perhaps the bug is that if the colour channels are negative, then the alpha over node doesn't respect the alpha's value? Alpha 0 should mean the alpha over uses the background completely, regardless of the rgb values of the foreground image right?

Perhaps the bug is that if the colour channels are negative, then the alpha over node doesn't respect the alpha's value? Alpha 0 should mean the alpha over uses the background completely, regardless of the rgb values of the foreground image right?
Member

Additionally, you generally need the curve to be extend extrapolated for correct results on the RGB channels. So setting it to Extend horizontal isn't possible.

Ah yes, I was only just referring to a fix for your example case, and not the general case. Adding an addition point at (0, 0) on the curve widget would be the more general fix.

> Additionally, you generally need the curve to be extend extrapolated for correct results on the RGB channels. So setting it to Extend horizontal isn't possible. Ah yes, I was only just referring to a fix for your example case, and not the general case. Adding an addition point at (0, 0) on the curve widget would be the more general fix.
Member

Perhaps the bug is that if the colour channels are negative, then the alpha over node doesn't respect the alpha's value? Alpha 0 should mean the alpha over uses the background completely, regardless of the rgb values of the foreground image right?

Ah, this not the case,. Alpha 0 simply means that it doesn't block the background color from coming though, and says nothing about the foreground colors (unless the box is checked, or the premultiply sliders are used, both of which are legacy options.)

> Perhaps the bug is that if the colour channels are negative, then the alpha over node doesn't respect the alpha's value? Alpha 0 should mean the alpha over uses the background completely, regardless of the rgb values of the foreground image right? Ah, this not the case,. Alpha 0 simply means that it doesn't block the background color from coming though, and says nothing about the foreground colors (unless the box is checked, or the `premultiply` sliders are used, both of which are legacy options.)

Oh I see. I misunderstood how the alpha over node actually worked then. Sorry about that.

Oh I see. I misunderstood how the alpha over node actually worked then. Sorry about that.
Blender Bot added
Status
Archived
and removed
Status
Needs Information from User
labels 2023-07-23 01:44:29 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#110384
No description provided.