EEVEE: Volumetric shadows disappear when facing sun light #87182

Open
opened 2021-04-03 23:39:58 +02:00 by RoyTheKoi · 7 comments

System Information
Operating system: MacOS Catalina 10.15.7
Graphics card: AMD Radeon Pro 5500M 8 GB, Intel UHD Graphics 630 1536 MB

Blender Version
Broken:

  • 2.93 master 2021-03-31
    Worked:
  • 2.92
  • 2.93 master 2021-03-18

Short description of error
Volumetric shadows disappear when looking towards a sun light, within around 45 degrees. Especially apparent when volume density is much greater than 1.
Point and area light shadows seem unaffected.

Comparison:
EEVEE Volumetric Shadow Comparison.jpg

2.93 video example:
EEVEE Volumetric Shadows Bug 2.9.3.mp4

Exact steps for others to reproduce the error

  1. Create a mesh
  2. Add a principled volume material with density of 10
  3. Add a sun light
  4. Enable volumetric shadows
  5. Enter EEVEE rendered view
  6. Rotate the view to face the sun light, notice the shadows disappear on the volume.

EEVEE Volumetric Shadows Bug.blend

**System Information** Operating system: MacOS Catalina 10.15.7 Graphics card: AMD Radeon Pro 5500M 8 GB, Intel UHD Graphics 630 1536 MB **Blender Version** Broken: - 2.93 master 2021-03-31 Worked: - 2.92 - 2.93 master 2021-03-18 **Short description of error** Volumetric shadows disappear when looking towards a sun light, within around 45 degrees. Especially apparent when volume density is much greater than 1. Point and area light shadows seem unaffected. **Comparison:** ![EEVEE Volumetric Shadow Comparison.jpg](https://archive.blender.org/developer/F9919249/EEVEE_Volumetric_Shadow_Comparison.jpg) **2.93 video example:** [EEVEE Volumetric Shadows Bug 2.9.3.mp4](https://archive.blender.org/developer/F9919231/EEVEE_Volumetric_Shadows_Bug_2.9.3.mp4) **Exact steps for others to reproduce the error** 1. Create a mesh 2. Add a principled volume material with density of 10 3. Add a sun light 4. Enable volumetric shadows 5. Enter EEVEE rendered view 6. Rotate the view to face the sun light, notice the shadows disappear on the volume. [EEVEE Volumetric Shadows Bug.blend](https://archive.blender.org/developer/F9919253/EEVEE_Volumetric_Shadows_Bug.blend)
Author

Added subscriber: @RoyTheKoi

Added subscriber: @RoyTheKoi
Member

Added subscribers: @fclem, @Alaska

Added subscribers: @fclem, @Alaska
Member

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

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

I'm able to confirm this bug in latest master.

I have decided to bisect the issue and found commit 884f934a85 to be the culprit
CC @fclem

System Information:
Operating system: Linux-5.10.0-5-amd64-x86_64-with-glibc2.31 64 Bits
Graphics card: GeForce RTX 3070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.67

Blender Version: 2.93.0 Alpha, branch: master, commit date: 2021-04-03 16:32, hash: 8681504f06

I'm able to confirm this bug in latest master. I have decided to bisect the issue and found commit 884f934a85 to be the culprit CC @fclem **System Information:** Operating system: Linux-5.10.0-5-amd64-x86_64-with-glibc2.31 64 Bits Graphics card: GeForce RTX 3070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.67 **Blender Version:** 2.93.0 Alpha, branch: master, commit date: 2021-04-03 16:32, hash: `8681504f06`

Added subscriber: @DeanKJones

Added subscriber: @DeanKJones
Dean Jones self-assigned this 2021-04-17 20:32:57 +02:00

Hi, I have a working fix [here: D11004 ](https://developer.blender.org/D11004)

Hi, I have a working fix [here: [D11004](https://archive.blender.org/developer/D11004) ](https://developer.blender.org/D11004)

Well it is complex. I fixed the previous behavior (in 2.92) where only the local volume (1m) was considered for shadowing. Now it goes through the whole camera frustum but when the shadow ray is parallel to the camera ray it needs to cover the whole view range (up to the far clip distance). With the limited number of shader samples steps under-sampling arises (the volume steps are too big).

The problem is that there is no real fix for that. Current implementation is taking samples at the end of volume steps to not miss the light position sample. Using the start position of a step makes the volume object go fully shadowed in your test scene and might miss shadowing if the light is in a volume. I don't know which is better.

Note that using a noise to distribute the error will only make the result blurry and make performance terrible due to texture cache misses.

A workaround is to lower the clip end distance of the camera. But I know it's not possible in every scene.

I have plans for making the volume shadows part of the shadow maps. This would fix the isssue and even improve performance drastically. I think I'll consider this a known issue until then.

Well it is complex. I fixed the previous behavior (in 2.92) where only the local volume (1m) was considered for shadowing. Now it goes through the whole camera frustum but when the shadow ray is parallel to the camera ray it needs to cover the whole view range (up to the far clip distance). With the limited number of shader samples steps under-sampling arises (the volume steps are too big). The problem is that there is no real fix for that. Current implementation is taking samples at the end of volume steps to not miss the light position sample. Using the start position of a step makes the volume object go fully shadowed in your test scene and might miss shadowing if the light is in a volume. I don't know which is better. Note that using a noise to distribute the error will only make the result blurry and make performance terrible due to texture cache misses. A workaround is to lower the clip end distance of the camera. But I know it's not possible in every scene. I have plans for making the volume shadows part of the shadow maps. This would fix the isssue and even improve performance drastically. I think I'll consider this a known issue until then.
Philipp Oeser removed the
Interest
EEVEE & Viewport
label 2023-02-09 15:13:47 +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
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#87182
No description provided.