Regression: some Alpha Representation types of some images in Cycles appears to only unmultiple, and not re-multiple #102942

Closed
opened 2022-12-04 16:43:05 +01:00 by filip mond · 12 comments

System Information
Operating system: tested on macOS-10.13.6-x86_64-i386-64bit, macOS-13.0.1-arm64-arm-64bit and Windows-10-10.0.22621-SP0
Graphics card: ATI Radeon HD 5750 OpenGL Engine ATI-1.68.25; Apple M1 Pro Metal - 83; NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 NVIDIA 516.94

Blender Version
Broken: 3.3.1, branch: master, commit date: 2022-10-04 18:35, hash: b292cfe5a9
Worked: 3.2.2

Short description of error
Some Alpha images (Like the ones generated by Photoshop) in Cycles Shader editor displays Alpha, Straight and Premultiplied with the same issue.

#102942 3.2.2.png #102942 3.3.1.png
image.png

Exact steps for others to reproduce the error

Sample file 2:
#102942 3.2.2.blend
ExampleAlpha_v02.psd

**System Information** Operating system: tested on `macOS-10.13.6-x86_64-i386-64bit`, `macOS-13.0.1-arm64-arm-64bit` and `Windows-10-10.0.22621-SP0` Graphics card: `ATI Radeon HD 5750 OpenGL Engine ATI-1.68.25`; `Apple M1 Pro Metal - 83`; `NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 NVIDIA 516.94` **Blender Version** Broken: 3.3.1, branch: master, commit date: 2022-10-04 18:35, hash: `b292cfe5a9` Worked: 3.2.2 **Short description of error** Some Alpha images (Like the ones generated by Photoshop) in **Cycles Shader** editor displays Alpha, *Straight* and *Premultiplied* with the same issue. |![#102942 3.2.2.png](https://archive.blender.org/developer/F13994930/T102942_3.2.2.png)|![#102942 3.3.1.png](https://archive.blender.org/developer/F13994931/T102942_3.3.1.png) | -- | -- | ![image.png](https://archive.blender.org/developer/F14073827/image.png) **Exact steps for others to reproduce the error** - Open one the following files in 3.2.2 and 3.3.0 or later. Sample file 1 (simpler): [cycles_alpha__bug.blend](https://archive.blender.org/developer/F14073844/cycles_alpha__bug.blend) Sample file 2: [#102942 3.2.2.blend](https://archive.blender.org/developer/F13994937/T102942_3.2.2.blend) ![ExampleAlpha_v02.psd](https://archive.blender.org/developer/F13992423/ExampleAlpha_v02.psd)
Author

Added subscriber: @FilipMond

Added subscriber: @FilipMond

#103289 was marked as duplicate of this issue

#103289 was marked as duplicate of this issue
filip mond changed title from PSD Alpha ignored as Straight to PSD Alpha ... 2022-12-04 22:40:41 +01:00
Member

Added subscriber: @EAW

Added subscriber: @EAW
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Thank you for the report, and thank you for adding additional information to try and clarify.

I will have to eliminate some of this report to focus it on the Cycles material issue, but I have attempted to answer your other points below.

I don't think this is specific to PSDs, but part of a previously reported bug. The compositor having bright edges might have the same cause as #102484 (PNG 8bit and 16bit loads differently in compositor), which would mean that the Compositor Input Node doesn't do any Straight to Associated (premultipied) conversion for any loaded from disk 8 bit per channel images, and not just pngs.

Material Cycles- Here we don't have such nodes (like in Compositor). Also semitransparent pixels here appear extensively bright.
Same for Alpha Straight or Premultiply.

In Cycles, whenever the alpha channel of the Image texture node is connected to another node, the image in unpremultiplied, so that the colors are correct when the alpha is then remultiplied back into the colors in the mixing with the transparent BSDF.

See D4807#110723 and D4807#110765

It appears that the re-multiplying isn't occurring as it was in 3.2.2.

Material - What fixed the issue here was set Alpha > Channel Packed, that is weird for me, since I understood it was designed for different purpose.

An fortunate (because it at least gives you a workaround) side effect of 3b23b5c638 I believe. Setting the Alpha Channel to Channel Packed prevents Cycles from un-premultiplying the color channels.

Another issue (probably for a new report if not reported already) is lack of refreshing Render display mode in viewport. To get viewport refreshed after Alpha type change I have to switch display modes. I'm mentioning it here just to let you know, that what you see is not what it is :)

This issue I could not repeat, the viewport updated for me whenever I changed the alpha type, both in 3.3.0 and 3.5.0 alpha.

Thank you for the report, and thank you for adding additional information to try and clarify. I will have to eliminate some of this report to focus it on the Cycles material issue, but I have attempted to answer your other points below. I don't think this is specific to PSDs, but part of a previously reported bug. The compositor having bright edges might have the same cause as #102484 (PNG 8bit and 16bit loads differently in compositor), which would mean that the Compositor Input Node doesn't do any Straight to Associated (premultipied) conversion for any loaded from disk 8 bit per channel images, and not just pngs. >Material Cycles- Here we don't have such nodes (like in Compositor). Also semitransparent pixels here appear extensively bright. >Same for Alpha Straight or Premultiply. In Cycles, whenever the alpha channel of the Image texture node is connected to another node, the image in unpremultiplied, so that the colors are correct when the alpha is then remultiplied back into the colors in the mixing with the transparent BSDF. See [D4807](https://archive.blender.org/developer/D4807)#110723 and [D4807](https://archive.blender.org/developer/D4807)#110765 It appears that the re-multiplying isn't occurring as it was in 3.2.2. >Material - What fixed the issue here was set Alpha > Channel Packed, that is weird for me, since I understood it was designed for different purpose. An fortunate (because it at least gives you a workaround) side effect of 3b23b5c638 I believe. Setting the Alpha Channel to Channel Packed prevents Cycles from un-premultiplying the color channels. >Another issue (probably for a new report if not reported already) is lack of refreshing Render display mode in viewport. To get viewport refreshed after Alpha type change I have to switch display modes. I'm mentioning it here just to let you know, that what you see is not what it is :) This issue I could not repeat, the viewport updated for me whenever I changed the alpha type, both in 3.3.0 and 3.5.0 alpha.
Evan Wilson changed title from PSD Alpha ... to PSD Image with Alpha in Cycles shader editor appears to only unmultiple, and not re-multiple like in 3.2.2 2022-12-05 06:17:53 +01:00
Member

This reminds me of #99565 (Discrepancy in Cycles rendering result appears when "Pack Resources" on tga file) and #101810 (Cycles produces glowing artifacts around the alpha clipped area of the texture).

This reminds me of #99565 (Discrepancy in Cycles rendering result appears when "Pack Resources" on tga file) and #101810 (Cycles produces glowing artifacts around the alpha clipped area of the texture).
Author

@EAW Thanks for taking time to give me more insight into it :) Reading Brecht's notes sounds like a nightmare ...
Ad to Refreshing lag I will test it on another machine later.

@EAW Thanks for taking time to give me more insight into it :) Reading Brecht's notes sounds like a nightmare ... Ad to Refreshing lag I will test it on another machine later.
Germano Cavalcante changed title from PSD Image with Alpha in Cycles shader editor appears to only unmultiple, and not re-multiple like in 3.2.2 to Regression: some Alpha Representation types of some images in Cycles appears to only unmultiple, and not re-multiple 2022-12-19 20:15:13 +01:00

Added subscriber: @Alaska

Added subscriber: @Alaska

This issue was referenced by 3029bd2b0c

This issue was referenced by 3029bd2b0cd15cc5d08cf7d8f8fd492879b8438b

This issue was referenced by b314d92e7d

This issue was referenced by b314d92e7dbeefee5edd6e65d90e560b215fd992

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2023-01-09 19:05:35 +01:00
Upstream patch: https://github.com/OpenImageIO/oiio/pull/3750
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
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#102942
No description provided.