Regression: EEVEE Color banding in viewport image render #113266

Closed
opened 2023-10-05 00:33:30 +02:00 by Alex Mehler · 15 comments

System Information
Operating system: win11
Graphics card: rtx3060

Blender Version
any newer version 4.0 /4.1
Worked: 3.6

Short description of error
When rendering with viewport rendering, the output has heavy banding. Must be some conversion error, as you can see the screenshot of the viewport looks just fine, as do the textures in every other programs.

this problem persists , no matter if viewport compositing is enabled or not.
the whole image looks like a bad gif with reduced colors.

Step to Reproduce

  • Open attached file
  • Switch to viewport render
  • View -> Viewport Render Image

banding_demo.blend

viewport - looks fine viewport render - banding
grafik grafik
Original report Viewport screenshot - looks absolutely fine ![grafik](/attachments/ee9c7ae8-d7cd-4977-a36e-1b06d1daf730)

normal render - looks absolutely fine
grafik

viewport render - heavy banding in dark areas and bigger gradients
grafik

close up of reduced color palette and banding:
grafik

**System Information** Operating system: win11 Graphics card: rtx3060 **Blender Version** any newer version 4.0 /4.1 Worked: 3.6 **Short description of error** When rendering with viewport rendering, the output has heavy banding. Must be some conversion error, as you can see the screenshot of the viewport looks just fine, as do the textures in every other programs. this problem persists , no matter if viewport compositing is enabled or not. the whole image looks like a bad gif with reduced colors. **Step to Reproduce** - Open attached file - Switch to viewport render - `View -> Viewport Render Image` [banding_demo.blend](https://projects.blender.org/attachments/674542f2-1741-45e8-9be9-cd06db858b25) | viewport - looks fine | viewport render - banding | | -- | -- | | ![grafik](/attachments/885a022f-9f1b-402c-be64-c5a3c92ad91c) | ![grafik](/attachments/919c97cf-76b5-43b0-ad16-26f4e1510e3b) | <details> <summary> Original report </summary> Viewport screenshot - looks absolutely fine ![grafik](/attachments/ee9c7ae8-d7cd-4977-a36e-1b06d1daf730) normal render - looks absolutely fine ![grafik](/attachments/2b29dfc4-bdee-4a93-a37e-31ae2c637f5c) viewport render - heavy banding in dark areas and bigger gradients ![grafik](/attachments/1e160cc6-e345-4bd5-a60b-e584b5acec2a) close up of reduced color palette and banding: ![grafik](/attachments/05a2c786-9594-4d03-8d50-15e5de02433a) </details>
Alex Mehler added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-10-05 00:33:31 +02:00
Member

Hi, thanks for the report. Any improvement in result after changing sampling count, color depth, file output format, etc.?
Color banding in dark areas might be expected in some cases when displaying images on digital display.

Hi, thanks for the report. Any improvement in result after changing sampling count, color depth, file output format, etc.? Color banding in dark areas might be expected in some cases when displaying images on digital display.
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-10-05 05:37:56 +02:00
Member

Maybe related #104298?

Maybe related #104298?
Author

Hi, thanks for the report. Any improvement in result after changing sampling count, color depth, file output format, etc.?
Color banding in dark areas might be expected in some cases when displaying images on digital display.

no , doesnt change anything .. the problem seems to be in the calculation , a value must be too high or too low. as you can see just screenshotting the viewport has perfectly nice colors and good looking gradients .. its just when blender grabs the viewport that this happens in the conversion.

here i blew out the gamma and made a close up so that its easier to see, its not just in the dark areas but everywhere there are color bandings

viewport screenshot - looks fine

grafik

viewport render - looks wrong

grafik

edit: same thing happens with normal geometry without any textures:

viewport screenshot -looks fine

grafik

viewport render - banding

grafik

> Hi, thanks for the report. Any improvement in result after changing sampling count, color depth, file output format, etc.? > Color banding in dark areas might be expected in some cases when displaying images on digital display. no , doesnt change anything .. the problem seems to be in the calculation , a value must be too high or too low. as you can see just screenshotting the viewport has perfectly nice colors and good looking gradients .. its just when blender grabs the viewport that this happens in the conversion. here i blew out the gamma and made a close up so that its easier to see, its not just in the dark areas but everywhere there are color bandings viewport screenshot - looks fine ![grafik](/attachments/91bdd5c6-2ae8-47dc-af33-41f44e31b450) viewport render - looks wrong ![grafik](/attachments/9bd0b7a2-2199-445f-80e5-e78c13ef9bb1) edit: same thing happens with normal geometry without any textures: viewport screenshot -looks fine ![grafik](/attachments/9e9de944-b94b-4c3f-84cd-7cd73c30c19f) viewport render - banding ![grafik](/attachments/f2a17a84-1e9d-46c2-9508-5d2e859ff653)
Author

if you point me to the related code in blender repository , would e nice

if you point me to the related code in blender repository , would e nice
Member

Unable to redo in simple file. Could you share example file with us?

if you point me to the related code in blender repository , would e nice

Cycles code is located in intern\cycles\blender. I'm not sure which factors are affecting this, so can not really tell exact file/code-block to look at.
Cycles devs know better about it.

Unable to redo in simple file. Could you share example file with us? > if you point me to the related code in blender repository , would e nice Cycles code is located in `intern\cycles\blender`. I'm not sure which factors are affecting this, so can not really tell exact file/code-block to look at. Cycles devs know better about it.
Alex Mehler changed title from Viewport rendering, heavy banding problems. to Viewport rendering in EEVEE -> heavy banding problems. 2023-10-10 09:00:05 +02:00
Author

Unable to redo in simple file. Could you share example file with us?

if you point me to the related code in blender repository , would e nice

Cycles code is located in intern\cycles\blender. I'm not sure which factors are affecting this, so can not really tell exact file/code-block to look at.
Cycles devs know better about it.

These are eevee renderings and viewport, i changed the title accordingly. sorry
here i made a testfile:

a gp object and textured plane and a sphere .. all have banding and/or color grizz
like i said it happens with or without viewport compositor , and encompasses all objects , so it should happen somewhere in the capture module or following conversion , not before in object/shaders/whatever

viewport - looks fine
grafik

viewport render - banding
grafik

> Unable to redo in simple file. Could you share example file with us? > > if you point me to the related code in blender repository , would e nice > > Cycles code is located in `intern\cycles\blender`. I'm not sure which factors are affecting this, so can not really tell exact file/code-block to look at. > Cycles devs know better about it. These are eevee renderings and viewport, i changed the title accordingly. sorry here i made a testfile: a gp object and textured plane and a sphere .. all have banding and/or color grizz like i said it happens with or without viewport compositor , and encompasses all objects , so it should happen somewhere in the capture module or following conversion , not before in object/shaders/whatever viewport - looks fine ![grafik](/attachments/885a022f-9f1b-402c-be64-c5a3c92ad91c) viewport render - banding ![grafik](/attachments/919c97cf-76b5-43b0-ad16-26f4e1510e3b)
Author

OK , i got it .. the bug was introduced in blender build August 09, 18:54:32 15124fe490

https://projects.blender.org/blender/blender/commit/15124fe49090

i dont see what in that commit would change the behaviour though .. but the version prior to this renders fine.

@fclem

OK , i got it .. the bug was introduced in blender build August 09, 18:54:32 15124fe49090 https://projects.blender.org/blender/blender/commit/15124fe49090 i dont see what in that commit would change the behaviour though .. but the version prior to this renders fine. @fclem
Pratik Borhade added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2023-10-12 13:22:36 +02:00
Member

Thanks for the file. Unable to confirm though: image
Does this happen with factory settings (to eliminate interference of additional scripts, add-ons, etc.)?: File > Defaults > Load Factory Settings

Thanks for the file. Unable to confirm though: [image](/attachments/29565a26-510e-44cd-b731-e626e425c7ae) Does this happen with factory settings (to eliminate interference of additional scripts, add-ons, etc.)?: `File > Defaults > Load Factory Settings`
869 KiB
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-10-17 07:52:46 +02:00
Author

Thanks for the file. Unable to confirm though: image
Does this happen with factory settings (to eliminate interference of additional scripts, add-ons, etc.)?: File > Defaults > Load Factory Settings

Yes its happening on default settings too.

Did you use viewport rendering though ? , View -> Viewport Render Image . Normally viewport render doesnt show render statistics.

> Thanks for the file. Unable to confirm though: [image](/attachments/29565a26-510e-44cd-b731-e626e425c7ae) > Does this happen with factory settings (to eliminate interference of additional scripts, add-ons, etc.)?: `File > Defaults > Load Factory Settings` Yes its happening on default settings too. Did you use viewport rendering though ? , View -> Viewport Render Image . Normally viewport render doesnt show render statistics.
Author

This may also be related:

The old behaviour for viewport rendering , has exact color reproduction in the render.
The image shows the eevee viewport and a viewport render in a very small window. As you can see the colors are matching.

grafik

The new behaviour (since build August 09, 18:54:32). Here you can see that the colors are slightly shifted in the render. Its probably easier to see in the yellow than the orange even , turned from orangy glowy yellow to dirty greenish yellow , darker parts in the orange are cutoff and replaced with saturation instead .. there must be some undetected color conversion issue in the code now.

grafik

This may also be related: The old behaviour for viewport rendering , has exact color reproduction in the render. The image shows the eevee viewport and a viewport render in a very small window. As you can see the colors are matching. ![grafik](/attachments/6bf224e5-b0ec-4f5c-a7ab-faa5fc4304fb) The new behaviour (since build August 09, 18:54:32). Here you can see that the colors are slightly shifted in the render. Its probably easier to see in the yellow than the orange even , turned from orangy glowy yellow to dirty greenish yellow , darker parts in the orange are cutoff and replaced with saturation instead .. there must be some undetected color conversion issue in the code now. ![grafik](/attachments/c92ad11e-0b16-4265-8bdd-354477d7ca97)
Member

View -> Viewport Render Image . Normally viewport render doesnt show render statistics.

Nice catch, thanks 🙂

I assume problem is with final render image

> View -> Viewport Render Image . Normally viewport render doesnt show render statistics. Nice catch, thanks 🙂 I assume problem is with final render image
Pratik Borhade changed title from Viewport rendering in EEVEE -> heavy banding problems. to Regression: EEVEE Color banding in viewport image render 2023-10-18 12:13:08 +02:00
Pratik Borhade added this to the 4.0 milestone 2023-10-18 12:17:24 +02:00
Member

Caused by 2367ed2ef2.
@Michael-Parkin-White-Apple, any pointer?

Caused by 2367ed2ef241846d99fc8bab73abad4d48b9e67b. @Michael-Parkin-White-Apple, any pointer?

@pragma37 Looks like the changes in view3d_draw.cc are what caused it. Can you confirm?

@pragma37 Looks like the changes in `view3d_draw.cc` are what caused it. Can you confirm?
Author

@pragma37 Looks like the changes in view3d_draw.cc are what caused it. Can you confirm?

please note that this solely affects the viewport render , not the normal render(F12). The normal render looks fine.
So maybe the changes implemented there can be ported to viewport render . Someone probably just overlooked/forgot it. ??

> @pragma37 Looks like the changes in `view3d_draw.cc` are what caused it. Can you confirm? please note that this solely affects the viewport render , not the normal render(F12). The normal render looks fine. So maybe the changes implemented there can be ported to viewport render . Someone probably just overlooked/forgot it. ??

I have the fix. Will commit.

I have the fix. Will commit.
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-10-23 13:10:27 +02: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
4 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#113266
No description provided.