Skip to content
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

Incorrect GridMap behavior with baked shadows #46231

Closed
SkanerSoft opened this issue Feb 19, 2021 · 8 comments
Closed

Incorrect GridMap behavior with baked shadows #46231

SkanerSoft opened this issue Feb 19, 2021 · 8 comments
Assignees
Milestone

Comments

@SkanerSoft
Copy link

SkanerSoft commented Feb 19, 2021

Godot version:
3.2.4 RC 2

OS/device including version:
Develop in Windows, Run in Android

Issue description:
GridMap objects react to both lighting and baked shadows, creating image imbalance and difficulty adjusting shadows.
Feels like they are baked and dynamically receive shade at the same time.

Steps to reproduce:

  1. Create a Project
  2. Import 3D models (or create MeshInstances)
  3. Create MeshLib from pack of models
  4. Create a scene with GridMap and regular objects
  5. Add DirectionalLight (or another)
  6. Add BackedLightmap node
  7. Backed Shadows
  8. Try to adjust the shadows for dynamic objects

My simple project

Full Scene
Image 001

Settings for MeshLib objects
Image 002

Settings for regular objects
Image 003

My GridMap node
Image 004

Settings DirectionalLight
Image 005

Settings for BackedLightmap
Image 006

GridMap behavior when setting lighting AFTER baking
2021-02-19-21-15-53

Minimal reproduction project:
shadows_test.zip

@Calinou
Copy link
Member

Calinou commented Feb 19, 2021

It looks like #41629 isn't applying to GridMaps?

cc @JFonS

@SkanerSoft
Copy link
Author

Also, I noticed that when turning off Shadows to Directional Light, the GridMap objects start to flicker on my device.
No errors or warnings, just flickering.
When the shadows are turned on, the flickering disappears, but the GridMap objects become too dark where the shadow falls on them, as they receive it.

456.mp4

@Calinou
Copy link
Member

Calinou commented Feb 19, 2021

Also, when you're using the All bake mode for a given light, you're kind of giving up on using shadows for dynamic objects. This is a difficult-to-solve problem that should be discussed in a proposal.

If you want to keep shadows for dynamic objects, a good compromise is to use the Indirect bake mode for your DirectionalLight and the All bake mode for everything else. This is similar to what games like CS:GO do. Alternatively, set up a blob shadow system for your dynamic objects so they can still feel "grounded" somehow.

@SkanerSoft
Copy link
Author

SkanerSoft commented Feb 19, 2021

Also, when you're using the All bake mode for a given light, you're kind of giving up on using shadows for dynamic objects
@Calinou

Sorry, I meant shading objects, not just shadows)
It's just that the GridMap becomes too light when the light source is turned on, since it is both baked and receives light. And if you turn off the shadows, then on my Android objects start to flicker. I attached the video above.

@NHodgesVFX
Copy link
Contributor

NHodgesVFX commented Feb 20, 2021

Also, when you're using the All bake mode for a given light, you're kind of giving up on using shadows for dynamic objects. This is a difficult-to-solve problem that should be discussed in a proposal.

Isnt shadowmasking and distance shadowmasking the exact solution to this problem, granted it would need to be added to godot, So i guess that would make a good proposal.

@Calinou
Copy link
Member

Calinou commented Feb 20, 2021

Isnt shadowmasking and distance shadowmasking the exact solution to this problem, granted it would need to be added to godot, So i guess that would make a good proposal.

It is, but I doubt it'll be implemented in Godot anytime soon given the added complexity.

Edit: See also godotengine/godot-proposals#2354.

@JFonS JFonS self-assigned this Feb 21, 2021
@SkanerSoft
Copy link
Author

Still wrong in RC 3.

@akien-mga
Copy link
Member

Fixed by #46590.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants