# How to edit particles by distance from array of edgess

**URL:** <https://forums.unrealengine.com/t/how-to-edit-particles-by-distance-from-array-of-edgess/485648>\
**Category:** FX\
**Tags:** particle-systems, unreal-engine, question\
**Created:** [July 2, 2021, 12:05am UTC](https://forums.unrealengine.com/t/how-to-edit-particles-by-distance-from-array-of-edgess/485648 "2021-07-02T00:05:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Polymorphodic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Polymorphodic](https://forums.unrealengine.com/u/Polymorphodic)\
**Post date:** [July 2, 2021, 12:05am UTC](https://forums.unrealengine.com/t/how-to-edit-particles-by-distance-from-array-of-edgess/485648/1 "2021-07-02T00:05:35Z")

</div>

So I am trying to create a frost effect using the niagara particle system. To do this I want particles to cluster near the sharp edges of a mesh. Currently I can get and array of all of the edges and calculate their angle (sharpness).

What I have tried:

1. Passing the edge data in some way to a material to diffuse particle opacity by distance to the nearest edge.

- Problem: cant pass arrays of loop through them in the material editor, and it would probably be very expensive if you could

1. Creating a procedural mesh that is effectively where I want the particles to spawn.

- Problem: you cannot convert a procedural mesh to static mesh at runtime, and you cannot use a procedural mesh for particle placement.

So right now my current running idea is to spawn the particles on the original mesh and edit their opacity as a function of distance from the nearest edge.

I have no idea how to do this however so any help or other ideas on how I can create this effect would be much appreciated.
