# Distance Field AO is completely black underground

**URL:** <https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940>\
**Category:** Rendering\
**Tags:** distance-field-ambie, unreal-engine, bug-report, Lighting, question\
**Created:** [June 24, 2015, 11:04pm UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940 "2015-06-24T23:04:03Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshezzell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@joshezzell](https://forums.unrealengine.com/u/joshezzell)\
**Post date:** [June 24, 2015, 11:04pm UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940/1 "2015-06-24T23:04:03Z")

</div>

Hey,

Our game is an open world title. We have many caves that go beneath our landscapes surface. Distance field AO looks fantastic as long as we stay above ground. If we go into our cave though, the AO goes completely pitch black and looks really ugly. We are counting on 4.9 and the much increased performance that DFAO will have, but it worries me that it will be completely pointless if we can’t use it because of this bug.

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [June 25, 2015, 2:09pm UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940/2 "2015-06-25T14:09:12Z")

</div>

Hi Josh,

I’ve reported this with UE-17667. This may be a limitation of the system rather than a bug, but still good to report either way. I’ll update when I have more information.

Thank you!

Tim

---

<div class="post-metadata">

**Author:** ![joshezzell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@joshezzell](https://forums.unrealengine.com/u/joshezzell)\
**Post date:** [February 18, 2016, 10:13pm UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940/3 "2016-02-18T22:13:31Z")

</div>

I reposted about this issue (forgot I made this post).

Again, I am encountering the issue.

"I have had this issue before, but only when meshes were under a landscape piece. You can see what is happening here: [http://grab.by/OeXG](http://grab.by/OeXG)

Is this a known limitation of DFAO? If it is, it makes the feature practically useless for open world projects with caves and other features that intersect with landscapes.

EDIT: I should note that if I delete the landscape the cave entrance is sitting on, the DFAO goes back to normal."

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [February 18, 2016, 10:30pm UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940/4 "2016-02-18T22:30:55Z")

</div>

The bug is still backlogged at the moment, but there is a workaround that comes at the cost of later optimizations that have come in for DFAO and Distance Fields in general.

This particular issue is caused by the Global Distance Field that is used to combine distance fields to make them more efficient. You can revert to the older method by using the CVar `r.AOGlobalDistanceField 0`

---

<div class="post-metadata">

**Author:** ![joshezzell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@joshezzell](https://forums.unrealengine.com/u/joshezzell)\
**Post date:** [February 18, 2016, 10:35pm UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940/5 "2016-02-18T22:35:34Z")

</div>

Ok, so there are plans to fix this in the future then. Is there an idea of when this would be done?

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [February 19, 2016, 3:52pm UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940/6 "2016-02-19T15:52:55Z")

</div>

It’s backlogged which means it’s just indefinitely on hold until it’s added to the “To Do” list in planning phases or there is an immediate need for it internally.

This will likely be fixed in the future, but with the current task priorities It’s not at the top of the list.

---

<div class="post-metadata">

**Author:** ![riuthamus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/riuthamus/32/609841_2.png) [@riuthamus](https://forums.unrealengine.com/u/riuthamus)\
**Post date:** [March 26, 2018, 4:34pm UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940/7 "2018-03-26T16:34:35Z")

</div>

This is still a confirmed bug in 4.19, I guess not enough games make caves? … like… for real?

---

<div class="post-metadata">

**Author:** ![Deathrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deathrey](https://forums.unrealengine.com/u/Deathrey)\
**Post date:** [March 26, 2018, 10:47pm UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940/8 "2018-03-26T22:47:19Z")

</div>

PR with a potential fix: [https://github.com/EpicGames/UnrealEngine/pull/4603](https://github.com/EpicGames/UnrealEngine/pull/4603)

Before/After the change:

> **[UE4 limit DFAO under landscape - Imgsli](https://imgsli.com/MTI5OQ)**

Shader edit only. Does not require source build.

---

<div class="post-metadata">

**Author:** ![tsnodgrass](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tsnodgrass](https://forums.unrealengine.com/u/tsnodgrass)\
**Post date:** [March 27, 2018, 12:46am UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940/9 "2018-03-27T00:46:17Z")

</div>

link on github doesn’t seem to work, what are the steps needed to implement this?

---

<div class="post-metadata">

**Author:** ![Deathrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deathrey](https://forums.unrealengine.com/u/Deathrey)\
**Post date:** [March 27, 2018, 6:18pm UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940/10 "2018-03-27T18:18:35Z")

</div>

Gotta have a linked account.

---

<div class="post-metadata">

**Author:** ![Haoris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haoris](https://forums.unrealengine.com/u/Haoris)\
**Post date:** [June 7, 2018, 2:46am UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940/11 "2018-06-07T02:46:20Z")

</div>

This has no effect (4.19.2)

---

<div class="post-metadata">

**Author:** ![Dark\_Shift\_Productions](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dark\_Shift\_Productions](https://forums.unrealengine.com/u/Dark_Shift_Productions)\
**Post date:** [October 19, 2019, 10:41pm UTC](https://forums.unrealengine.com/t/distance-field-ao-is-completely-black-underground/322940/12 "2019-10-19T22:41:26Z")

</div>

I can confirm the fix works great in 4.23! My cave systems are now viable with distance field effects again!
