Mix node has non-linear behavior in the compositor #120713

Closed
opened 2024-04-16 19:10:32 +02:00 by kursad k · 5 comments
Member

System Information
Operating system: Win 11
Graphics card: RRTX 2070

Blender Version
Broken: f789619e65

Short description of error
The mix node especially the multiply operation shows some non-linear behavior in the compositor, the real affect start being evident after getting closer to 1.0, definitely not it is not linear mixing.

image

Look at the difference between 0.25 all the way to 0.75 (the difference is barely visible) v 0.75 to 0.9 and 0.9 to 1.0

0.25
1374aa4cdcc1eb41abc7268ea4df4dff3d1d1108_2_807x750

0.50
6a13ffda4b3da78bcd18757427e4b5236ff3ec2e_2_733x750

0.75
be1fbe6fda162deeb95a9052c16442d6be0004d6_2_684x750

0.9
0e63e6c031b972dcb5946e3c89dbe7a449676ce4_2_723x750

1.0
77a024df94733547dc861835ef678898e3b25378_2_756x750

Exact steps for others to reproduce the error
Load the attached .blend
Play with the mixing values, color profiles etc

**System Information** Operating system: Win 11 Graphics card: RRTX 2070 **Blender Version** Broken: f789619e654b **Short description of error** The mix node especially the multiply operation shows some non-linear behavior in the compositor, the real affect start being evident after getting closer to 1.0, definitely not it is not linear mixing. ![image](/attachments/e204b305-d65a-4045-9527-15e7bff7c815) Look at the difference between 0.25 all the way to 0.75 (the difference is barely visible) v 0.75 to 0.9 and 0.9 to 1.0 0.25 ![1374aa4cdcc1eb41abc7268ea4df4dff3d1d1108_2_807x750](/attachments/73347a80-ad0b-4857-80af-6037012c0356) 0.50 ![6a13ffda4b3da78bcd18757427e4b5236ff3ec2e_2_733x750](/attachments/1bc7a342-793a-423f-9ecc-df3aaf909fe7) 0.75 ![be1fbe6fda162deeb95a9052c16442d6be0004d6_2_684x750](/attachments/a980d112-ad39-4783-a4bb-4802b47f90d7) 0.9 ![0e63e6c031b972dcb5946e3c89dbe7a449676ce4_2_723x750](/attachments/33c005f3-7cca-4ac4-ac5f-e1db43191a2d) 1.0 ![77a024df94733547dc861835ef678898e3b25378_2_756x750](/attachments/bb2e01f7-eb7d-474a-a91d-6f5c522bea30) **Exact steps for others to reproduce the error** Load the attached .blend Play with the mixing values, color profiles etc
kursad k added the
Type
Report
Priority
Normal
Status
Needs Triage
labels 2024-04-16 19:10:33 +02:00
kursad k changed title from Mix node has noin linear behavior in the compositor to Mix node has non-linear behavior in the compositor 2024-04-16 19:11:39 +02:00
Iliya Katushenock added the
Interest
Compositing
Interest
VFX & Video
labels 2024-04-16 19:23:57 +02:00
Contributor

Isn't this because the math is being done in a linear-light space? Unlike perceptual color spaces like sRGB where intensity is linear with perceived intensity, linear-light spaces have intensity linear with the physical amount of light, which perceptually makes them have way too much white.

It's the same reason a Color Ramp between black and white looks non-linear.

gradient.png

Isn't this because the math is being done in a linear-light space? Unlike perceptual color spaces like sRGB where intensity is linear with perceived intensity, linear-light spaces have intensity linear with the physical amount of light, which perceptually makes them have way too much white. It's the same reason a Color Ramp between black and white looks non-linear. ![gradient.png](/attachments/4641386d-43df-4a9d-88ac-83842a3f7bb1)
Author
Member

@scurest Sure, but the intended effect is not there and makes it hard to control the mixing. The user should feel like the mixing is "linear" and it feels like the actual mixing starts near to the end.

@scurest Sure, but the intended effect is not there and makes it hard to control the mixing. The user should feel like the mixing is "linear" and it feels like the actual mixing starts near to the end.
Contributor

Okay, but literally all of Blender works this way, from every single color math node, to color pickers, to vertex painting...

Okay, but literally all of Blender works this way, from every single color math node, to color pickers, to vertex painting...
Author
Member

Sure, I am not saying that is wrong, but it would be nice if the mixing has an option to make the mixing feel more linear when the view transform is set to non-raw. The other option is to make sure everything is linear/raw color space and use raw view transform.

Sure, I am not saying that is wrong, but it would be nice if the mixing has an option to make the mixing feel more linear when the view transform is set to non-raw. The other option is to make sure everything is linear/raw color space and use raw view transform.
Member

@kursadk I believe blender assumes the whole process happens in linear values and only when outputting final image it is then converted to whatever output color space. So As a way to get around it, you could add two math nodes one before and one after the mixing operation and give it a power of about 2.2, so it's closer to the non-linear blending you've used to.

Closing this for now since it's not really a bug with blender. If you'd like to make a feature request, you can check out RightClickSelect. Thanks!

@kursadk I believe blender assumes the whole process happens in linear values and only when outputting final image it is then converted to whatever output color space. So As a way to get around it, you could add two math nodes one before and one after the mixing operation and give it a power of about 2.2, so it's closer to the non-linear blending you've used to. Closing this for now since it's not really a bug with blender. If you'd like to make a feature request, you can check out RightClickSelect. Thanks!
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2024-04-17 11:00:30 +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
3 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#120713
No description provided.