x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Product Version: UE 4.21
Tags:
more ▼

asked Mar 01 '19 at 04:16 AM in Everything Else

avatar image

msharpe96
1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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 .

more ▼

answered Mar 01 '19 at 04:19 AM

avatar image

Shadowriver
35.7k 926 168 1104

avatar image Shadowriver Mar 02 '19 at 08:21 AM

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

avatar image msharpe96 Mar 07 '19 at 06:51 PM

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?

avatar image msharpe96 Mar 04 '19 at 12:12 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question