Blender 2.82 EEVEE Sun Shadows look terrible in viewport #70906

Closed
opened 2019-10-17 20:10:54 +02:00 by Shamimur Rahman · 26 comments

{F7833569}System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.30

Blender Version
Broken: version: 2.82 (sub 0), branch: master, commit date: 2019-10-14 19:07, hash: 9a85592dde
Worked: (optional)

Short description of error
[Blender 2.82 EEVEE Sun Shadows look terrible in viewport, pixelated even at the highest shadow maps setting. Shadows from other lights looks ok at high shadow maps but sun shadows in EEVEE look terrible. it used to look good in version 2.81]

Exact steps for others to reproduce the error
[ In EEVEE render view change the light to sun and look at the shadow of any object]
[Based on the default startup or an attached .blend file (as simple as possible)]

{[F7833569](https://archive.blender.org/developer/F7833569/untitled.blend)}**System Information** Operating system: Windows-10-10.0.17763 64 Bits Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.30 **Blender Version** Broken: version: 2.82 (sub 0), branch: master, commit date: 2019-10-14 19:07, hash: `9a85592dde` Worked: (optional) **Short description of error** [Blender 2.82 EEVEE Sun Shadows look terrible in viewport, pixelated even at the highest shadow maps setting. Shadows from other lights looks ok at high shadow maps but sun shadows in EEVEE look terrible. it used to look good in version 2.81] **Exact steps for others to reproduce the error** [ In EEVEE render view change the light to sun and look at the shadow of any object] [Based on the default startup or an attached .blend file (as simple as possible)]

Added subscriber: @shamimurrahman19

Added subscriber: @shamimurrahman19

#71076 was marked as duplicate of this issue

#71076 was marked as duplicate of this issue
Member

Added subscriber: @Mets

Added subscriber: @Mets
Member

Please provide a blend file that the devs can open in 2.81 and 2.82 to compare the results.

Please provide a blend file that the devs can open in 2.81 and 2.82 to compare the results.

Added subscriber: @SpectreFirst

Added subscriber: @SpectreFirst

We cannot be sure without having concrete examples but I think I know what this is about because I’ve had the same exact problem with Sun shadows when Blender switched from ESM\VSM shadows to a new PCF algorithm. The thing is that old shadows used to have Softness parameter which helped with jagged edges but new algorithm relies on light shape and Soft Shadows option in Render Properties panel.

Just in case, here is my comparison between old and new Sun shadows. Old shadows tend to look less precise but more smooth while new ones look more precise but tend to look jagged or fuzzy. I'm not sure but perhaps new shadows are considered a trade-off between quality and precision and this is how it's supposed to be? The only case where I see a problem is high intensity case when PCF shadow looks pixelated regardless of Angle.
1_ECM_Shadow_High_Intensity.JPG
2_PCF_Shadow_High_Intensity.JPG
3_ECM_Shadow_Low_Intensity.JPG
4_PCF_Shadow_Low_Intensity.JPG

We cannot be sure without having concrete examples but I think I know what this is about because I’ve had the same exact problem with Sun shadows when Blender switched from ESM\VSM shadows to a new PCF algorithm. The thing is that old shadows used to have Softness parameter which helped with jagged edges but new algorithm relies on light shape and Soft Shadows option in Render Properties panel. Just in case, here is my comparison between old and new Sun shadows. Old shadows tend to look less precise but more smooth while new ones look more precise but tend to look jagged or fuzzy. I'm not sure but perhaps new shadows are considered a trade-off between quality and precision and this is how it's supposed to be? The only case where I see a problem is high intensity case when PCF shadow looks pixelated regardless of Angle. ![1_ECM_Shadow_High_Intensity.JPG](https://archive.blender.org/developer/F7833414/1_ECM_Shadow_High_Intensity.JPG) ![2_PCF_Shadow_High_Intensity.JPG](https://archive.blender.org/developer/F7833417/2_PCF_Shadow_High_Intensity.JPG) ![3_ECM_Shadow_Low_Intensity.JPG](https://archive.blender.org/developer/F7833420/3_ECM_Shadow_Low_Intensity.JPG) ![4_PCF_Shadow_Low_Intensity.JPG](https://archive.blender.org/developer/F7833422/4_PCF_Shadow_Low_Intensity.JPG)

In #70906#797776, @Mets wrote:
Please provide a blend file that the devs can open in 2.81 and 2.82 to compare the results.

File added for comparison. thank you.

> In #70906#797776, @Mets wrote: > Please provide a blend file that the devs can open in 2.81 and 2.82 to compare the results. File added for comparison. thank you.
Shamimur Rahman changed title from Blender 2.82 EEVEE Sun Shadows look terrible to Blender 2.82 EEVEE Sun Shadows look terrible in viewport 2019-10-18 11:36:31 +02:00

2.81.png

2.82.png

first one is from 2.81
second one is from 2.82

I also noticed that it looks bad in the viewport only

![2.81.png](https://archive.blender.org/developer/F7833611/2.81.png) ![2.82.png](https://archive.blender.org/developer/F7833613/2.82.png) first one is from 2.81 second one is from 2.82 I also noticed that it looks bad in the viewport only

Added subscriber: @mano-wii

Added subscriber: @mano-wii
Clément Foucault was assigned by Germano Cavalcante 2019-10-18 16:18:10 +02:00

Really something has changed between releases.
Is this result expected?

Really something has changed between releases. Is this result expected?

Added subscriber: @Snow-2

Added subscriber: @Snow-2

@shamimurrahman19 what precise version hash are you comparing against?

Shadows have had an overhaul during the 2.81 development which got rid of pre-filtered shadowmaps (VSM & ESM). This might be what you are interpreting as less good.

@shamimurrahman19 what precise version hash are you comparing against? Shadows have had an overhaul during the 2.81 development which got rid of pre-filtered shadowmaps (VSM & ESM). This might be what you are interpreting as less good.

In #70906#802755, @fclem wrote:
@shamimurrahman19 what precise version hash are you comparing against?

Shadows have had an overhaul during the 2.81 development which got rid of pre-filtered shadowmaps (VSM & ESM). This might be what you are interpreting as less good.

Yeah I know...maybe the problem started after removing VSM & ESM. But still, it's a problem.
I can make the sun shadow look good in render by changing a lot of settings but sun shadows always look ugly in the viewport when camera not added.

> In #70906#802755, @fclem wrote: > @shamimurrahman19 what precise version hash are you comparing against? > > Shadows have had an overhaul during the 2.81 development which got rid of pre-filtered shadowmaps (VSM & ESM). This might be what you are interpreting as less good. Yeah I know...maybe the problem started after removing VSM & ESM. But still, it's a problem. I can make the sun shadow look good in render by changing a lot of settings but sun shadows always look ugly in the viewport when camera not added.

What you might experience is lower shadowmap resolution due to camera having much lower far clip distance than the default viewport camera.

The sun shadow map uses near and far clip distance to calculate shadowmap projection that contain the whole viewable scene. If near - far distance is much higher there is less shadowmap resolution per unit distance, resulting in less precise shadows.

What you might experience is lower shadowmap resolution due to camera having much lower far clip distance than the default viewport camera. The sun shadow map uses near and far clip distance to calculate shadowmap projection that contain the whole viewable scene. If near - far distance is much higher there is less shadowmap resolution per unit distance, resulting in less precise shadows.

In #70906#802889, @fclem wrote:
What you might experience is lower shadowmap resolution due to camera having much lower far clip distance than the default viewport camera.

The sun shadow map uses near and far clip distance to calculate shadowmap projection that contain the whole viewable scene. If near - far distance is much higher there is less shadowmap resolution per unit distance, resulting in less precise shadows.

I changed the far clip distance but the result is still the same.Screenshot (280).png

> In #70906#802889, @fclem wrote: > What you might experience is lower shadowmap resolution due to camera having much lower far clip distance than the default viewport camera. > > The sun shadow map uses near and far clip distance to calculate shadowmap projection that contain the whole viewable scene. If near - far distance is much higher there is less shadowmap resolution per unit distance, resulting in less precise shadows. I changed the far clip distance but the result is still the same.![Screenshot (280).png](https://archive.blender.org/developer/F7869774/Screenshot__280_.png)

@shamimurrahman19

The Clip end distance needs to be way lower. Try 100 and you will see what I'm talking about.

@shamimurrahman19 The Clip end distance needs to be way lower. Try 100 and you will see what I'm talking about.

In #70906#802937, @fclem wrote:
@shamimurrahman19

The Clip end distance needs to be way lower. Try 100 and you will see what I'm talking about.

"Try 100"
That's not a good solution.
Even if that somehow works, it sounds like an inefficient way to go around a bug.

> In #70906#802937, @fclem wrote: > @shamimurrahman19 > > The Clip end distance needs to be way lower. Try 100 and you will see what I'm talking about. "Try 100" That's not a good solution. Even if that somehow works, it sounds like an inefficient way to go around a bug.
Member

I'm not an expert on Eevee but this just sounds like a reality of real time rendering. You have to deal with shadow map resolutions on any other real time renderer, including UE4.

You can:

  • Max out this value image.png
  • Increase the size of your scene (don't do this)
  • Adjust your clipping distances so they always include only exactly what you need. (do this)

I'm assuming the new shadow method has benefits that shine when used appropriately. And if you want a render engine that works without diving into any settings, raytracing is your only option.

I'm not an expert on Eevee but this just sounds like a reality of real time rendering. You have to deal with shadow map resolutions on any other real time renderer, including UE4. You can: - Max out this value ![image.png](https://archive.blender.org/developer/F7870157/image.png) - Increase the size of your scene (don't do this) - Adjust your clipping distances so they always include only exactly what you need. (do this) I'm assuming the new shadow method has benefits that shine when used appropriately. And if you want a render engine that works without diving into any settings, raytracing is your only option.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

@shamimurrahman19 The "100" I gave you was just to show you that the clip distance has an impact on shadow accuracy. If you set it the same as your camera settings you should see the same results.

The new shadow method is more simple to use and has less corner cases. The downside of them is that we don't do any filtering and rely on temporal sampling accumulation to reduce aliasing artifacts. In other words, more samples are needed for smooth shadows.

From what I can understand, what you describe here is not a bug but is the expected behavior of the new system.

@shamimurrahman19 The "100" I gave you was just to show you that the clip distance has an impact on shadow accuracy. If you set it the same as your camera settings you should see the same results. The new shadow method is more simple to use and has less corner cases. The downside of them is that we don't do any filtering and rely on temporal sampling accumulation to reduce aliasing artifacts. In other words, more samples are needed for smooth shadows. From what I can understand, what you describe here is not a bug but is the expected behavior of the new system.

Some Comparison shots of shadows in Eevee v2.80 and v2.81. Default scene with added plane:

2.80 ESM vs 2.81

Eevee ESM Shadows.png

2.80 VSM vs 2.81

Eevee VSM Shadows.png

2.80 VSM 2.81 with Cube Size maxed out

Cube Size Maxed.png

As recommended above Cube Size maxed out seems to give the best result and it has a transition from hard to soft shadow which I like though it looks a bit low res on the soft side and the corner looks weird with the hard shadow but I guess that requires some extra tweaking.

Cycles 2.80 vs Eevee 2.81

Cycles vs Eevee.png

Some Comparison shots of shadows in Eevee v2.80 and v2.81. Default scene with added plane: 2.80 ESM vs 2.81 ![Eevee ESM Shadows.png](https://archive.blender.org/developer/F7872676/Eevee_ESM_Shadows.png) 2.80 VSM vs 2.81 ![Eevee VSM Shadows.png](https://archive.blender.org/developer/F7872679/Eevee_VSM_Shadows.png) 2.80 VSM 2.81 with Cube Size maxed out ![Cube Size Maxed.png](https://archive.blender.org/developer/F7872684/Cube_Size_Maxed.png) As recommended above Cube Size maxed out seems to give the best result and it has a transition from hard to soft shadow which I like though it looks a bit low res on the soft side and the corner looks weird with the hard shadow but I guess that requires some extra tweaking. Cycles 2.80 vs Eevee 2.81 ![Cycles vs Eevee.png](https://archive.blender.org/developer/F7872719/Cycles_vs_Eevee.png)

While I am here can I take the time to beg you guys for osX (AMD) GPU support in Cycles and a shadow catcher for Eevee?
Here's Radeon Pro Render and Cycles with shadow catchers:

RPR and Cycles Shadow Catcher.png

My main use for Blender is compositing and I am trying to get a similar result to Adobe Dimension but it requires quite a bit of tinkering in Blender. I love working in eevee but it's too much work(around) to get a shadow catcher effect. Cycles/RPR does the trick but only trough compositing nodes. Doing all this in realtime like in Adobe Dimension would be fantastic!

Please feel free to move or remove this post if it clashes with the rules or this thread. Thanks guys and respect!

While I am here can I take the time to beg you guys for osX (AMD) GPU support in Cycles and a shadow catcher for Eevee? Here's Radeon Pro Render and Cycles with shadow catchers: ![RPR and Cycles Shadow Catcher.png](https://archive.blender.org/developer/F7872871/RPR_and_Cycles_Shadow_Catcher.png) My main use for Blender is compositing and I am trying to get a similar result to Adobe Dimension but it requires quite a bit of tinkering in Blender. I love working in eevee but it's too much work(around) to get a shadow catcher effect. Cycles/RPR does the trick but only trough compositing nodes. Doing all this in realtime like in Adobe Dimension would be fantastic! Please feel free to move or remove this post if it clashes with the rules or this thread. Thanks guys and respect!

Added subscriber: @MCAN

Added subscriber: @MCAN

At first I though it doesnt work well for sunlight if u want a soft sunlight shadow. Then,I found why. If soft shadows doesnt work well for sun light like other spotlights etc. If its too jagged or if its too soft when u turn on soft shadows You can try this. Just use the angle parameter of the sun and if u make it ''0'' (zero) while turning on soft shadows from render properties. The shadows will no longer have jagged edges but still looking pretty stable and correct when u render it :)) So I think the key to handling softness is angle parameter of the sun. So this new algorithm is working pretty good I think and show really physically accurate behaviors like cycles because of having softness controlled by angle. (maybe everyone already knows these things I mentioned above, but maybe it still helps some people).
Only improvement could be having higher max cascade shadow map size option like 8192 as instead of 4096 for people who might want.

At first I though it doesnt work well for sunlight if u want a soft sunlight shadow. Then,I found why. If soft shadows doesnt work well for sun light like other spotlights etc. If its too jagged or if its too soft when u turn on soft shadows You can try this. Just use the angle parameter of the sun and if u make it ''0'' (zero) while turning on soft shadows from render properties. The shadows will no longer have jagged edges but still looking pretty stable and correct when u render it :)) So I think the key to handling softness is angle parameter of the sun. So this new algorithm is working pretty good I think and show really physically accurate behaviors like cycles because of having softness controlled by angle. (maybe everyone already knows these things I mentioned above, but maybe it still helps some people). Only improvement could be having higher max cascade shadow map size option like 8192 as instead of 4096 for people who might want.

Added subscriber: @TroyAC

Added subscriber: @TroyAC

Seems like users should be given the option to use pre-filtered shadow maps. Like Mustafa said, it is less photorealistic, but some things like NPR "cell-shaded" style, getting shadows that are one shade is the stylistic convention.

Seems like users should be given the option to use pre-filtered shadow maps. Like Mustafa said, it is less photorealistic, but some things like NPR "cell-shaded" style, getting shadows that are one shade is the stylistic convention.
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
9 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#70906
No description provided.