-
-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Describe the project you are working on
3D scenes
Trying to help out community members with the look of their project
Describe the problem or limitation you are having in your project
As I was trying to help NeZvers to improve the looks of his car project, I could not help but get annoyed by this apparent disruption in the shadow. This almost looks like a tearing issue in full screen:
car_shadows_shadow_quality.mp4
It reminded me having seen this many times before, not only in my projects, but also in other community members projects and demos (for instance in Arnklit's WaterWays Demo),
It seems to be a threshold distance after which Godot uses a lesser quality shadow quality. Right now there seems to be no way to adjust the distance where this threshold should occur or if it should occur at all. The only workaround I found is by adjusting the far and near plane of the camera. However this seems very counter intuitive: While reducing the far plane will bring the threshold distance closer to the camera (expected), increasing the far plane beyond the default value of 100 will not bring this threshold distance any further away from the camera (unexpected). Instead increasing the near plane (but only slightly, 4-6 worked well in this scene) will push this threshold distance out of camera frustum. (very counter intuitive)
Imho this should have nothing to do with near and far planes. Those are meant for clipping. It took me ages to figure out how to adjust this at all because I would have never considered looking at the near and far planes. And even when I did (increasing the far plane), nothing changed.
Because this behaviour is so weird and counter intuitive, and imho should not be adjusted with the near and far plane settings at all in the first place, I was not sure if this should not be reported as bug. But I guess this proposal would be an enhancement, so there you go ...
Here is a zip with the project (made by NeZvers, plus some visual improvements by me), if anyone wants to play around with the near and far planes to see the effect. (It's much easier to see fullscreen and without video compression)
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Expose a separate setting for this feature and remove it's current counter intuitive and hard to adjust correlation with the camera near and far planes.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
a property like "shadow_quality_threshold_distance" expecting a float value. I don't know the details of how this feature currently works, so it's hard for me to make a recommendation.
The next step would be to give it a reasonable default setting, one that won't make it appear right in the middle of a simple almost empty scene. Meaning if a beginner creates their first scene, they should not be confronted with something that looks like a bug or some rendering issue.
If this enhancement will not be used often, can it be worked around with a few lines of script?
I tried to find anything in the docs and project settings, but could not find anything.
Is there a reason why this should be core and not an add-on in the asset library?
It's about an already existing feature that makes Godot look bad because it looks like a visual bug on first glance, strikes through the middle of a scene and the only way to adjust it is through setting that are responsible for something else entirely.