I’m using a Curve Atlas to apply colour to a couple different components in my Blueprint - a particle emitter and a mesh. Both of those components are sampling the same curve from the atlas.
The part that I’m struggling with a bit is how to switch the active curve on the components in the BP (eg. some placed instances of this BP I want to choose to sample a red curve from the atlas, others a blue curve from the atlas, etc.).
I’ve found that I can use a SetScalarParameter on a Material Instance Dynamic of the two different materials (for the particles and for the mesh) and can successfully change the curve selection that way, but it’s pretty finnicky to find the exact right spot in the range that determines a proper “selection” of one curve (if you’re off by a little you’ll get a blend of two different curves), so I’m wondering if there is a better way to select specific curves from the atlas instead of estimating with float values? Maybe there is some existing functionality that has eluded me.
I’ve tried digging around a bunch online and have found some tidbits here and there, but nothing that has lead me to where I’m trying to go. I guess because the Curve Atlas system is fairly newish.
Wasn’t sure if this would be better asked in Rendering or Blueprints…
Anyways, thanks for any help!
Edit 01 -
I suppose it’s worth pointing out that I don’t even really need this BP to have a “dynamic” material, as the colours wont change during play. I just need the ability to change the colours based on different instances of the BP (red one, blue one, etc.), but using the MID was just the way I ended up getting some results. Perhaps I can do what I need in the construction script instead.