-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shadows broken with orthogonal camera in 3d both in editor and in game #78422
Comments
It looks like the shadow is picking a different LOD stage than the mesh. |
The shadow texel density appears lower in the editor because the editor camera's default Z Far value is 4000. If you decrease it in the View settings at the top of the 3D editor viewport, shadows with an orthogonal camera should look better.
This is actually desired in many cases. The issue is that it's picking a stage that is way too low given the amount of pixels it takes on the shadow map. |
Posting this here for documentation sake: Many people who come new to Godot seem to have a problem with the Shadow Mesh showing a different LOD than the visible Mesh. https://www.reddit.com/r/godot/comments/170wqon/weird_shadows_in_godot_3d_tutorial/ It is about shadow geometry LOD, not shadow texture LOD, so I wonder if it is related to this issue here. Also the description of the Shadow Mesh in the import tab states that Shadow Mesh is currently supposed to always have the same LOD as the visible Mesh. Which does not seem to be true here. |
This issue was confirmed on 4.2.1 in https://forum.godotengine.org/t/shadows-look-bad-in-orthogonal-view-and-decreasing-far-clipping-doesnt-work/50166. |
Not sure this helps, but I too was following the standard 3D tutorial and wound up with almost the exact thing as in the screenshot above, the orange 3D model has a boxy shadow. I tried to disable the LOD generation for the import by editing the .import file directly and setting However, I went into my DirectionalLight3D > Directional Shadow and changed Pancake Size from 20 to down to 4 and boom - shadow is properly round 🤷♂️ |
Godot version
v4.0.2.stable.official [7a0977c]
System information
Windows 10 (Version 10.0.19045 Build 19045) - Forward+ - Intel Core i7-7700K CPU - NVIDIA GeForce RTX 3080 (driver version 536.23)
Issue description
Orthogonal camera in editor:
With the perspective camera:
I would expect the shadow to be of the same quality whether in perspective or orthogonal camera
Cinematic view orthogonal camera:
This screenshot uses a camera further away to show that the LOD used to generate the shadow break the shadow.
Steps to reproduce
Use the orthogonal camera.
Minimal reproduction project
MinimalProject.zip
The text was updated successfully, but these errors were encountered: