How to optimize Niagara particle systems for better performance in UE5?

Hi @Mr.hungok,

I’d love to help you out! There is not much information out there on how to optimize Niagara, so I’ll share with you what I’ve learned and what documentation does exist.

First of all, the easiest ways to optimize Niagara systems is to make sure your materials are cheap and your particles are limited. If you have 100 overlapping transparent particles, you’re going to kill your performance, however halving that number, raising the opacity, and changing the blend mode to additive should keep about the same look at a fraction of the cost. Changing your lighting mode to Shader Complexity will be a quick way to test how your particles are doing.

Adding light components to your systems is also a way to make things very expensive very quickly. If you have lights set to a Spawn Rate, make sure there are only a few overlapping at any given time- ideally as few as possible. Turning off Inverse Square Falloff and adjusting the default exponent to ~3-5 will increase how far your light spreads, allowing you to lower the attenuation radiuses.

In general, all of the same shader/lighting/mesh optimization techniques apply to Niagara, they are just more important here since you are working with potentially thousands of instances. Do everything you can to optimize your Niagara assets.

Now, getting into actual Niagara performance:

GPU sims are by default cheaper, since they use fixed bounds, though you can also use fixed bounds with CPU sims. Even without that though, GPU sims are almost always cheaper, as they are better at handling a large number of particles at less detail. Whether you use GPU or CPU though will also be dependent on where you are bottlenecked.

On your Niagara system, you can set performance parameters, including an Effect Type, which is great because it can be used across multiple systems.

This is a great place to control a lot of optimizations across multiple different systems, and also provides custom scalability settings for targeting different hardware.

Things like collision and forces are going to add more complexity, but it’s important to know what exactly is being added. Enable Performance at the top of the window to get a full breakdown of each module’s cost.

Now, when it comes to evaluating your VFX cost within a level, you can use the Niagara Debugger

This tool has a lot of great resources for debugging particles. It will give you all of the performance information of the particles in your current level

There are also a lot of Niagara console variables that can be useful. “fx.NiagaraPerfReporting 2” dumps your Niagara performance statistics into a .csv inside your project’s Saved/Profiling folder, which contains a lot of information in your systems’ performance.

You can find a comprehensive list of all console variables here. I would suggest to control-F for Niagara and reading through the results.

And of course, if you really want to get into the nitty-gritty, you can always run an Insights trace and check for any hitches there.

As far as community resources go, here are a few great articles you can read for more in-depth information:

And that’s all I got! Good luck, and let me know if you have any more specific questions.

3 Likes