Eevee/Workbench: Single channel byte textures mangles pixels in viewport #114414

Closed
opened 2023-11-02 16:48:24 +01:00 by Simon Thommes · 6 comments
Member

System Information
Operating system: Linux-6.5.7-gentoo-x86_64-AMD_Ryzen_9_5950X_16-Core_Processor-with-glibc2.37 64 Bits, X11 UI
Graphics card: NVIDIA RTX A6000/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 535.113.01

Blender Version
Broken: version: 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-10-30 23:38, hash: b27ff093caa0
Broken: version: 3.6.5
Worked: version: 3.5.1

Short description of error
image

Exact steps for others to reproduce the error
Extracted from the cube diorama demo file:
eevee_linear_rec709.blend

**System Information** Operating system: Linux-6.5.7-gentoo-x86_64-AMD_Ryzen_9_5950X_16-Core_Processor-with-glibc2.37 64 Bits, X11 UI Graphics card: NVIDIA RTX A6000/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 535.113.01 **Blender Version** Broken: version: 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-10-30 23:38, hash: `b27ff093caa0` Broken: version: 3.6.5 Worked: version: 3.5.1 **Short description of error** ![image](/attachments/ec759724-bb28-4963-bb21-7a2f7da45cc9) **Exact steps for others to reproduce the error** Extracted from the cube diorama demo file: [eevee_linear_rec709.blend](/attachments/a82c016f-b2b3-4356-ab31-73f8630339ae)
Simon Thommes added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-11-02 16:48:24 +01:00
Iliya Katushenock added the
Interest
EEVEE & Viewport
Interest
Images & Movies
labels 2023-11-02 18:27:11 +01:00
Jeroen Bakker added this to the 4.0 milestone 2023-11-02 19:29:01 +01:00
Jeroen Bakker self-assigned this 2023-11-02 19:29:10 +01:00
Member

Assigning to me to check what the issue is, what is expected (what shows 3.6).
Some parts that might be different is that 4.0 has a new OCIO configuration.

Assigning to me to check what the issue is, what is expected (what shows 3.6). Some parts that might be different is that 4.0 has a new OCIO configuration.

Thanks for the report, @SimonThommes. I can confirm.

The issue is not only seen in EEVEE, Workbench also has the same problem. It only seems to work well on Cycles.

If I'm not mistaken, the Linear Rec.709 color space was introduced in 6923f7a153, so is this something for @Eary or @Sergey take a look?


EDIT:
I didn't see the comment from @Jeroen-Bakker

Thanks for the report, @SimonThommes. I can confirm. The issue is not only seen in EEVEE, Workbench also has the same problem. It only seems to work well on Cycles. If I'm not mistaken, the Linear Rec.709 color space was introduced in 6923f7a153, so is this something for @Eary or @Sergey take a look? --- EDIT: I didn't see the comment from @Jeroen-Bakker
Contributor

Some parts that might be different is that 4.0 has a new OCIO configuration.

If I'm not mistaken, the Linear Rec.709 color space was introduced in 6923f7a153, so is this something for @Eary or @Sergey take a look?

Just copied and pasted 3.6's config to 4.1 and it produces the same behavior:
image

And tried opening this file with 3.6:
image

Confirmed this has nothing to do with specific config.

It's more of a "when you set the source colorspace to be the scene_linear role space" in general. Since 3.6 config also features a scene_linear role space, this is not unique to 4.0/4.1, and is also the case in 3.6.

> Some parts that might be different is that 4.0 has a new OCIO configuration. > If I'm not mistaken, the Linear Rec.709 color space was introduced in 6923f7a153, so is this something for @Eary or @Sergey take a look? Just copied and pasted 3.6's config to 4.1 and it produces the same behavior: ![image](/attachments/3efae4ab-2d0b-4a35-9c4e-21cf425d00be) And tried opening this file with 3.6: ![image](/attachments/9e0d9db8-619c-48fd-a935-cb1330214fc3) Confirmed this has nothing to do with specific config. It's more of a "when you set the source colorspace to be the scene_linear role space" in general. Since 3.6 config also features a `scene_linear` role space, this is not unique to 4.0/4.1, and is also the case in 3.6.
731 KiB
938 KiB
Contributor

Also worth noting that the problem doesn't appear anymore if you save a JPG and re-import again:
image

EDIT:
OK, figured out that I saved an RGB three channel jpg, therefore don't have the issue anymore. Saving BW single JPG does still cause the issue.

Also worth noting that the problem doesn't appear anymore if you save a JPG and re-import again: ![image](/attachments/16e48a0f-3e34-4154-912f-3816bd9538de) EDIT: OK, figured out that I saved an RGB three channel jpg, therefore don't have the issue anymore. Saving BW single JPG does still cause the issue.
Member

Issue is related to how the GPU texture is created for this type of image. (R8_UNORM) this is a CPU side issue inside the blender kernel (BKE_image_gpu.*) Issue is also present in Blender 3.6 so I expect it to be introduced when making OIIO as default reader. Blender 3.5 displays the image correctly.

Internally JPEGs are stored in an 4 channel image buffer, but the number of planes are still for a single channel (8). The GPU texture creates a single channel image, but loads 4 channel image data. Storing JPEGs in a 4 channel image buffer was done even before Blender 2.8, but apparently the bitplanes are not correct anymore.

Issue is related to how the GPU texture is created for this type of image. (R8_UNORM) this is a CPU side issue inside the blender kernel (BKE_image_gpu.*) Issue is also present in Blender 3.6 so I expect it to be introduced when making OIIO as default reader. Blender 3.5 displays the image correctly. Internally JPEGs are stored in an 4 channel image buffer, but the number of planes are still for a single channel (8). The GPU texture creates a single channel image, but loads 4 channel image data. Storing JPEGs in a 4 channel image buffer was done even before Blender 2.8, but apparently the bitplanes are not correct anymore.
Jeroen Bakker changed title from Eevee: Linear Rec.709 mangles pixels of single channel texture to Eevee/Workbench: Single channel byte textures mangles pixels in viewport 2023-11-03 08:05:38 +01:00
Member

Will raise priority quoting @fclem from chat : "We just found #114414 that seems quite bad"

Will raise priority quoting @fclem from chat : "We just found https://projects.blender.org/blender/blender/issues/114414 that seems quite bad"
Philipp Oeser added
Priority
High
and removed
Priority
Normal
labels 2023-11-03 08:58:56 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-11-03 13:54:23 +01: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
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#114414
No description provided.