Niagara: map a color curve to the normalized particle's ID

Hello, how can I map a color curve to the normalized particle’s ID?
I’ve made my particles be a source for some ribbon particles, and I’d like the ribbons to derive their color from the ribbonID using color lookup from a color curve.
Is there any tutorials or documentation that could explain how this could be done?

thanks to discord user Gleurk#1395 for the in depth response:

for the random color based on the RibbonID, it’s not to complicated

here is how I set up this kinda of stuff:

First the color setup:

**

**

I’m using a Curve For Color that allow me to have a nice way friendly way to handle my colors variation and spreading

This curve from Color need and “curveIndex” float. A 0 value will pick the color on the extreme left while a value of 1 will fget a color from the extreme right

by default this curve Index is using the “NormalizedAge”, I replace this by a dynamic input “Uniform Range” which byu default give me a random value between 0-1

**

**

**

**

from there the random color is per particle and we want it to by by Ribbon

so let’s check the 'randomness Mode" and set it to "deterministic"

**new option appears that we will check:

**

**

**
Now we get a rand color based on this "Random seed " value

We need to put or RibbonID into this “random Seed”, but the RibbonId is not an “Int” type attribute

so we need to convert RibbonId to an “Int” first

this is also pretty straightforwar

I didn’t find any dynamic input that we doing this so let’s create or own…

**

**

we just need a "convert " tso that we can use the “Index” of the RibbonId"

**

**

In the Random Seed I’ve set my new custom “dynamic input” which need me to input a “NiagaraID” type and will convert it to an "Int"

and Voila:

**

**
Hope it was that I didn’t put too much detail as it can sometime be confusing…

And there’s maybe way simpler way that this …

I just like to get this nice color gradient…

3 Likes