Jump to content

Shadow glitch


Recommended Posts

Intended behaviour, unfortunately. The engine stretches the visible objects so they fill as much of the shadowmap as possible (to get better quality shadows), but doesn't account for terrain while doing so. The result is that shadows from terrain aren't rendered unless that terrain falls within the bounding box of objects on screen. By moving that building around, you're forcing the bounding box to be expanded, so part of a cliff falls inside that bounding box.

It's easy to reproduce in Atlas. Make an empty map, set the sun elevation to a low value and create a tall mountain. No terrain shadows will appear. Then pick an object and place it on the north-east side of the mountain. Create a second object and place it on the south-west side; move it around. You'll notice that only the parts of the terrain between the two objects will cast shadows.

This is part of what causes the problem that Pureon mentioned (The other part is that the engine does the visibility culling in the simulation (not at all thread-friendly design, mind you), and it does it by eliminating everything that isn't visible from the main camera, thus the renderer doesn't know about things that may cast shadows/reflections once they go off screen).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...