I’m kinda new in UE5 so I am learning day by day to use the amazing Niagara effects but I came up with an idea lately and I am little confused on how to make it work. I have, let’s say, a piece of wood textured actor in PaperZD 2D project and as it fall down on ground I want to spawn a Niagara effect with random pieces of wood projected up from the impact spot , I have 4 differenc textures for the pieces already made as Materials but maybe I could do in a more efficent way maybe ? So I read about this discussion
but maybe it’s not what I am looking for because I want every particle to spawn with different material, and I guess in the post up they are talking about multiple emitters right ?
If someone can help me understand how to do I would be really happy to learn, thank you.
There is a way to swap between materials within one emitter IF you are using meshes, but it’s a bit funky. It involves creating 4 different versions of the mesh with each material assigned by default, then setting a random mesh number per-particle in the emitter.
What I would recommend, and the method I usually use for this, is to create a flipbook out of your textures.
Then, in your material, you’ll want to use the Flipbook function. You’ll want to set the texture and number of rows and columns. Then, for the animation phase, you’ll want to use a Dynamic Parameter, since we can write to this from Niagara.
This will allow every particle to have a random value between 0 and 1, thus assigning it a random texture within the texture atlas you created. If you have multiple textures that need this atlasing, you can assign it the same incoming Dynamic Parameter and it will line up. This is a super easy and resource-efficient way to get variation within Niagara systems.