Nodes: Exclusion (Mix Color) clamps negative values even when Clamp Result is disabled #114242
Labels
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#114242
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows 10 Home
Graphics card: Intel(R) UHD Graphics 605
Blender Version
Broken: since 3.5 when Exclusion was first implemented, (still persists in 4.0 and 4.1 daily builds)
Short description of error
When the blend type of the
Mix Color
node is set toExclusion
, its output clamps all negative values to 0.0 regardless of whetherClamp Result
is toggled or not. This is true for Shader, Geometry, and Compositor versions of the node.Most sources I could find only mention that Exclusion's formula is
'A + B - 2AB'
, and don't explicitly mention clamping for negative numbers. This behavior is also inconsistent with other blend types from the same group (i.e. Subtract, & Divide), which allow for negative values. Difference is an exception as it has an absolute value baked into its formula.Exact steps for others to reproduce the error
Mix Color
set toExclusion
. (Make sure any of the values lie outside of [0-1] so that the output value goes outside of range)An example .blend file is also attached with examples of both.
Example images attached below: (White areas represented negative values that were clamped at 0.0)
I can confirm what was described. But I'm not sure what's really expected.
Exclusion mode was added in
bea5fe6505
by @CharlieJolly@CharlieJolly, could you provide some insight here?
I also noticed that the manual does not include this mode:
https://docs.blender.org/manual/en/4.1/render/shader_nodes/converter/mix.html?utm_source=blender-4.1.0-alpha#bpy-types-shadernodemix
Cc. @brecht, @OmarEmaraDev
This is the intended behavior, but I guess it needs to be documented. This was discussed in details in the PR: https://archive.blender.org/developer/D16543.
Thanks for the info!
For documentation, we have another repository. I think maybe it can be tracked down however at blender/blender-manual#104446 (Cc @Blendify)
Closing then.