# Artifacting when using Mesh Distance Fields

**URL:** <https://forums.unrealengine.com/t/artifacting-when-using-mesh-distance-fields/487542>\
**Category:** Asset Creation\
**Tags:** distance-field-ambie, distance-fields, unreal-engine, question\
**Created:** [August 17, 2021, 2:16am UTC](https://forums.unrealengine.com/t/artifacting-when-using-mesh-distance-fields/487542 "2021-08-17T02:16:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![misolf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@misolf](https://forums.unrealengine.com/u/misolf)\
**Post date:** [August 17, 2021, 2:16am UTC](https://forums.unrealengine.com/t/artifacting-when-using-mesh-distance-fields/487542/1 "2021-08-17T02:16:12Z")

</div>

I am trying to use Mesh Distance Fields to change the color of a mesh as it intersects with another mesh (I.E.: Make a rock transition into the texture of the soil when it intersects with the soil). However, I keep getting those weird artifacts (See image). Does anyone know what’s going on? You can see my setup for this example below (I’m just using flat black and flat white for this).

I found this technique in the Materials Master Learning tutorial, in case anyone’s curious:

> **[Epic Developer Community](https://dev.epicgames.com/community)**
>
> The Epic Developer Community offers announcements, tutorials, showcase projects, forums and learning materials. Read about the latest developments.

Thank you!

 ![346501-artifact.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/7/a/d7a54b078d80e6a23fdd1c4bba8ed024edc75884.png)

 ![346502-setup.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/5/5e58632211a1233850b770809b4369a23b0612ff.png)

---

<div class="post-metadata">

**Author:** ![Stigel\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stigel\_1](https://forums.unrealengine.com/u/Stigel_1)\
**Post date:** [August 18, 2021, 9:03am UTC](https://forums.unrealengine.com/t/artifacting-when-using-mesh-distance-fields/487542/2 "2021-08-18T09:03:49Z")

</div>

This happens because the mesh it’s sampling itself. Select the object and disable “Affect distance field lighting” And you’re done.

![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/b/34beb673b3877c86f76a6af2778b1f85e8946dd2.jpeg)

---

<div class="post-metadata">

**Author:** ![misolf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@misolf](https://forums.unrealengine.com/u/misolf)\
**Post date:** [August 19, 2021, 5:04pm UTC](https://forums.unrealengine.com/t/artifacting-when-using-mesh-distance-fields/487542/3 "2021-08-19T17:04:00Z")

</div>

You have saved my life, thank you!

---

<div class="post-metadata">

**Author:** ![K9Cubed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/k9cubed/32/915896_2.png) [@K9Cubed](https://forums.unrealengine.com/u/K9Cubed)\
**Post date:** [November 2, 2021, 4:41pm UTC](https://forums.unrealengine.com/t/artifacting-when-using-mesh-distance-fields/487542/4 "2021-11-02T16:41:14Z")

</div>

Would you take my hand in marriage?
