Version: 4.26, 中文
Created: 2021-01-30, Updated: 2021-03-25
Author: Cyanhall
👉  Cyanhall@GitHub Star me if it’s helpful.
1. Preparation This is the effect we are going to make in this tutorial.

Note: The main content of this tutorial comes from the Content Examples that come with Unreal Engine

Tip: Use ⬆️ ⬇️ to turn the page up and down. We recommend browsing with a large screen for a better reading experience.
Preparation
3. Goal In this example, Sprites face the vector between the center of the system and the particle itself.

That vector is then itself rotated based on the age of the emitter to create spinning sprites.
Goal
4. Let's start the reconstruction Right click and select FX => Niagara System to create.
Let's start the reconstruction
5. Create Niagara System Select Empty template, click + and Finish
Create Niagara System
6. Create Niagara System As a result, we get a Niagara System asset, click to open it.
Create Niagara System
7. Empty Niagara System You can see that we have an empty Niagara system.
Empty Niagara System
8. Spawn Rate Click on the + sign to the right of the Emitter Update to add the Spawn Rate module.

Spawn Rate: Number of particles per second to spawn.
Spawn Rate
9. Spawn Rate Set the Spawn Rate value to 40.0.

Spawn 40.0 particle per second.
Spawn Rate
10. SineWave Click the + sign to the right of the Emitter Attributes to add a float attribute.
SineWave
11. SineWave Name this new property SineWave.
SineWave
12. SineWave Drag this property under Emitter Update.

If dragged into Emitter Spawn, its value would only be set once, on the first frame the emitter was born.

By setting it in Emitter update, that Attribute gets a new value every frame.
SineWave
13. SineWave Because this is calculated at the emitter level and not per-particle, every particle which references it receives the same value, in this case allowing them all to spin at the same time.

The same concept works at the system level too: a variable set there is accesible to every emitter in the system, as well as every particle in those systems.
SineWave
14. SineWave Set the value type of SineWave to Clamp Float

Clamp Float: Clamp Float between min and max value.
SineWave
15. SineWave Set the value of Float to Sine input.
SineWave
16. SineWave Set the value type of Normalized Angle to Multiply Float
SineWave
17. SineWave Sets the A value of Normalized Angle to the Age of the emitter.
SineWave
18. SineWave Set the B value of Normalized Angle to 0.25.
SineWave
19. Initialize Particles Select Initialize Particles and set:

1. Lifetime to 6.0
2. Color Mode to Random Range
3. Color Channel Mode to Random Individual Channels
4. Sprite Size Mode is Random Uniform with a Min value of 6.0 and a Max value of 11.0.
Initialize Particles
20. Sphere Location Add the Sphere Location module in the Particles Spawn section.
Sphere Location
21. Sphere Radius Set Sphere Radius to 95.0
Sphere Radius
22. FacingCenter Add a Vector variable to the Stage Transients module

Note:
Particle Attributes: Persistent attribute which is written in a particle stage and can be read in particle stages.
Stage Transients: A transient value which can be written to and read from any module. Transient values do not persist from frame to frame, or between stages, e.g. emitter to particle, or spawn to update.
FacingCenter
23. FacingCenter Name this newly created variable: FacingCenter
FacingCenter
24. FacingCenter Drag and drop FacingCenter to Particles Update.
FacingCenter
25. FacingCenter Set the value type of FacingCenter to Subtract Vector
FacingCenter
26. FacingCenter Edit the value of A to Particles.Position
FacingCenter
27. FacingCenter Edit the value of A to Simulation Position

