Learn to use this Early Access feature, but use caution when shipping with it.
This feature is Early Access.
Features available in Early Access give you the opportunity to learn how they work, plan your pipeline, and create test content. You should use caution when using these features in production, as we are still working to get to shipping-quality performance, stability, and platform support. We support backward compatibility for assets, and the APIs for these features are stable.

Create a GPU Particle Effect

Prerequisite Topics

This page assumes you have prior knowledge of the following topics. Please read them before proceeding.

For some effects, you may need to spawn tens of thousands of particles. However, using the standard CPU to generate this many particles can cause the game to slow down. In the following How-To we will demonstrate how to spawn particles using the GPU instead of the CPU.

GPU_Banner_01-1.png

Steps

  1. First, create a Niagara Emitter by right-clicking in the Content Browser, and from the displayed menu select FX > Niagara Emitter. The Niagara Emitter wizard displays.
    SE_01.png
  2. Click the radio button next to Create a new emitter from an emitter template. Select the Fountain template. Then click OK to create a new Niagara Emitter in the Content Browser.
    NiagaraEmitter_FountainTemplate.png
  3. Name the newly created Niagara Emitter FX_GPU and then double-click it to open it.
    CreateGPU_Steps_Step2-CreateEmitter.png
  4. Expand the Emitter Spawn section. Locate Emitter Properties and expand it. Click the dropdown next to Sim Target. From the displayed list, select the GPUCompute Sim option.
    CreateGPUParticle_Steps_Step06-ChangeToGPU.png
  5. This is where you are changing from the CPU to the GPU. This allows more particles to be spawned while maintaining performance.
  6. Expand the Emitter Update section. Locate the Spawn Rate module.
  7. In the Spawn Rate module, set the SpawnRate to a value of 5000.
    CreateGPUParticle_Steps_Step07-SpawnRate.png
  8. Next, locate the Set Variables module. Set the Particles.SpriteSize X and Y values to 5.
    CreateGPUParticle_SetVariablesParticleSpriteSize.png
  9. In the Sphere Location module, set the Sphere Radius to a value of 100.
    CreateGPUParticle_Steps_Step04-SphereRadius.png
  10. Click the Compile, Apply and Save buttons to compile and save your work. Then close the FX_GPU emitter.
    ME_09.png
  11. Right-click in the Content Browser, and from the displayed menu select FX > Niagara System. The Niagara System wizard displays.
    SE_16.png
  12. Click the radio button next to Create an empty system with no emitters. Then click OK to create a new Niagara System in the Content Browser.
    NiagaraSystem_EmptySystem.png
  13. Name the new Niagara System GPU
    NiagaraSystem_GPUIcon.png
  14. Double-click the GPU Niagara System to open it, then drag the FX_GPU Niagara Emitter from the Content Browser to the Timeline.
    CreateGPUParticle_Steps_Step10-AddEmitterToSystem.png
  15. Click the Compile and Save buttons to compile and save your work, and then close the GPU Niagara System. In the Content Browser, drag the GPU Niagara System into the Level Viewport. When that is completed, you should now see something like the image below.
    CreateGPUParticle_Steps_Step11-AddSystemToLevel.png

End Result

When all steps have been completed, you will have a particle effect that is larger and more complex than the same particle effect using the CPU. An example is shown in the video below.