FAQ: Niagara on Mobile

Mar 23, 2021.Knowledge

GPU Simulations

  • Since many mobile applications end up GPU bound, we’ve found that moving work to compute is of limited value in many instances. Fortnite, for example, uses largely CPU simulations.
  • Some devices, like those based on early Mali chipsets, have pretty severe limitations on buffer sizes. We truncate the particle buffers when close to overflowing, but you may wish to disable them entirely on lower end devices.
  • GPUSort is disabled on OpenGL because of issues with compute barriers. A10x GPUs and lower do not have RW texture support, so GPU Sim is disabled and cannot work on these.

Scalability settings

  • Setup quality Levels - Niagara quality is bound to the CVar fx.Niagra.QualityLevel. By default this mirrors the engine sg.EffectsQuality 0,1,2,3,4. Low, Medium, High, Epic, Cine. If this is a mobile only title then it would be good to have device profiles set up such that s.g.EffectsQuality will vary across the range of devices and as such so will Niagara. In a title such as Fortnite that targets a wider range, we have specifically set fx.Niagara.Quality level to 0 for most mobile devices and 1 for some of the higher end.
  • Set up a good base of EffectTypes. Niagara has the concept of EffectTypes which define a number of base scalability settings that can apply to all systems that share that type, allowing good default settings to be defined and tweaked by leads and applied with a single click by artists in their FX. Avoiding tedious setup work or worse, FX with no scalability setup. In Fortnite we have a number of variants for different types of effect such as player, vehicle, impact, environmental. Each having a Looping/Burst variant for looping and one shot systems. They also have a Major/Minor variant to distinguish between important FX that have minimal culling settings and less important FX that can be culled more aggressively. Systems can, if needed, override these settings in the System Properties section of the System Stack.
  • Cull expensive emitters - Individual emitters can also be in the Emitter properties by quality level so lower power devices never even initialize these emitters. This should be done aggressively for expensive emitters or lower power devices. Emitters can also be culled dynamically by distance etc by setting the EmitterState module’s Scalabiltiy Mode to Self in the Emitter stack.

General performance

  • Try to keep emitter counts down where possible. Make use of multiple renderers per emitter, alternate renderer bindings, spawn groups, and potentially mesh arrays (coming in 4.27). We have content examples which display these features in the Niagara.umap and Niagara_Advanced.umap in the Content Examples project under the learn tab in the Epic Games Launcher.

Working with other platforms

  • If doing mixed SKU’s don’t be afraid to have platform specific overrides. You can tweak individual emitters and renderers attached to those renderers to only be active on given platforms. Many other variables, like spawn rate are also tweakable per scalability group or even per platform.
  • Make use of material quality switches to share materials between mobile and other platforms.

Verifying Results

  • The engine has a mobile preview mode in-editor that can be somewhat useful in seeing how things will look without on-target previewing. However, it doesn’t capture all the system settings, so doing regular passes on target is important.