color type alpha channel not yet implemented (for attribute mix node) #89795

Closed
opened 2021-07-11 18:03:24 +02:00 by Laureline Amerio · 14 comments

Hello

It seems that the attribute mix node do not mix alpha's properly, for example, when mixing a color with alpha of 1 and color with alpha of 0, no interpolation is done, therefore the result is not accurate (same for every other caclulation method it seems)

Overall the 4th channel of this color vector type is straight out ignored during the calculation and i believe that this attribute mix node did not implemented the color type properly?

On a side note: there's missing RGBA to color and color to RGBA attribute separate node, therefore, for the time being, this 4th channel is impossible to access properly, but i suppose this will be adressed shortly with the new attribute field proposal is implemented?

Here's an example of the issue, tested on latest 3.0 alha build

xxxxjpg.jpg

Hello It seems that the attribute mix node do not mix alpha's properly, for example, when mixing a color with alpha of 1 and color with alpha of 0, no interpolation is done, therefore the result is not accurate (same for every other caclulation method it seems) Overall the 4th channel of this color vector type is straight out ignored during the calculation and i believe that this attribute mix node did not implemented the color type properly? On a side note: there's missing RGBA to color and color to RGBA attribute separate node, therefore, for the time being, this 4th channel is impossible to access properly, but i suppose this will be adressed shortly with the new attribute field proposal is implemented? Here's an example of the issue, tested on latest 3.0 alha build ![xxxxjpg.jpg](https://archive.blender.org/developer/F10220603/xxxxjpg.jpg)

Added subscriber: @mynameisokp

Added subscriber: @mynameisokp
Laureline Amerio changed title from color alpha channel not yet implemented for attribute mix node to color type alpha channel not yet implemented (for attribute mix node) 2021-07-11 18:14:30 +02:00
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Added subscribers: @JacquesLucke, @lichtwerk

Added subscribers: @JacquesLucke, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

Well, I can confirm, it is always using ramp_blend in MA_RAMP_BLEND mode since the introduction in d72ec16e70.

@JacquesLucke : should we be using blend_color_XXX instead? (like we do for CustomDataLayers)? These seem to support similar blend modes (and take alpha into account properly).
If so, I could look into making that change...

Well, I can confirm, it is always using `ramp_blend` in `MA_RAMP_BLEND` mode since the introduction in d72ec16e70. @JacquesLucke : should we be using `blend_color_XXX` instead? (like we do for CustomDataLayers)? These seem to support similar blend modes (and take alpha into account properly). If so, I could look into making that change...
Member

Wonder what shader and compositor nodes are using. Generally, I'm not opposed to using blend_color_xxx, haven't looked into it in detail now.

Wonder what shader and compositor nodes are using. Generally, I'm not opposed to using `blend_color_xxx`, haven't looked into it in detail now.
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

I think the change makes sense. It also means we could refactor the node to avoid the switch statement for the blend type on every single loop iteration. Are you still interested in doing that @lichtwerk? I could do it otherwise.

I think the change makes sense. It also means we could refactor the node to avoid the switch statement for the blend type on every single loop iteration. Are you still interested in doing that @lichtwerk? I could do it otherwise.
Member

Actually, looking at this other set of functions, it seems they also don't do what we want, since they use the alpha value of the second color for mixing instead of a separate float factor.

Actually, looking at this other set of functions, it seems they also don't do what we want, since they use the alpha value of the second color for mixing instead of a separate float factor.
Member

@HooglyBoogly : probably wont have time short-term, so go ahead.

@HooglyBoogly : probably wont have time short-term, so go ahead.

Added subscriber: @BorekBures

Added subscriber: @BorekBures

Until this will be fixed, here is a small workaround. If you keep the alpha separate from the color, you can mix it separately and merge it back into the RGBA color using these nodes.
RGBA.jpg

Until this will be fixed, here is a small workaround. If you keep the alpha separate from the color, you can mix it separately and merge it back into the RGBA color using these nodes. ![RGBA.jpg](https://archive.blender.org/developer/F11820432/RGBA.jpg)
Member

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

Changed status from 'Needs Developer To Reproduce' to: 'Archived'
Member

Will close this because the node used in the original report is deprecated. A new report could be created. I'm not entirely sure how this should be fixed without possibly breaking existing files.

Will close this because the node used in the original report is deprecated. A new report could be created. I'm not entirely sure how this should be fixed without possibly breaking existing files.
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
6 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#89795
No description provided.