Why the shadows appear wavy?

Hey devs,

I’ve a simple level setup to test out lighting. It consists of a stationary directional light, a cube as the floor and a test building mesh.

Whenever I build light in my level which is set to production quality. My shadows are getting distorted and wavy.

Before Light Build

After Light Build

LightMap Resolution for both the building and the floor is 64.

Directional Light is at default setting except for the intensity, which is set to 5.

The result is same for a simple cube as well. Below are the results



Why is this happening? How can I fix this?



Resolution of Lightmap 64 is very low. Try to increase it to 256 or higher.

Both objects has Lightmap 64

Both objects has Lightmap 256

If you have more questions about lights and shadows, that please read this troubleshooter.

@svv3dUDN Thanks man…It worked…but I want this for a mobile game…will it be ok to have a lightmap resolution of 256?

It might not affect the performance as the shadows are static.

The answer is definitely the lightmap resolution but here’s a slide show that I made to demonstrate what is actually causing the problem and a solution:

Short answer is; Your “floor mesh” is just too large for a low res lightmap. Scale the mesh down to 1/4 the size and then build it out of 16 meshes instead (4x4). You should always build your levels out of several smaller static meshes instead of scaling meshes to fill the entire scene. As you scale a mesh up, it requires a higher lightmap resolution to give you the same visual fidelity. The higher lightmap resolution will affect performance on mobile more than instancing your floor mesh will.

I’d like to point out one more thing these answers are not covering. 64 resolution lightmap will NOT produce wavy shadows! The problem is as TorQueMoD pointed out the floor. If you’re using landscape, be sure to set ITS light resolution to something higher, like 8 (8 means 64 because in landscape it’s 8x8, you can read it in the tooltip). Just select it in the viewport and edit it in its details.