Lights with radius 0 produce a dark ring in EEVEE #82437

Open
opened 2020-11-05 18:30:53 +01:00 by Cycles · 8 comments

System Information
Operating system: Microsoft Windows 10 Pro
Graphics card: Nvidia GeForce GTX 1050
Processor: Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz, 3301 Mhz, 4 Core(s), 4 Logical Processor(s)

Blender Version
Broken: blender-2.91.0-02677ec4e0fa-windows64

Short description of error
In EEVEE, objects with certain roughness values have a ring inside the specular highlight in which there is no light, when the light source has a radius of 0. Changing the radius to have a higher value makes the ring go away. Setting the value to near zero values such as 0.002 will still have the ring, but smaller. Both distributions GGX and Multiscatter GGX have the problem. Only the lights with a radius parameter have the ring (point and spot lights). Area lights use a size parameter and behave differently, so they do not have this issue. Sun lights have an angle parameter instead, and the fact that they are treated as having an infinite distance may also play a role.

specular_ring.png
Exact steps for others to reproduce the error
specular_ring.blend
Open blend file
Set mode to rendered view
Notice a dark ring around the specular highlight
Change radius to value over 0.005
The ring goes away

**System Information** Operating system: Microsoft Windows 10 Pro Graphics card: Nvidia GeForce GTX 1050 Processor: Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz, 3301 Mhz, 4 Core(s), 4 Logical Processor(s) **Blender Version** Broken: blender-2.91.0-02677ec4e0fa-windows64 **Short description of error** In EEVEE, objects with certain roughness values have a ring inside the specular highlight in which there is no light, when the light source has a radius of 0. Changing the radius to have a higher value makes the ring go away. Setting the value to near zero values such as 0.002 will still have the ring, but smaller. Both distributions GGX and Multiscatter GGX have the problem. Only the lights with a radius parameter have the ring (point and spot lights). Area lights use a size parameter and behave differently, so they do not have this issue. Sun lights have an angle parameter instead, and the fact that they are treated as having an infinite distance may also play a role. ![specular_ring.png](https://archive.blender.org/developer/F9210819/specular_ring.png) **Exact steps for others to reproduce the error** [specular_ring.blend](https://archive.blender.org/developer/F9210817/specular_ring.blend) Open blend file Set mode to rendered view Notice a dark ring around the specular highlight Change radius to value over 0.005 The ring goes away
Author

Added subscriber: @Cycles

Added subscriber: @Cycles
Cycles changed title from Bright lights with radius 0 produce a dark ring in EEVEE to Lights with radius 0 produce a dark ring in EEVEE 2020-11-06 01:37:40 +01:00
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Author

Trying to find a consistent pattern to when this happens is proving to be difficult. Sometimes, a rough specular highlight has no ring and looks fine. Other times, the highlight seems to disappear entirely, especially when the light is more distant. It looks a lot worse on metallic objects but increase the light's specular value makes the problem noticeable even on non metallic objects. Sometimes, it appears as a clipped highlight rather than a ring. It happens very randomly and I am not sure why.

Trying to find a consistent pattern to when this happens is proving to be difficult. Sometimes, a rough specular highlight has no ring and looks fine. Other times, the highlight seems to disappear entirely, especially when the light is more distant. It looks a lot worse on metallic objects but increase the light's specular value makes the problem noticeable even on non metallic objects. Sometimes, it appears as a clipped highlight rather than a ring. It happens very randomly and I am not sure why.

Added subscriber: @ringmaker

Added subscriber: @ringmaker

i m new developer here. here's what i found
error is caused in ltc_lib.glsl :- ltc_evaluate_disk
cause: due to small value of radius roots evaluated of cubic equation are very close to 0
three roots a,b,c (ascending order) a and b are too close to 0 and a is being taken as 0 while we calculate L = a/b it evaluates to 0 causing error

i m new developer here. here's what i found error is caused in ltc_lib.glsl :- ltc_evaluate_disk cause: due to small value of radius roots evaluated of cubic equation are very close to 0 three roots a,b,c (ascending order) a and b are too close to 0 and a is being taken as 0 while we calculate L = a/b it evaluates to 0 causing error
Author

Quoted Text

In #82437#1055003, @ringmaker wrote:
i m new developer here. here's what i found
error is caused in ltc_lib.glsl :- ltc_evaluate_disk
cause: due to small value of radius roots evaluated of cubic equation are very close to 0
three roots a,b,c (ascending order) a and b are too close to 0 and a is being taken as 0 while we calculate L = a/b it evaluates to 0 causing error

So this is a precision error? I wonder what a workaround case for this would look like. Maybe it can clamp the value just above zero to avoid the error? I don't know how this would be implemented or how practical it would be, but maybe something like this would work?

> Quoted Text > In #82437#1055003, @ringmaker wrote: > i m new developer here. here's what i found > error is caused in ltc_lib.glsl :- ltc_evaluate_disk > cause: due to small value of radius roots evaluated of cubic equation are very close to 0 > three roots a,b,c (ascending order) a and b are too close to 0 and a is being taken as 0 while we calculate L = a/b it evaluates to 0 causing error So this is a precision error? I wonder what a workaround case for this would look like. Maybe it can clamp the value just above zero to avoid the error? I don't know how this would be implemented or how practical it would be, but maybe something like this would work?

Added subscriber: @fclem

Added subscriber: @fclem

This issue has been reported before. Unfortunately we cannot clamp since 0 is a legitimate value too. We already clamp roughness and light radius to a very small value, but this artifact depends on viewing condition so it is quite not possible to fix without improving the actual LTC algorithm. Which is way above my knowledge.

If someone wants to take a look at it feel free to do it.

This issue has been reported before. Unfortunately we cannot clamp since 0 is a legitimate value too. We already clamp roughness and light radius to a very small value, but this artifact depends on viewing condition so it is quite not possible to fix without improving the actual LTC algorithm. Which is way above my knowledge. If someone wants to take a look at it feel free to do it.
Philipp Oeser removed the
Interest
Viewport & EEVEE
label 2023-02-09 15:14:24 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
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#82437
No description provided.