Saving grayscale images involves only red channel data from RGB. #103728

Closed
opened 2023-01-08 07:04:35 +01:00 by Cassidy Graces Incandela · 5 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: AMD Radeon(TM) R5 Graphics ATI Technologies Inc. 4.5.14831 Core Profile Context 21.5.2 27.20.21003.8013

Blender Version
Broken: version: 3.4.1, branch: blender-v3.4-release, commit date: 2022-12-19 17:00, hash: 55485cb379
Worked: (pretty sure this has been the case for a while)

Short description of error
Grayscale (BW) image output mode only takes data from the Red channel from RGB data instead of Value from HSV, omitting other data.

Exact steps for others to reproduce the error

  • Start a new project,
  • Construct three text objects,
  • Arrange their positions to make it more comfortable for you to observe,
  • For each three go to edit mode and write Red, Green, Blue respectively,
  • For each three add a new material with Emission shader for the surfaces, and set color hex code to #FF0000, #00FF00, #0000FF respectively,
  • To the properties area, go to Output Properties > Output, set Color to BW,
  • Render,
  • Open the rendered image in an image editor.

This is only to make it easy to notice the problem. You can use any scene or images and skip to step 6.

If you follow the steps above, you can observe that only the text Red is in the picture.
If you set a little bit of red for the others, e.g., #50FF00 for the Green, that text will be visible in the picture, with lower visibility.

I believe this is not how it is supposed to work, therefore I believe this is a bug. But the solution is probably going to involve additional processing before encoding, therefore it is going to be a bit slower. If that is not affordable, that is understandable, go ahead and close this report.

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: AMD Radeon(TM) R5 Graphics ATI Technologies Inc. 4.5.14831 Core Profile Context 21.5.2 27.20.21003.8013 **Blender Version** Broken: version: 3.4.1, branch: blender-v3.4-release, commit date: 2022-12-19 17:00, hash: 55485cb379 Worked: (pretty sure this has been the case for a while) **Short description of error** Grayscale (BW) image output mode only takes data from the Red channel from RGB data instead of Value from HSV, omitting other data. **Exact steps for others to reproduce the error** - Start a new project, - Construct three text objects, - Arrange their positions to make it more comfortable for you to observe, - For each three go to edit mode and write `Red`, `Green`, `Blue` respectively, - For each three add a new material with Emission shader for the surfaces, and set color hex code to `#FF0000`, `#00FF00`, `#0000FF` respectively, - To the properties area, go to `Output Properties > Output`, set `Color` to `BW`, - Render, - Open the rendered image in an image editor. > This is only to make it easy to notice the problem. You can use any scene or images and skip to step 6. If you follow the steps above, you can observe that only the text `Red` is in the picture. If you set a little bit of red for the others, e.g., `#50FF00` for the `Green`, that text will be visible in the picture, with lower visibility. I believe this is not how it is supposed to work, therefore I believe this is a bug. But the solution is probably going to involve additional processing before encoding, therefore it is going to be a bit slower. If that is not affordable, that is understandable, go ahead and close this report.

Added subscriber: @cassidy

Added subscriber: @cassidy

Here is an example of the problem, and a workaround.
Workaround for this is by replacing the red channel from RGB by value data from HSV, or better yet, using the RGB to BW node to address our retina's various sensitivity to various wavelengths, and using the result to replace the red channel.

Render Layer Separate Color - Value RGB to BW (more accurate)
rgb.png workaround.png workaround-node.png
bw.png bw-workaround.png bw-workaround-node.png

You can see an example of what I mentioned in the task description:

If you set a little bit of red for the others, e.g., #50FF00 for the Green, that text will be visible in the picture, with lower visibility.

There's a little bit of red in the Render Layer, and as a result, the text green can be seen.

Here is an example of the problem, and a workaround. Workaround for this is by replacing the red channel from RGB by value data from HSV, or better yet, using the `RGB to BW` node to address our retina's various sensitivity to various wavelengths, and using the result to replace the red channel. | **Render Layer** | **Separate Color - Value** | **RGB to BW** (more accurate) | | -- | -- | -- | | ![rgb.png](https://archive.blender.org/developer/F14131638/rgb.png) | ![workaround.png](https://archive.blender.org/developer/F14131678/workaround.png) | ![workaround-node.png](https://archive.blender.org/developer/F14131680/workaround-node.png) | | ![bw.png](https://archive.blender.org/developer/F14131641/bw.png) | ![bw-workaround.png](https://archive.blender.org/developer/F14131631/bw-workaround.png) | ![bw-workaround-node.png](https://archive.blender.org/developer/F14131633/bw-workaround-node.png) | You can see an example of what I mentioned in the task description: > If you set a little bit of red for the others, e.g., #50FF00 for the Green, that text will be visible in the picture, with lower visibility. There's a little bit of red in the Render Layer, and as a result, the text `green` can be seen.

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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

This is part of the PNG implementation in Blender: {https://developer.blender.org/diffusion/B/browse/master/source/blender/imbuf/intern/png.c$371-374}

It exists before what we can trace in this channel: {https://developer.blender.org/diffusion/B/browse/master/source/blender/imbuf/intern/png_encode.c;12315f4d0e0ae993805f141f64cb8c73c5297311?follow=first}

Works as designed and is therefore not considered a bug.

So thanks for the report, but the issue reported here is a request for modified/improved behavior and not a bug in current behavior. Closing as this bug tracker is only for bugs and errors.

For user requests and feedback, please use other channels: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests

For more information on why this isn't considered a bug, visit: https://wiki.blender.org/wiki/Reference/Not_a_bug

This is part of the PNG implementation in Blender: {https://developer.blender.org/diffusion/B/browse/master/source/blender/imbuf/intern/png.c$371-374} It exists before what we can trace in this channel: {https://developer.blender.org/diffusion/B/browse/master/source/blender/imbuf/intern/png_encode.c;12315f4d0e0ae993805f141f64cb8c73c5297311?follow=first} Works as designed and is therefore not considered a bug. So thanks for the report, but the issue reported here is a request for modified/improved behavior and not a bug in current behavior. Closing as this bug tracker is only for bugs and errors. For user requests and feedback, please use other channels: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests For more information on why this isn't considered a bug, visit: https://wiki.blender.org/wiki/Reference/Not_a_bug
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
2 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#103728
No description provided.