# My shadows are inaccurate and my SkyLights it's not working

**URL:** <https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039>\
**Category:** Rendering\
**Tags:** skylight, Shadows, lightning, unreal-engine, question\
**Created:** [July 12, 2020, 2:17am UTC](https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039 "2020-07-12T02:17:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![WirFTW](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WirFTW](https://forums.unrealengine.com/u/WirFTW)\
**Post date:** [July 12, 2020, 2:17am UTC](https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039/1 "2020-07-12T02:17:01Z")

</div>

I have some meshes, i model one in blender and the other one it’s made using unreal engine cubes, but the shadows are so inaccurate on both of them, both of them are touching the floor and there’s no shadow, i also have a skylight but it its not working, only work if i change the mobility from stationary to movable, it its so extrange i have checked the “Affects World” option, any suggestion?

Looks like this:

 ![306904-captura-de-pantalla-1176.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/0/fd077ab16ebd21f8dfd07fd0ffadc6bdc33b8c59.jpeg)

But should look like this:

 ![306905-captura-de-pantalla-1178.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/8/fd88e7efb5ea29b037073dc1bdaf444d770aa995.jpeg)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 12, 2020, 11:04am UTC](https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039/2 "2020-07-12T11:04:51Z")

</div>

If you’re using static lighting ( static or stationary ) you have to increase the resolution of your landscape ( to something like 8 or 16 ):

![306919-res.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/2/1/f2184ed3572d94bb211f7d62db1821a05c5a7034.jpeg)

Another, much easier option is to use a stationary directional light and skylight, and on the directional light set ‘dynamic shadow distance stationary light’ to about 1200.

That way, you get static shadows everywhere on your map except near the player, which looks better.

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [July 12, 2020, 2:59pm UTC](https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039/3 "2020-07-12T14:59:27Z")

</div>

Is “Generate Mesh Distance Fields” enabled in the project settings (under Rendering)?  
What are the skylight’s settings (base and lighting)?

It appears that the Shadow Bias is not set to a correct value. That’s in the directional light, and could also be Shadow Slope Bias (both are default of 0.5…so try increasing first, then decreasing below 0.5 if it doesn’t work).

---

<div class="post-metadata">

**Author:** ![WirFTW](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WirFTW](https://forums.unrealengine.com/u/WirFTW)\
**Post date:** [July 12, 2020, 9:55pm UTC](https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039/4 "2020-07-12T21:55:08Z")

</div>

I activate it but nothing happend’s after restart, my sky light settings are the default values

---

<div class="post-metadata">

**Author:** ![WirFTW](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WirFTW](https://forums.unrealengine.com/u/WirFTW)\
**Post date:** [July 12, 2020, 10:00pm UTC](https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039/5 "2020-07-12T22:00:35Z")

</div>

Im not using a landscape, im using a custom mesh, and i dont have that option 😕

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [July 12, 2020, 10:45pm UTC](https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039/6 "2020-07-12T22:45:28Z")

</div>

Shadow Bias and Slope Bias didn’t work either? Open the tree meshes in the mesh editor, expand LOD0 \> Build Settings, and scroll down to “Generate Two-Sided Distance Field Mesh”. Enable it, and wait for it to generate…then see it in viewport (not the mesh editor preview window).

It could be something in the custom mesh that is used as the land. Perhaps it doesn’t have a setting for receiving shadows active. You’ll need to post more information about that custom mesh and the lighting setup to get proper help. There’s a number of things that can cause shadows not to render.

---

<div class="post-metadata">

**Author:** ![WirFTW](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WirFTW](https://forums.unrealengine.com/u/WirFTW)\
**Post date:** [July 13, 2020, 12:11am UTC](https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039/7 "2020-07-13T00:11:48Z")

</div>

Its a simple mesh, and sometimes i open the project the shadow is correct and sometimes not, i dont know why, but there’s a video showing all the stuff, the main important thing it’s about the skylight, because make’s the game look’s so bad.

[link text](https://youtu.be/kfoG_heoyHk)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 13, 2020, 7:12am UTC](https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039/8 "2020-07-13T07:12:24Z")

</div>

You can increase the lightmap density on the mesh then.

---

<div class="post-metadata">

**Author:** ![WirFTW](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WirFTW](https://forums.unrealengine.com/u/WirFTW)\
**Post date:** [July 13, 2020, 7:44am UTC](https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039/9 "2020-07-13T07:44:25Z")

</div>

I just figured it, the problem was the material i was using, so i examined it and i disable the ambient occlusion channel and all look’s fine again… Thanks you anyways 😃

 ![307035-captura-de-pantalla-1184.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/4/5/f4582f785f258712a14741457bdaea59db21c447.jpeg)

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [July 13, 2020, 2:18pm UTC](https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039/10 "2020-07-13T14:18:39Z")

</div>

the ambient occlusion channel in Blender? or the one in Unreal Engine? so it was the ambient occlusion of the terrain mesh?

---

<div class="post-metadata">

**Author:** ![WirFTW](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WirFTW](https://forums.unrealengine.com/u/WirFTW)\
**Post date:** [July 13, 2020, 8:25pm UTC](https://forums.unrealengine.com/t/my-shadows-are-inaccurate-and-my-skylights-its-not-working/468039/11 "2020-07-13T20:25:13Z")

</div>

![307121-captura-de-pantalla-1186.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/6/7e6ead648996fc74a7f2dc2a9a902ad0dcf65986.jpeg)

The ambient occlusion channel on my unreal engine material, that was the problem causing the darker shadows, so weird… i delete it and now the shadows are correct and affected by skylight (It’s a reusable material from other project, but i dont really need the AO channel, so i deleted it)
