0 votes

Hey everyone,

I was experimenting with 3d lighting and having this issue. I have a directional light and a long tunnel, that is supposed to be completely dark. The end of the tunnel wasn't dark so I increased Max Distance in the Directional Shadow property on the Directional Light.

However this only seems to work in the editor, not in the actual view from the camera. Am I missing something here?

editor view

camera view

Godot version 3.3.2
in Engine by (29 points)

1 Answer

+1 vote
Best answer

This is because DirectionalLight's maximum shadow distance is clamped by the camera's Far clip distance. Increase the Camera's Far property to a value like 4000 solve the issue. If you get Z-fighting in the distance, increase the Near property as well (try 0.1 or even 0.2).

In Godot 3.x, Far clip distance values above 4000 may break SSAO rendering and are not recommended.

by (12,869 points)
selected by

Ahh I see. I tought I tried changing the camera properties but looks like I somehow missed it.
Much appreciated, thanks.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.