# Gradient color particles spawning from mesh?

**URL:** <https://forums.unrealengine.com/t/gradient-color-particles-spawning-from-mesh/1813028>\
**Category:** FX\
**Tags:** unreal-engine, question\
**Created:** [April 20, 2024, 7:57pm UTC](https://forums.unrealengine.com/t/gradient-color-particles-spawning-from-mesh/1813028 "2024-04-20T19:57:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dannyHusk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dannyHusk](https://forums.unrealengine.com/u/dannyHusk)\
**Post date:** [April 20, 2024, 7:57pm UTC](https://forums.unrealengine.com/t/gradient-color-particles-spawning-from-mesh/1813028/1 "2024-04-20T19:57:33Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/d/a5d6541d169807de9a24455b6732574846ab8a6f.jpeg)

Basically i’d like to have a gradient of colors that starts at the bast of my mesh. For the life of me I can not figure out how to do this though?

---

<div class="post-metadata">

**Author:** ![EliasWick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eliaswick/32/1175208_2.png) [@EliasWick](https://forums.unrealengine.com/u/EliasWick)\
**Post date:** [April 27, 2024, 2:31pm UTC](https://forums.unrealengine.com/t/gradient-color-particles-spawning-from-mesh/1813028/2 "2024-04-27T14:31:15Z")

</div>

Depending on how you have setup the character, you can use the texture coordinates first channel to get a vertical gradient:

 ![bild](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/8/c48bf0958141435050e167ec2061deac6cd31828.png)  
 ![bild](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/a/8/6a87e001bbb2ad3d4255ae01436f1283d9b24c9a.jpeg)

You can lerp two colors with the output to color the gradient:  
 ![bild](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/3/263127718fb6228de8f1c35c71582a97600ca9dc.png)  
 ![bild](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/4/8/b484704f4dd0e960e4d8f11e19a18b43e47f369e.jpeg)

The best solution would be to use pre-skinned location with a divide to smooth out the gradient.

 ![bild](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/c/62c6fc26428b4b00a06089bd1fb7d3b6f9dc74ae.png)  
 ![bild](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/b/f/ebfe4c413cc79cba3d6d23fcc68cd18668c8de3e.jpeg)

With the color data setup, simply create an effect [like this](https://www.youtube.com/watch?v=c6e2NXWdMHo&list=PLNTm9yU0zou6u9sbmY1xyVMx-g2vj_SUG).

Best of luck mate! 🙂
