FAQ: Niagara - GPU Compute & Simulations

Dec 3, 2020.Knowledge

How can we use Niagara to generate compute shaders, and what are its strengths and limitations?

  • Niagara GPU simulations are all run using compute shaders. So just by changing an emitter to GPU simulation inside the Emitter Properties you’re moving that to a compute shader on the GPU.
  • Strengths: better performance when using very large numbers of particles. Reduced CPU load.
  • Limitations: Some features are unavailable. Though others are only available on GPU, e.g. texture sampling.

Do you have any plans to add native, GPU driven, out of the box support for fluid/smoke simulation in Niagara? If not, do you have a recommended approach?

  • We do. Initial 2.5D support was included with 4.25, and full 3D support as well as improvements to existing sims were added with 4.26, but they are still experimental. A suite of effects showing off the features underlying 2.5D and fluid sim support are included in the content examples project for 4.26 in the Niagara_Advanced map.

Can I render into a custom texture (2D or even a volume texture) from Niagara?

  • We are adding support for this in 4.26 with the experimental simulation stages features. However, it is not recommended that users use this for production until a future release.

How does UE4’s hair simulation use Niagara?

  • In the groom asset plugin several Niagara data interfaces have been created to bring the GroomAsset GPU buffers to Niagara. Then a computer shader (mix of Niagara nodes and HLSL code) is applied to deform the hair strands and push that back to the renderer.