Camera Background image is appearing greyish in 3D Viewport #99507

Open
opened 2022-07-07 02:50:48 +02:00 by Rakesh Dey · 25 comments

System Information
Operating system: Windows 10
Graphics card: Nvidia GTX 1080Ti

Blender Version 3.2.1
Broken: version: 3.2.1, branch: master, commit date: 2022-07-05 15:44, hash: a2d59b2dac
Worked:

Short description of error
Camera Background image is appearing greyish in deep black area in 3D Viewport but showing completely normal in Image editor section and renders.
Even after turning on "View as Render", problem is still there.

Exact steps for others to reproduce the error
Open the attached blend file.Blender BG Bug Report.blend

**System Information** Operating system: Windows 10 Graphics card: Nvidia GTX 1080Ti **Blender Version** 3.2.1 Broken: version: 3.2.1, branch: master, commit date: 2022-07-05 15:44, hash: a2d59b2dac9e Worked: **Short description of error** Camera Background image is appearing greyish in deep black area in 3D Viewport but showing completely normal in Image editor section and renders. Even after turning on "View as Render", problem is still there. **Exact steps for others to reproduce the error** Open the attached blend file.[Blender BG Bug Report.blend](https://archive.blender.org/developer/F13265208/Blender_BG_Bug_Report.blend)
Author

Added subscriber: @RakeshDey

Added subscriber: @RakeshDey
Author
Here's a long post I wrote on reddit on it - https://www.reddit.com/r/blender/comments/vs0e6n/why_is_the_camera_background_image_appearing
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Thanks for the report. Enabling View as render may solve the issue. Can you try it?

(I'm not sure about the use cases of this option)

Thanks for the report. Enabling [View as render ](https://docs.blender.org/manual/en/3.2/editors/image/image_settings.html#bpy-types-image-use-view-as-render) may solve the issue. Can you try it? (I'm not sure about the use cases of this option)
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

Could be the same as #98024.

Could be the same as #98024.
Member

@OmarEmaraDev, feel free to merge if you think so or just change to need info from user until Rakesh's confirmation

@OmarEmaraDev, feel free to merge if you think so or just change to `need info from user` until Rakesh's confirmation
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

@PratikPB2123 Not sure yet if it is the same, but it links to the commits/tasks explaining the rational behind the View As Render option, so I thought I would link it. I will change to need info for now.

@PratikPB2123 Not sure yet if it is the same, but it links to the commits/tasks explaining the rational behind the View As Render option, so I thought I would link it. I will change to need info for now.
Author

In #99507#1386728, @PratikPB2123 wrote:
Thanks for the report. Enabling View as render may solve the issue. Can you try it?

(I'm not sure about the use cases of this option)

Yes I enabled it. Still having same issue. I also updated the description and the attached file with this option turned on.

> In #99507#1386728, @PratikPB2123 wrote: > Thanks for the report. Enabling [View as render ](https://docs.blender.org/manual/en/3.2/editors/image/image_settings.html#bpy-types-image-use-view-as-render) may solve the issue. Can you try it? > > (I'm not sure about the use cases of this option) Yes I enabled it. Still having same issue. I also updated the description and the attached file with this option turned on.
Member

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'
Member

I can confirm the difference. It seems the two values before color management are 0.00281 and 0.00273. And as far as I can tell, this is due to the use of different texture types, one uses R16G16B16A16_FLOAT and the other uses R8G8B8A8_SRGB. I am not sure what that entails exactly, so will wait for information from developers.

I can confirm the difference. It seems the two values before color management are `0.00281` and `0.00273`. And as far as I can tell, this is due to the use of different texture types, one uses `R16G16B16A16_FLOAT` and the other uses `R8G8B8A8_SRGB`. I am not sure what that entails exactly, so will wait for information from developers.
Author

In #99507#1386893, @OmarEmaraDev wrote:
I can confirm the difference. It seems the two values before color management are 0.00281 and 0.00273. And as far as I can tell, this is due to the use of different texture types, one uses R16G16B16A16_FLOAT and the other uses R8G8B8A8_SRGB. I am not sure what that entails exactly, so will wait for information from developers.

Nope. Different bit depth isn't the reason here. I have update the attached blend file with 8bit jpg. The bug is still there.

> In #99507#1386893, @OmarEmaraDev wrote: > I can confirm the difference. It seems the two values before color management are `0.00281` and `0.00273`. And as far as I can tell, this is due to the use of different texture types, one uses `R16G16B16A16_FLOAT` and the other uses `R8G8B8A8_SRGB`. I am not sure what that entails exactly, so will wait for information from developers. Nope. Different bit depth isn't the reason here. I have update the attached blend file with 8bit jpg. The bug is still there.
Member

I was talking about the GPU textures used internally by Blender, not the images themselves. And the difference is not only in bit-depth, it is also in the fact that one uses sRGB storage.

I was talking about the GPU textures used internally by Blender, not the images themselves. And the difference is not only in bit-depth, it is also in the fact that one uses sRGB storage.
Author

In #99507#1386940, @OmarEmaraDev wrote:
I was talking about the GPU textures used internally by Blender, not the images themselves. And the difference is not only in bit-depth, it is also in the fact that one uses sRGB storage.

Oh I didn't think about it that deeply. Anyways let's wait for more info from developers.

> In #99507#1386940, @OmarEmaraDev wrote: > I was talking about the GPU textures used internally by Blender, not the images themselves. And the difference is not only in bit-depth, it is also in the fact that one uses sRGB storage. Oh I didn't think about it that deeply. Anyways let's wait for more info from developers.

Added subscribers: @fclem, @Sergey, @ideasman42

Added subscribers: @fclem, @Sergey, @ideasman42

As far as I can see the 3D viewport and the image display use slightly different color management transforms.

Even if this isn't technically a bug, it should be straightforward to have them match - looking into this I wasn't able to make them match.

@fclem / @Sergey - are you aware of this issue or possible solutions?

As far as I can see the 3D viewport and the image display use slightly different color management transforms. Even if this isn't technically a bug, it should be straightforward to have them match - looking into this I wasn't able to make them match. @fclem / @Sergey - are you aware of this issue or possible solutions?

This isn't my area, so can not comment from the code perspective.

To me it seems that there is a bug somewhere in the viewport. The view transform is Standard, the Look is None, gamma and exposure are default. Toggling "View as Render" should not make image look different. This is the behavior in the Image Editor, but not in the viewport. I do not know where the extra gamma correction is coming from there.

This isn't my area, so can not comment from the code perspective. To me it seems that there is a bug somewhere in the viewport. The view transform is Standard, the Look is None, gamma and exposure are default. Toggling "View as Render" should not make image look different. This is the behavior in the Image Editor, but not in the viewport. I do not know where the extra gamma correction is coming from there.

I can't see the difference by just looking at it. Maybe the difference is due to the way the sRGB render target differs for each implementation, but I highly doubt.

Screenshot from 2022-07-08 12-11-55.png
Top: viewpor
Bottom: image editor

I can't see the difference by just looking at it. Maybe the difference is due to the way the sRGB render target differs for each implementation, but I highly doubt. ![Screenshot from 2022-07-08 12-11-55.png](https://archive.blender.org/developer/F13271342/Screenshot_from_2022-07-08_12-11-55.png) Top: viewpor Bottom: image editor
Member

In #99507#1386893, @OmarEmaraDev wrote:
I can confirm the difference. It seems the two values before color management are 0.00281 and 0.00273. And as far as I can tell, this is due to the use of different texture types, one uses R16G16B16A16_FLOAT and the other uses R8G8B8A8_SRGB. I am not sure what that entails exactly, so will wait for information from developers.

@fclem Could it be explained through that?

> In #99507#1386893, @OmarEmaraDev wrote: > I can confirm the difference. It seems the two values before color management are `0.00281` and `0.00273`. And as far as I can tell, this is due to the use of different texture types, one uses `R16G16B16A16_FLOAT` and the other uses `R8G8B8A8_SRGB`. I am not sure what that entails exactly, so will wait for information from developers. @fclem Could it be explained through that?

@OmarEmaraDev The source image should be the same GPUTexture to my knowledge. But yes, the camera Background is rendered to a R8G8B8A8_SRGB framebuffer and the Image Editor image to a R16G16B16A16_FLOAT buffer before display transform is applied. This intermediate step might result in this imprecision which is really low. I'm guessing that this is visible on good HDR screens but here the difference is not noticeable.

@OmarEmaraDev The source image should be the same GPUTexture to my knowledge. But yes, the camera Background is rendered to a `R8G8B8A8_SRGB` framebuffer and the Image Editor image to a `R16G16B16A16_FLOAT` buffer before display transform is applied. This intermediate step might result in this imprecision which is really low. I'm guessing that this is visible on good HDR screens but here the difference is not noticeable.
Author

In #99507#1387809, @fclem wrote:
@OmarEmaraDev The source image should be the same GPUTexture to my knowledge. But yes, the camera Background is rendered to a R8G8B8A8_SRGB framebuffer and the Image Editor image to a R16G16B16A16_FLOAT buffer before display transform is applied. This intermediate step might result in this imprecision which is really low. I'm guessing that this is visible on good HDR screens but here the difference is not noticeable.

It is visible in both my pro hdr monitor and a cheap sRGB 99% colour accurate monitor. Even though the difference is tiny still it catches my eye every time I use Gradient background images and it looks bad while previewing darker objects in front of it.

> In #99507#1387809, @fclem wrote: > @OmarEmaraDev The source image should be the same GPUTexture to my knowledge. But yes, the camera Background is rendered to a `R8G8B8A8_SRGB` framebuffer and the Image Editor image to a `R16G16B16A16_FLOAT` buffer before display transform is applied. This intermediate step might result in this imprecision which is really low. I'm guessing that this is visible on good HDR screens but here the difference is not noticeable. It is visible in both my pro hdr monitor and a cheap sRGB 99% colour accurate monitor. Even though the difference is tiny still it catches my eye every time I use Gradient background images and it looks bad while previewing darker objects in front of it.

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker

I can clearly see the difference on my MacBook Pro M1.
Capture d’écran 2022-07-09 à 15.10.32.png

And I can see it changing when updating the 3D view (can playback animation to see the effect). And it does not appear in material preview shading mode. So I am guessing this has to do with Workbench TAA not accumulating to exact opacity level. EEVEE also had this issue and I had to add a special case if alpha was near 1.0 to round it to 1.0.

@Jeroen-Bakker Could you take over this?

I can clearly see the difference on my MacBook Pro `M1`. ![Capture d’écran 2022-07-09 à 15.10.32.png](https://archive.blender.org/developer/F13279310/Capture_d_e_cran_2022-07-09_a__15.10.32.png) And I can see it changing when updating the 3D view (can playback animation to see the effect). And it does not appear in material preview shading mode. So I am guessing this has to do with Workbench TAA not accumulating to exact opacity level. EEVEE also had this issue and I had to add a special case if alpha was near 1.0 to round it to 1.0. @Jeroen-Bakker Could you take over this?

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
Jeroen Bakker self-assigned this 2022-07-10 10:22:01 +02:00
Philipp Oeser removed the
Interest
EEVEE & Viewport
label 2023-02-09 15:12:30 +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
6 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#99507
No description provided.