Diffuse colour pass displaying some shading. #116917

Closed
opened 2024-01-08 23:16:33 +01:00 by Xen Wildman · 8 comments

System Information
Operating system: Windows 10
Graphics card: 3080

Blender Version
Broken: (4.0.x)
Worked: (3.6.5)

Caused by 2ac0b36e4e

Short description of error
Expected diffuse colour pass to be the raw solid diffuse colour applied to the material but instead displays some shading.

Exact steps for others to reproduce the error

New Blender scene.
Switch to Cycles.
Turn on diffcol pass.
Render.

To make it more obvious, use an image editor to increase contrast and lower the brightness.

Darker image is adjusted to make the issue more obvious.

**System Information** Operating system: Windows 10 Graphics card: 3080 **Blender Version** Broken: (4.0.x) Worked: (3.6.5) Caused by 2ac0b36e4edaee4a99de907b0762b17d540430a9 **Short description of error** Expected diffuse colour pass to be the raw solid diffuse colour applied to the material but instead displays some shading. **Exact steps for others to reproduce the error** New Blender scene. Switch to Cycles. Turn on diffcol pass. Render. To make it more obvious, use an image editor to increase contrast and lower the brightness. Darker image is adjusted to make the issue more obvious.
Xen Wildman added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-01-08 23:16:34 +01:00
Member

Thanks for the report. Can confirm the difference.

Thanks for the report. Can confirm the difference.
Member

Results changed between: 5cdec2f12ab0 - deb4aa88b04a and 0fb4c107db92 - 6e20beba22df

@lichtwerk , can you help in bisecting? 🙂

Prior to 5cdec2f12ab0 deb4aa88b04a - 0fb4c107db92 After 6e20beba22df
image image image
Results changed between: `5cdec2f12ab0 - deb4aa88b04a` and `0fb4c107db92 - 6e20beba22df` @lichtwerk , can you help in bisecting? 🙂 Prior to `5cdec2f12ab0` | `deb4aa88b04a - 0fb4c107db92 ` | After `6e20beba22df` | | -- | -- | -- | | ![image](/attachments/461af54a-b1d2-4ab2-bae4-05344360cfcb) | ![image](/attachments/6760bb7d-5418-4400-bd2c-7b747b763c2e) | ![image](/attachments/f0e65af0-088d-4e1d-a72a-e56969b03141) |
688 KiB
670 KiB
673 KiB
Member

will check/bisect

will check/bisect
Member
Caused by 2ac0b36e4edaee4a99de907b0762b17d540430a9 CC @LukasStockner CC @brecht

@LukasStockner, can you check?

In general we do want mixing and layering to have some effect on the color passes, it's not just the raw color, but I'm not sure if this amount is right.

@LukasStockner, can you check? In general we do want mixing and layering to have some effect on the color passes, it's not just the raw color, but I'm not sure if this amount is right.
Author

Here's a couple more images for context. I use the DiffCol pass to select colours to make adjustments to just that colour. The selection doesn't really work with 4.0.2 DiffCol pass with the same selection tolerance.

Here's a couple more images for context. I use the DiffCol pass to select colours to make adjustments to just that colour. The selection doesn't really work with 4.0.2 DiffCol pass with the same selection tolerance.
Brecht Van Lommel added this to the 4.1 milestone 2024-01-24 20:23:52 +01:00
Lukas Stockner was assigned by Brecht Van Lommel 2024-01-24 20:24:08 +01:00
Member

Hm, this is a tricky one.

On the one hand, the current behavior is expected due to the layering behavior - when viewed from a glancing angle, the specular layer reflects a significant amount of energy, so the Diffuse BSDF is scaled down to compensate. Therefore, its weight is lower, and this goes into the Diffuse Color channel.

I see the argument that this is unexpected, but the question is where to draw the line - for example, if you set the material to be 50% transmissive, should the Diffuse Color channel still be unaffected? If yes, and we only ignore layering: In the classic "Diffuse+Glossy -> Mix Shader with Fresnel input" setup, which also represents layering, the Diffuse Color pass will also be affected.

If we wanted to change this particular behavior in the Principled BSDF, the way to do it would be to not bake the layering weight into the Closure weight, but instead have it as a separate factor in the DiffuseBsdf. Could easily be done, but it's a weird corner case that I'm not really happy with.

Personally, I'm in favor of keeping the current approach. Fact is, the default material is not pure diffuse, so it doesn't make much sense to expect it to have a perfectly flat Diffuse Color channel. If you actually set a Diffuse BSDF on the object, you'll get the expected output. If you want an auxiliary channel for easy color picking, that's what AOVs and Cryptomatte are for.

Hm, this is a tricky one. On the one hand, the current behavior is expected due to the layering behavior - when viewed from a glancing angle, the specular layer reflects a significant amount of energy, so the Diffuse BSDF is scaled down to compensate. Therefore, its weight is lower, and this goes into the Diffuse Color channel. I see the argument that this is unexpected, but the question is where to draw the line - for example, if you set the material to be 50% transmissive, should the Diffuse Color channel still be unaffected? If yes, and we only ignore layering: In the classic "Diffuse+Glossy -> Mix Shader with Fresnel input" setup, which also represents layering, the Diffuse Color pass will also be affected. If we wanted to change this particular behavior in the Principled BSDF, the way to do it would be to not bake the layering weight into the Closure weight, but instead have it as a separate factor in the `DiffuseBsdf`. Could easily be done, but it's a weird corner case that I'm not really happy with. Personally, I'm in favor of keeping the current approach. Fact is, the default material is **not** pure diffuse, so it doesn't make much sense to expect it to have a perfectly flat Diffuse Color channel. If you actually set a Diffuse BSDF on the object, you'll get the expected output. If you want an auxiliary channel for easy color picking, that's what AOVs and Cryptomatte are for.

I can see the argument for keeping the current approach, let's not consider this a bug for now.

This also relates to baking, where we usually want to bake the input parameters. We have a design for making that work but no time yet to implement it.

I can see the argument for keeping the current approach, let's not consider this a bug for now. This also relates to baking, where we usually want to bake the input parameters. We have a design for making that work but no time yet to implement it.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-02-05 12:38:58 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
Asset Browser Project
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
5 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#116917
No description provided.