HDRI animation bug in eevee #91312

Open
opened 2021-09-10 13:24:50 +02:00 by Fischer · 5 comments

System Information
Operating system: Windows-10-10.0.17763-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 471.11

Blender Version
Broken: version: 2.93.1, branch: master, commit date: 2021-06-22 05:57, hash: 1b8d33b18c
Worked: (newest version of Blender that worked as expected)

Short description of error
The HDRI illumination shouldn't change on the cube, because every thing including the HDRI is rotating at the same speed.
However, this went wrong in EEVEE... It seems that in Cycles everything went on so well.

Exact steps for others to reproduce the error
This is a simplified bug presenting file of a complex scene which I found this bug, in which I have to rotate an object, a HDRI and camera together, and I'm struggling to get rid of this bug...

BugReport.blend

**System Information** Operating system: Windows-10-10.0.17763-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 471.11 **Blender Version** Broken: version: 2.93.1, branch: master, commit date: 2021-06-22 05:57, hash: `1b8d33b18c` Worked: (newest version of Blender that worked as expected) **Short description of error** The HDRI illumination shouldn't change on the cube, because every thing including the HDRI is rotating at the same speed. However, this went wrong in EEVEE... It seems that in Cycles everything went on so well. <video src="https://archive.blender.org/developer/F10394023/0001-0096.mkv" controls></video> **Exact steps for others to reproduce the error** This is a simplified bug presenting file of a complex scene which I found this bug, in which I have to rotate an object, a HDRI and camera together, and I'm struggling to get rid of this bug... [BugReport.blend](https://archive.blender.org/developer/F10394020/BugReport.blend)
Member

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

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

I can confirm. But I am not sure if this is something that can be relied upon, so tagging the module for more information.

I can confirm. But I am not sure if this is something that can be relied upon, so tagging the module for more information.
Philipp Oeser removed the
Interest
EEVEE & Viewport
label 2023-02-09 15:13:20 +01:00
Germano Cavalcante added the
Interest
EEVEE
label 2023-10-18 17:04:46 +02:00

This is very interesting. Even with clamping threshold set very low, one can reproduce the issue on both the reflections and diffuse surfaces. Here is a way simpler file and HDRI and it still have the same flickering.

BugReport.blend

This might be very well be a bug in our probe processing pipeline.

Need to dig further.

This is very interesting. Even with clamping threshold set very low, one can reproduce the issue on both the reflections and diffuse surfaces. Here is a way simpler file and HDRI and it still have the same flickering. [BugReport.blend](/attachments/7ed08662-2502-4b4c-8eb5-98fb40c6bbc1) This might be very well be a bug in our probe processing pipeline. Need to dig further.
Clément Foucault added
Status
Confirmed
and removed
Status
Needs Info from Developers
labels 2024-04-24 00:25:18 +02:00

Spherical Harmonic weighting error

The flickering is due to the imprecision in the spherical harmonic extraction code. We use a slightly off solid angle weight for each pixels of the octahedron map. And this, in turn, make the very bright pixels vary when it rotates around the sphere as its weighting error varies. Also, I am wondering if that can also be a numerical precision because we sum all pixels. The error might add up.

There is also a discretization step that is happening during the remap stage which can also add some error.

The error can be reduced by clamping the world but it never goes away. So I would suggest to implement a LUT with exact weights for each pixels. Other option is to run the SH extraction on the cubemap for which it is much easier to compute the solid angle. Also this would skip the discretization step of the remapping.

One other insight is that the current weighting scheme is broken. The border pixels appear twice in the octahedral map and the corner ones 4 time. So they should be weighted accordingly. We might be able to fix the current code by carefully using symmetries.

Glossy surface interaction

For some reason the glossy surfaces are also affected by the flicker. This is caused by the normalization factor being incorrect. I fixed that in main just now. So at least, it
shouldn't flicker on glossy surfaces for now.

#### Spherical Harmonic weighting error The flickering is due to the imprecision in the spherical harmonic extraction code. We use a slightly off solid angle weight for each pixels of the octahedron map. And this, in turn, make the very bright pixels vary when it rotates around the sphere as its weighting error varies. Also, I am wondering if that can also be a numerical precision because we sum all pixels. The error might add up. There is also a discretization step that is happening during the remap stage which can also add some error. The error can be reduced by clamping the world but it never goes away. So I would suggest to implement a LUT with exact weights for each pixels. Other option is to run the SH extraction on the cubemap for which it is much easier to compute the solid angle. Also this would skip the discretization step of the remapping. One other insight is that the current weighting scheme is broken. The border pixels appear twice in the octahedral map and the corner ones 4 time. So they should be weighted accordingly. We might be able to fix the current code by carefully using symmetries. #### Glossy surface interaction For some reason the glossy surfaces are also affected by the flicker. This is caused by the normalization factor being incorrect. I fixed that in `main` just now. So at least, it shouldn't flicker on glossy surfaces for now.

So I fixed the several inconsistencies in EEVEE-Next and the lighting is already much stable.
Commits b49333a7a0 and 5938ab099d

However, this doesn't fix the following 2 last issues:

  • Very tiny bright spots in HDRI (i.e: Sun) can still make it flicker because of 2 discretization steps that both exhibit aliasing issues.
  • For speed, we decide to choose the light direction per regions of the octahedral map instead of doing the proper SH sum and choosing the light direction per sample.

The former can be mitigated with clamping, which is exactly what we are planning to do with #68478.

The second needs to be addressed regardless because of poor behavior with lower lightprobe resolutions.

So I fixed the several inconsistencies in EEVEE-Next and the lighting is already much stable. Commits b49333a7a050b4ef51c64db8ad58b025b2b9042a and 5938ab099dc2881882fbff5a4bf0ab8bdb2b7aa9 However, this doesn't fix the following 2 last issues: - Very tiny bright spots in HDRI (i.e: Sun) can still make it flicker because of 2 discretization steps that both exhibit aliasing issues. - For speed, we decide to choose the light direction per regions of the octahedral map instead of doing the proper SH sum and choosing the light direction per sample. The former can be mitigated with clamping, which is exactly what we are planning to do with https://projects.blender.org/blender/blender/issues/68478. The second needs to be addressed regardless because of poor behavior with lower lightprobe resolutions.
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
3 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#91312
No description provided.