Godot: Shadows missing in 2.1.1

Created on 19 Nov 2016  路  8Comments  路  Source: godotengine/godot

Operating system or device - Godot version:
Godot 2.1.1, tested this on Mac OS X 10.11, tested after this was mentioned on Facebook

Issue description (what happened, and what was expected):
Shadows seem to be missing in 2.1.1 while they still work in 2.1

Steps to reproduce:
I created a simple scene with two Testcubes. Enlarged one to become a ground. Added a directional light and spotlight. Turned shadows on.
In 2.1 I get shadows, in 2.1.1 no shadows.

Link to minimal example project (optional but very welcome):
https://dl.dropboxusercontent.com/u/98707/TestScene.zip

bug confirmed core

Most helpful comment

From what I see there's no regression, the shadow panel for the directional light has a field titled _Max Distance_ (which controls just how far from the camera they can be calculated, anything further will not have shadows).

The issue is that it looks like the default value is 0 (so everything is too far away to receive shadows). It may be just a matter of changing it to some high number just to be safe (people who want to optimize their scene by keeping it as small as possible can change it).

All 8 comments

Confirmed, and the regression also affects the master branch.

Regression introduced in the master branch by 0b12ebb (and f63b338 in the 2.1 branch).

@SaracenOne Before I merged #1991 you mentioned that it worked fine for you in a shadow-heavy scene. Could you have a look at what causes the regression here, and whether we should just revert or if you can fix the issue?

From what I see there's no regression, the shadow panel for the directional light has a field titled _Max Distance_ (which controls just how far from the camera they can be calculated, anything further will not have shadows).

The issue is that it looks like the default value is 0 (so everything is too far away to receive shadows). It may be just a matter of changing it to some high number just to be safe (people who want to optimize their scene by keeping it as small as possible can change it).

Indeed, the max distance does the trick for me for the directional light.

How about the shadow cast for the spotlight? When I turn the directional light off the spotlight beautifully illuminates the cube in the center, but not the large cube I put in as a ground (unless its determined the entire ground is in shadow).

I can't find (but may be overlooking) the max distance.

I think a default value of zero is going to catch a lot of people unawares, it doesn't stand out much and very often zero is associated with not setting a value at all. It would probably make sense to give it at least some value, even a low conservative one.

Still counts as a bug, then. What would be a good default value?

I'd be tempted to revert the commit in the 2.1 branch to keep things working as they were in 2.1-stable, and we can work on setting a safer default in the master branch (though this stuff will be obsoleted by the new renderer anyway I think), WDYT?

this is obsolete now, closing

Was this page helpful?
0 / 5 - 0 ratings