All renders have slight graininess (both Eevee and Cycles) #113719
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#113719
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Tested on Asus Rog G752VS
Operating system: Linux Mint 21.2
Graphics card: NVIDIA Corporation GP104BM [GeForce GTX 1070 Mobile]
Blender Version
Broken: 3.6.4 (2023-09-25 13:24), Blender 4.1.0 - Alpha ( October 13, 16:03:29 ,
4050b0d6df
)Any render has graininess (high frequency inconsistent pixel brightness), also with Eeevee, even rendering just a background or an emissive plane with no lights in the scene.
Exact steps for others to reproduce the error
With a default startup, change the background color to something like (0,1,0) to make the graininess clearer when enhancing the rendered image in an image editor.
Problem seems absent when using "AgX" for "Viewport transform" in Blender 4.1.0 - Alpha ( October 13, 16:03:29 ,
4050b0d6df
) but present for other modes and all modes from older Blender versions.To see the graininess with a naked eye, you'll need to enhance the image, like in GIMP as illustrated.
Blender applies dithering to the imageby default to reduce banding. This may be the issue you're experiencing.
To turn off dithering:
Output
tab.Post Processing
tab, turn dithering down to 0.Does this help/resolve your issue?
Why yes, you seem to have found the feature which causes the issue: setting dithering to 0 does seem to eliminate the graininess. However, I don't think this should be happening even with having default dithering. Dithering shouldn't impact flat colors. For example if only a single color background is rendered, or a flat plane with a single color emissive material like here, there's no two or more distinct colored pixels involved which a dithering filter would convert to a grainy noise for banding removal purposes.
So it seems to me like dithering filter code has a bug or limitation to properly deal with flat shaded features in the render: one may want to have dithering On for it to be applied to any gradients in the render, while also needing to have flat shaded features in the render, without one impacting the quality of the other.
As a reference, I'm providing all the dithering methods the image editor GIMP has. Out of all the options, only "Random" seems to add random graininess to flat colored features. Maybe Blender is using a similar algorithm, but I'm not sure why, something like Floyd-Steinberg or Blue Noise seems to make more sense.
I also noticed this strange pattern in my renders and had no idea where it came from or how to get rid of it. Turns out it was
render.dither_intensity
, thanks.Sounds like a relatively new feature that has been aded and enabled silently , I don't remember this artifact before.
Changing to "Needs information from Developers". The graininess is caused by dithering. And the dithering can be turned off. However, the behavior of the dither appears to be weird according to the reports from you two. So I'd like a developer that works in this area to comment on this.
Just chiming in with the history: the dithering feature has existed for quite some time but it was first set to 1.0 in Blender 2.80 as part of #54943 (
302fea6b61
). It was 0.0 in prior versions.I agree that the dithering algorithm should only affect those areas with changing colors, it should only apply to image regions that has features within some certain thresholds.
I have programmed some dithering myself as part of an image filter, and I can say that Blender's dithering algorithm makes no sense. It simply adds noise to the image. That's not dithering.
Noise is the simplest (and arguably the best) method of regulating a dithering pattern, since it requires no textures or lookup tables and also doesn't add any repeating, distracting patterns. To implement it properly, the algorithm, assuming it's being applied to one channel of one pixel at a time, needs to do the following: (This algorithm is inspired by dithering in digital audio processing.)
Input: A floating-point value, such as one channel of one pixel, from a rendered or composited image. Let's call it
F
.First, calculate the 2 closest values to
F
that the output image format can use. Let's call themX
andY
. For instance, ifF = 0.499
, and the output is an 8-bit integer, thenX = 127
andY = 128
. (8-bit integers range from 0 to 255 while the inputF
ranges from 0 to 1, so we need to multiplyF
by 255 first, then round it down to getX
, or round it up to getY
.)Now, calculate how far the scaled
F
is betweenX
andY
. Let's call that numberP
. For the example above, we getP = 0.245
(aka 24.5%). We now generate a random number between 0.0 (inclusive) and 1.0 (exclusive). Let's call itR
.And lastly:
if P < R then return X else return Y
That means there's a 24.5% chance to output X and a 75.5% chance to output Y.You will notice that if the input number
F
can be represented exactly with the chosen output format (such asF = 0.0
), this algorithm will always return the same output. AS IT SHOULD!Of course, there is one last thing to consider: The user can control how strong the dithering should be. I do not have a good proposal for properly implementing this. Ideally, it should modify the likelihood that
F
is dithered at all, as opposed to simply outputting the single closest possible output. So if the dithering setting is low, andF
is much closer toX
than toY
, then the random number generator is skipped andX
is returned as output.Here is the entire algorithm in one piece of pseudocode:
PS: Dithering shouldn't even be an option for floating-point image formats. It simply doesn't make sense.