Random UV flip at spawn in Niagara

I found this Unreal Engine forum thread asking how to randomly flip the UVs of particles at spawn in Niagara. I answered the forum, and I figured id share the solution here as well!

Click the plus to add a module to Particle Spawn.

Type “uvscale” in the search filter and click Particles.UVScale

Click on the new Set Variables module that was created

In the details panel, click the carrot next to Particles.UVScale and search “break” and click on Break Vector 2D.

Click the carrot next to the X input of Particles.UVScale

Search for “uniform aor” and choose Uniform AOr BFloat

Set the A and B of the X value to (-1) and 1 respectively, and set Y to 1

Your get randomly flipped UVs at spawn

19 Likes

Thank you for sharing.

Sadly, this is how I see Niagara just now. It’s just overly complicated. I get that it’s an awesome tool that allows for flexibility etc… But all these steps to achieve something that was 1 click in Cascade :pensive:. Just doesnt feel user/artist friendly right now.

2 Likes

But that’s the beauty of Niagara. You do it once, the way you like it, then you save it as a module and it’s the same amount of clicks as Cascade.
Cascade forced a certain way of doing things on you. Niagara lets you define it yourself. But before you do that, it’s like using someone elses presets and preferences.

7 Likes

I had the same thoughts when I started with Niagara @Pete_Clark. I was like, “Why does something so simple have to be so complicated”, but over time I started to see things the way @Partikel sees them. It gets easier as you go. And more fun once you get the hang of it. That doesn’t make it any less frustrating at the start, but if you decide to take the plunge, i’m here to help answer any questions you have :slight_smile:

3 Likes

So any thoughts as to where this moved to? There is no longer this option when you search under “Particle spawn” So how to flip U or V randomly?UVFlip

You can find all particle parameters, even when they are not exposed. Just go on ‘Set new or existing parameter’ → Then hit the +. It should appear there.

1 Like

In case anyone else comes across this again, it looks like you can do this straight in the Initialize Particle module by default now under “Sprite UV Mode” with options for None, Random X, Random Y, Random Both, or something Custom:

5 Likes

Hey everyone,

I’m freshly new on FX learning, i would like to spawn random UV base on a flipbook of 4 images. ( I use a classic debug 1,2,3,4 right now ) in Niagara. But i didn’t suceed to make them spawn randomly, it’s always the 1 that pop out.
I try everything in that post but it still the same

image

What did i miss ?
Thanks for your help !

It seems like UE4 Niagara’s UV flip doesn’t respect cutout textures, so you might see some hard edges where your texture flips but the sprite shape doesn’t account for the new direction. Not sure about UE5’s uv flip & cutout

You need a Sub UV Animation module for this, under the Particle Update section. Then select “Random” for your animation mode

image

There is also the ‘Flipbook’ node inside the material editor. I personally prefer using that one rather than making it rely on Niagara. This allows you to also use the particles on static meshes, for example.
image