In Niagara is there a way to randomly flip the UVs of a particle when it spawns?

In Cascade there is a UV Flipping Mode option in the Required node under the Rendering dropdown that allows the UVs of particle sprites to be flipped randomly upon spawning. Does anyone know if there’s a way to do this in Niagara?

Thanks

I don’t know if there option for that but i can give you some workarounds. You can flip UV on material (shader) level. If it’s not a 3D mesh, you could also try to use minus scale transformation to reproduce the effect, and do it before rotation is applied .

Thanks for the tips. I have no problem flipping the UV initially, the main issue is randomly flipping UVs when they are spawned so not every sprite will show up with the same.

In Niagara there is a Particle.UVScale parameter that allows me to control the UVs, but I’m not sure how to get it to randomly pick between the vectors (1,1), (1,-1), (-1,1), and (-1,-1). Using the Uniform Ranged Vector function doesn’t seem to work since it can pick anything between (-1, -1) and (1,1) which can lead to the textures looking distorted.

Then process it ferther, there is node called “Sign” which returns either 1 or -1 depending of number sign you inputing.

For the future if you don’t have such sign function you can do this mathematically by x / abs(x), x/x always gonna return 1 but if you make one of them absolute number (always positive), as multiply sign law say, if numbers signs are different the output will be negative number. so if x is negative 2nd x gonna be still be positive and division gonna return negative number because signs will be different.

As for random on spawn, you can do that by placing you module on particle spawn

Sign almost gets me there, however it can return a value of 0 which distorts the UVs. Do you have any suggestions how I can make it not return a 0 and only -1 or 1?

I know its been a year since this was bumped, but I just came across this and figured it out. I’m in UE4 (4.24.3)

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 added.

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

I’m using UE 4.26. There’s a “Sprite UV Mode” dropdown in the Initialize Particle module that will do this.