[UE 5.2] Partition Particles Mini Tutorial of fixed emission

PartitionParticlesFixed

This is a quick tutorial to explain how I have multiple ribbons in one single emitter as in my chain ribbon effect. Originally I was using my own partition module and didn’t realize that there was a built-in partition module. (It exists in UE 5.0, but I am not sure if it was created in the earlier version). However it still lacks one thing that I’d like to address if you are going to use this built-in module.

In this mini tutorial I will only explain one use case only: Partition of fixed emission, which means the emitter only bursts all the required particles at once, without subsequent emission ever again.

First, you need to define how many groups and how many particles per group. You can cache the int32 values to the parameters in User Parameters, System Spawn or Emitter Spawn, anywhere suits you:
image

Set Emitter State module as follow:
image

Create a Spawn Burst Instantaneous module, and set the Spawn Count as the product of GroupCount and NumPerGroup:
image
While not exactly necessary, I prefer to enable Loop Count Limit and set it to 1 in a burst-once emitter.

Add Partition Particles to Particle Spawn stage. I think it makes most sense to move it to the top of the Particle Spawn stack, because you are very likely to use its output parameters in the Initialize Particle module. And use the following settings:
Partition Mode: Sequential
Partition Count Mode: Fixed
Number of Partitions: GroupCount
Particles Per Partition: NumPerGroup
Write PArtition to Ribbon ID: Apply
Write Partition Index to Ribbon Link Index: Apply
image

The following is what I really recommend Epic to add to this module: NormalizedPartition which isn’t a thing as of UE 5.3. (While this module produces a “Normalized Index In Partition” parameter, this is essentially “Ribbon Link Index” to make sure each ribbon is connected in the intended order, otherwise the ribbon will become a spaghetti mess.) So I would like to create a new Particles attribute: Normalized Partition(Group) Index, which is simply to divide Particles.Partition by Number of Partitions. You may not need this in all cases, but it can come in handy occasionally.

Partition Particles module produces few crucial parameters: Partition (group index), RibbonLinkOrder (applied from Normalized Index In Partition) and RibbonID (created from Partition). With clever use of these parameters, you can achieve something like this in one single emitter:

PartitionParticlesFixed


Some final thoughts: While it may be intimidating to go this route instead of a more straightforward “read data from a parent emitter and emit trails of particles in a child emitter”, the primary advantage of handling such effect in a single emitter is that it is definitively cheaper in performance and upkeep.

The built-in “Sample Particles from Other Emitter” set of modules which use Particle Attribute Reader are already brilliant in providing a very good result, but in a ribbon trails effect, you are still required to enable Persistent IDs of the parent emitter in order to prevent ribbons from turning into a spaghetti mess. The one-emitter method does not requires Persistent IDs for ribbons, as long as Particle Attribute Reader is not involved.

AFAIC, Persistent ID is not an instant performance killer, but every little helps, and it is best saved for situation where it is absolutely required and there is no alternative whatsoever.

Possibly needless disclaimer

I leaned of this module after YouTube recommended me a Niagara tutorial by certain individual who is banned from this forum. I tried to watch it as minimum as possible because I have already achieved something similar without this module in the first place. I decided to make this mini tutorial because this is something NOT taught in that tutorial.

Всё!

19 Likes

Just saw this! Thanks for sharing! I actually did not know the partition module existed and always did this by hand :smiley: This is much neater!

Thanks for sharing ! I didn’t know this built-in module existed before I saw your post :open_mouth:
I ended recreating the same kind of logic in two separated custom scipts because I didn’t know about the one made by Epic.
From what I understand from this Partition Particles module, I’d say it could be used in many other cases, even when using the commonly used “source particle generating location event for ribbon emitter” workflow. It could be used to have more than one ribbon behind each source particles :


(example made with my own custom scripts, just to show the idea)

Another usage would be to use the Particle.PartitionParticle.Partition outputed by the module to drive some fixed random seeds. One idea would be to select a size for each ribbon randomly and keep that size the same for each particle withing the same ribbon :
image

A lot of cool thing to do with this kind of sequential setup :slight_smile:

1 Like

Thank you so much for this! I was wondering, is there a way to adjust this setup to use spawn rate instead of spawn burst instantaneous? And have a set amount of ribbons / group of particles spawned every second?