# How can distance fields influence particle collisions?

**URL:** <https://forums.unrealengine.com/t/how-can-distance-fields-influence-particle-collisions/319983>\
**Category:** Rendering\
**Tags:** gpu-particles, distance-fields, unreal-engine, Rendering, question\
**Created:** [May 28, 2015, 6:59am UTC](https://forums.unrealengine.com/t/how-can-distance-fields-influence-particle-collisions/319983 "2015-05-28T06:59:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PixelOmen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PixelOmen](https://forums.unrealengine.com/u/PixelOmen)\
**Post date:** [May 28, 2015, 6:59am UTC](https://forums.unrealengine.com/t/how-can-distance-fields-influence-particle-collisions/319983/1 "2015-05-28T06:59:11Z")

</div>

Hi Answerhub,

I recently came across a couple of videos showcasing how distance fields can be used for full scene GPU particle collisions.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/7/4/774ab5963ccc2e745ed64c30af77529dd4ed31c6.jpeg "Snow: Scene GPU Particle Collision with Signed Distance Fields | Feature Highlight | Unreal Engine") ](https://www.youtube.com/watch?v=Z-2e8j0t0Ww)

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/a/9ba7c439d4da4a6c6fa9a6f0a581f8f41236ed7d.jpeg "Sparks: Scene GPU Particle Collision with Signed Distance Fields | Feature Highlight | Unreal Engine") ](https://www.youtube.com/watch?v=3YH8oTzSQwY)

I’ve seen how distance fields can create dynamic AO and soft shadows (which can be enabled by checking a few check boxes.from what I understand) but I’m really confused about what distance fields actually are and, more specifically, how to implement them in a way that somehow influences GPU particle collisions.

Distance fields seem like a very powerful concept/tool, but I’m having some trouble wrapping my head around them, so any insight would be hugely appreciated. Thanks.

---

<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:** [May 28, 2015, 6:00pm UTC](https://forums.unrealengine.com/t/how-can-distance-fields-influence-particle-collisions/319983/2 "2015-05-28T18:00:23Z")

</div>

Hi PixelOmen,

You’ll want to start by taking a look at the documentation for **[DFAO](https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/DistanceFieldAmbientOcclusion/index.html)** and **[Distance Field Shadows](https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/RayTracedDistanceFieldShadowing/index.html)**.

The DFAO page will cover move so about how the system works and how the Distance Field Meshes are generated.

Distance fields can be used for a number of things are not limited to just shadow or ambient occlusion support.

By using the generated mesh for the distance field this can be used as a collision base for the particle system, as demonstrated in the videos linked above.

If you find you still have questions after reading through the documentation please let me know. I’m more than happy to help. 🙂

Tim

---

<div class="post-metadata">

**Author:** ![PixelOmen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PixelOmen](https://forums.unrealengine.com/u/PixelOmen)\
**Post date:** [May 28, 2015, 6:14pm UTC](https://forums.unrealengine.com/t/how-can-distance-fields-influence-particle-collisions/319983/3 "2015-05-28T18:14:56Z")

</div>

Hi Tim, yes I’ve seen both of those docs, what I’m unclear about is how to access the distance fields directly, for example in particle system collisions.

In DFAO and shadwos, distance fields are simply enabled and more or less work automatically, is it a similar process for particle collisions?

---

<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:** [May 28, 2015, 6:28pm UTC](https://forums.unrealengine.com/t/how-can-distance-fields-influence-particle-collisions/319983/4 "2015-05-28T18:28:12Z")

</div>

This has actually only recently been introduced. It should be in 4.9.

It’s such a new implementation there isn’t a lot of documentation aside from an internal email at the moment.

To enable the collision of the distance fields mesh for your particles though you should have a drop down in the collision module of the particle system where you can now select “Distance Field” as the collision mode.

There will be more information and documentation coming, but no specific ETA.

---

<div class="post-metadata">

**Author:** ![PixelOmen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PixelOmen](https://forums.unrealengine.com/u/PixelOmen)\
**Post date:** [May 28, 2015, 6:32pm UTC](https://forums.unrealengine.com/t/how-can-distance-fields-influence-particle-collisions/319983/5 "2015-05-28T18:32:21Z")

</div>

Oh I see. I thought it was simply another use for the feature as it currently exists. That makes more sense. Thanks for the info.

---

<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:** [May 29, 2015, 4:57pm UTC](https://forums.unrealengine.com/t/how-can-distance-fields-influence-particle-collisions/319983/6 "2015-05-29T16:57:05Z")

</div>

We actually just posted the latest Engine Weekly News that has this detailed a little bit more along with some other cool stuff coming to the engine.

> **[Engine Features Preview 5/29/2015](https://forums.unrealengine.com/showthread.php?71415-Engine-Features-Preview-5-29-2015)**
>
> We’re excited to share a few of the new features now available on the Master branch on GitHub. To be able to try out these new features, you will need to download the source code for the Master branch and build the Engine yourself. For more...

All this information is taken from the internal email I had previously mentioned.
