Geometry Nodes: Color mix nodes don't effect the alpha #104401

Open
opened 2023-02-07 08:11:25 +01:00 by Shmuel Israel · 12 comments

System Information
Operating system:
Graphics card:

Blender Version
Broken: 3.4.1

Short description of error
whenever I try doing any math with colors, the alpha isn't affected when I use the color mix node in any blend mode.

Exact steps for others to reproduce the error

  1. Open blender geometry nodes.
  2. Add 2 combine color, color or whatever node with different different values for the alpha's.
  3. Use a mix color node with any operation like add, subtract etc.
  4. See that the alpha didn't change (use the spreadsheet or the hover over).
**System Information** Operating system: Graphics card: **Blender Version** Broken: 3.4.1 **Short description of error** whenever I try doing any math with colors, the alpha isn't affected when I use the color mix node in any blend mode. **Exact steps for others to reproduce the error** 1. Open blender geometry nodes. 2. Add 2 combine color, color or whatever node with different different values for the alpha's. 3. Use a mix color node with any operation like add, subtract etc. 4. See that the alpha didn't change (use the spreadsheet or the hover over).
Author

Added subscriber: @shmuel

Added subscriber: @shmuel
Contributor

Geometry nodes are like shader nodes I think: color sockets don't carry alpha. That's why eg. the Image Texture node has a separate Color and Alpha socket.

That makes the alpha appearing in the color picker misleading of course.

Geometry nodes are like shader nodes I think: color sockets don't carry alpha. That's why eg. the Image Texture node has a separate Color and Alpha socket. That makes the alpha appearing in the color picker misleading of course.
Author

Geometry nodes are like shader nodes I think: color sockets don't carry alpha. That's why eg. the Image Texture node has a separate Color and Alpha socket.

That makes the alpha appearing in the color picker misleading of course.

This isn't true. Geometry nodes are different than shaders, seeing as thay have a separate answer combine color nodes that have an alpha socket. I didn't make this bug report because I was bored; I ran into an issue where I'm trying to do math with quaternions - a 4 dimension number and am using the color sockets for it - and when I do math operation I don't want to separate the color into its components do the math and then recombine it. That's just inconvenient.

> Geometry nodes are like shader nodes I think: color sockets don't carry alpha. That's why eg. the Image Texture node has a separate Color and Alpha socket. > > That makes the alpha appearing in the color picker misleading of course. This isn't true. Geometry nodes are different than shaders, seeing as thay have a separate answer combine color nodes that have an alpha socket. I didn't make this bug report because I was bored; I ran into an issue where I'm trying to do math with quaternions - a 4 dimension number and am using the color sockets for it - and when I do math operation I don't want to separate the color into its components do the math and then recombine it. That's just inconvenient.
Contributor

You're right, my bad. (I wonder why they're separate on some nodes and not others though.)

edit: I think the problem is the geo node code ends up going through the same ramp_blend function that the shader node code uses, so just like for shader nodes, it operates only on the first three components (the alpha of the A operand goes through unchanged).

You're right, my bad. (I wonder why they're separate on some nodes and not others though.) edit: I think the problem is the geo node code ends up going through the same `ramp_blend` function that the shader node code uses, so just like for shader nodes, it operates only on the first three components (the alpha of the A operand goes through unchanged).

will check

will check

ramp_blend, that used in MixColorFunction work only for rgb channels. Seems to this on the plan. But this can be changed?

`ramp_blend`, that used in `MixColorFunction` work only for rgb channels. Seems to this on the plan. But this can be changed?
Author

so will this be fixed anytime soon?

so will this be fixed anytime soon?

This is not a regression, and geometry node haven't to copy shader functionality. So we have to wait some devs with answers.

This is not a regression, and geometry node haven't to copy shader functionality. So we have to wait some devs with answers.
Iliya Katushenock added the
Interest
Geometry Nodes
label 2023-02-08 11:36:17 +01:00
Member

The Mix Color node was ported from the Shader nodes which only support RGB channels.

The composite Mix Color node does have an use alpha mode.

From manual:
If activated, by clicking on the Color and Alpha icon, the Alpha channel of the second image is used for mixing. When deactivated, the default, the icon background is a light gray. The alpha channel of the base image is always used.

This behaviour could be ported to the GN Mix Node but some kind of design or decision would need to be made.

The Mix Color node was ported from the Shader nodes which only support RGB channels. The composite Mix Color node does have an use alpha mode. From manual: If activated, by clicking on the Color and Alpha icon, the Alpha channel of the second image is used for mixing. When deactivated, the default, the icon background is a light gray. The alpha channel of the base image is always used. This behaviour could be ported to the GN Mix Node but some kind of design or decision would need to be made.
Author

The Mix Color node was ported from the Shader nodes which only support RGB channels.

The composite Mix Color node does have an use alpha mode.

From manual:
If activated, by clicking on the Color and Alpha icon, the Alpha channel of the second image is used for mixing. When deactivated, the default, the icon background is a light gray. The alpha channel of the base image is always used.

This behaviour could be ported to the GN Mix Node but some kind of design or decision would need to be made.

I don't believe that is what I mean. I think what you're saying to implement is, using the second or fist alpha as the mix factor. I'm taking about having the alpha's effect each other in the same way r, g, and b are.

> The Mix Color node was ported from the Shader nodes which only support RGB channels. > > The composite Mix Color node does have an use alpha mode. > > From manual: > If activated, by clicking on the Color and Alpha icon, the Alpha channel of the second image is used for mixing. When deactivated, the default, the icon background is a light gray. The alpha channel of the base image is always used. > > This behaviour could be ported to the GN Mix Node but some kind of design or decision would need to be made. > > > I don't believe that is what I mean. I think what you're saying to implement is, using the second or fist alpha as the mix factor. I'm taking about having the alpha's effect each other in the same way _r_, _g_, and _b_ are.
Member

I missed your use case about quaternions. Longer term I think there are plans for quaternions so in the meantime it is probably better to create node groups for the functions where you need to handle the extra channel of data. Even though RGBA is four channels of data it is conceptually different to WXYZ or XYZW!. Alpha support varies between different areas of Blender.

I missed your use case about quaternions. Longer term I think there are plans for quaternions so in the meantime it is probably better to create node groups for the functions where you need to handle the extra channel of data. Even though RGBA is four channels of data it is conceptually different to WXYZ or XYZW!. Alpha support varies between different areas of Blender.
Iliya Katushenock added
Status
Confirmed
and removed
Status
Needs Info from Developers
labels 2023-06-04 10:11:29 +02:00
Iliya Katushenock changed title from color mix nodes don't effect the alpha to Geometry Nodes: Color mix nodes don't effect the alpha 2023-06-04 10:12:11 +02:00
Author

btw, why is this still open?

btw, why is this still open?
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
4 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#104401
No description provided.