Simulation Position: returns either the Engine.Owner.Position or the local (0, 0, 0) depending on the Local Space flag on the emitter.
FacingCenter
28. SpriteFacing Add a Vector variable to the Particle Attributes module
SpriteFacing
29. SpriteFacing Name this newly created variable: SpriteFacing
SpriteFacing
30. SpriteFacing Drag and drop SpriteFacing to Particles Update.
SpriteFacing
31. SpriteFacing Set the value type of SpriteFacing to Rotate Vector
SpriteFacing
32. SpriteFacing Set Vector To Rotate to FacingCenter.
SpriteFacing
33. SpriteFacing 1. set Yaw, Pitch, Roll to 60.0
2. set the Delta Time value to the Age of the emitter
SpriteFacing
34. SpriteFacing Drag SpriteFacing again to Particles Update.
SpriteFacing
35. SpriteFacing Set the value type of SpriteFacing to Lerp Vector
SpriteFacing
36. SpriteFacing Set the value of A to FaceCenter.
SpriteFacing
37. SpriteFacing Set the value of B to the SpriteFacing obtained in the previous stage.
SpriteFacing
38. SpriteFacing Set the value of Alpha to SineWave.

Particles.SpriteFacing is the vector variable which controls which direction a particle faces. In this script we blend between facing an ever spinning vector, and the vector between the particle and the center of the sphere.
SpriteFacing
39. Vortex Velocity Add Vortex Velocity module to the Particle Update section.
Vortex Velocity
40. Vortex Velocity Click the first Fix issue button to add its dependency on the SolveForcesAndVelocity module.
Vortex Velocity
41. Vortex Velocity Set the value type of Velocity Amount to Random Range Float
Vortex Velocity
42. Vortex Velocity 1. Set the Minimum value of Velocity Amount to 50.0 and the Maximum value to 160.0.
2. Set the value type of Vortex Axis to Lerp Vector.
Vortex Velocity
43. Vortex Velocity Set the value of A Vector of Vortex Axis to Random Vector.
Vortex Velocity
44. Vortex Velocity Set the value of B Vector of Vortex Axis to Random Vector.
Vortex Velocity
45. Vortex Velocity Set the value of Alpha of the Vortex Axis to the Normalized Age of the particle.
Vortex Velocity
46. Scale Sprite Size Add the Scale Sprite Size module to the Particles Update section.
Scale Sprite Size
47. Scale Sprite Size Edit the Scale Factor's value to Vector 2DFrom Float.
Scale Sprite Size
48. Scale Sprite Size Set its value type to Float from Curve.
Scale Sprite Size
49. Scale Sprite Size Edit this curve to control its value over time
Scale Sprite Size
50. Scale Sprite Size Select the first point and drag it to the bottom.

Note: Here you can also select this point and directly set its Time to: 0 and Value to 0.
Scale Sprite Size
51. Scale Sprite Size Mouse over the small red circle, right click, and select Add key to Curve.
Scale Sprite Size
52. Scale Sprite Size Set the Time of the newly added point to 0.5 and the Value to 2.
Scale Sprite Size
53. Scale Sprite Size Sometimes, the newly set points will go beyond the boundaries of the existing chart. You can adjust the chart boundaries by clicking on the button circled in red.
Scale Sprite Size
54. Scale Sprite Size In the same way, add two points: (time 0.07, value 1), (time 0.94, value 1).
Scale Sprite Size
55. Facing Mode Select Sprite Renderer, then set Facing Mode to Custom Facing Vector

With this setting, The sprite billboard faces toward the Particles.SpriteFacing vector attribute. If the Particles.SpriteFacing attribute is missing, this falls back to FaceCamera mode.

FaceCamera mode: The sprite billboard origin is always "looking at" the camera origin, trying to keep its up axis aligned to the camera's up axis.
Facing Mode
56. Sorting Mode Select Sprite Renderer, then set Sorting Mode to View Distance

This will set the priority to rendering: Sort by distance to the camera's origin
Sorting Mode
57. Bindings Particles.SpriteFacing is not the only Renderer Binding which is handled automatically by the simulation and has special meaning. Click a renderer, in this case the Sprite Renderer at the bottom of the stack, and scroll down to Bindings
You will see a list of particle attributes which have special meaning to the renderers which reference them. Each can be overwritten with other attributes if desired.
Bindings
58. 🎉 Finish! 🎉 👉  Cyanhall@GitHub  Star me if it’s helpful.

Support Me: Patreon
Follow Me: Twitter, Reddit, Zhihu, Bilibili
🎉 Finish! 🎉
Comments
Preparation