Book Image

Build Stunning Real-time VFX with Unreal Engine 5

By : Hrishikesh Andurlekar
5 (1)
Book Image

Build Stunning Real-time VFX with Unreal Engine 5

5 (1)
By: Hrishikesh Andurlekar

Overview of this book

While no game would be complete without visual effects, the ever-evolving VFX industry churns out stellar digital environments that can make your games stand out from the crowd. Build Stunning Real-time VFX with Unreal Engine 5 is here to help you boost your creativity using Niagara to make jaw-dropping particle systems backed by the power of Unreal Engine 5—without a line of code. This handy guide for VFX artists takes you through the principles and concepts of designing particle systems and design workflows, along with the architecture of Niagara, Unreal Engine 5’s VFX system. Throughout the book, you’ll build a series of mini projects that will put your particle system knowledge to the test. As you advance, you’ll cover topics such as creating your own custom modules, debugging workflows, and controlling particles with blueprints, and conclude by working on two projects that will bring everything together into a neat package. By the end of this VFX book, you’ll have a deeper understanding of particle systems, improving your skills, portfolio, and the chances of being employed by studios using Unreal Engine 5.
Table of Contents (16 chapters)
Part 1: Introduction to Niagara and Particle Systems in Unreal Engine 5
Part 2: Dive Deeper into Niagara for VFX

Use cases for Niagara

Being the next-generation FX system, Niagara allows technical artists to add custom functionality to a particle system. It is equally accessible to beginner and advanced users alike. Beginners can start with a variety of templates as their starting points, while advanced users can add custom modules to create complex effects.

Niagara can be used to create all the effects that Cascade can and then go much further. Standard particle effects such as fire, smoke, rain, and snow are surprisingly easy to set up.

Niagara particles can be used to create much more beyond standard particle effects. As you gain more knowledge of Niagara, you will find interesting and powerful features that extend its capabilities.

Some of the advanced features include interfacing with the world by reading mesh triangles, tracing against physics volumes, and reading scene depth and query distance fields.

These features allow you to create flocks of birds or swarms of spiders that respond to the game environment. A flock of bats, for example, can work their way through an enclosed cave environment without colliding with the rocks. A swarm of spiders made in Niagara can crawl across the floor, over any obstacles, and react to the presence of a player. Particles can be represented by animated meshes to render more authenticity to such a simulation.

Niagara also makes it possible to create complex effects such as the morphing of meshes with a particle-based transition where an object may dissolve into particles, and then those particles reassemble to form another object of a different shape. The objects, in this case, can be static or skeletal meshes, which can help game designers include interesting events in their games.

The most important aspect of all the aforementioned effects is you do not need a programmer to design these effects. Unreal artists can design such effects on their own without needing any programming knowledge.

Niagara makes it extremely easy for other parts of Unreal to share data with the particle system. This allows you to build blueprints that include Niagara Systems and have exposed variables with which even a beginner can tweak the Niagara System to produce an array of effect variations. For example, a SnowStorm blueprint can contain abstracted values such as snow density, snowflake size, and turbulence in the Details Panel, which will act on the appropriate parameters in the Niagara System (Spawn rate, Sprite size, Curl force, etc.) to create various stages of a snowstorm or even change the values in real time in a game in response to player actions. These types of blueprints allow junior Unreal artists to indirectly modify Niagara System properties without requiring extensive knowledge of Niagara.

A Niagara System can also read external data such as a sound file and have the particle systems react to that data to create a visualization effect. For example, we can have a particle system spawn different colored particles in response to different frequencies of a soundtrack driving the particle system. For a more visual representation of what is being discussed here, you can go to

In UE5, Niagara goes much further with Niagara Fluids, a plugin that adds real-time grid-based simulations to Unreal Engine. This plugin adds templates for two-dimensional gas simulations (2D Gas), three-dimensional gas simulations (3D Gas), Fluid Implicit Particle (FLIP), and shallow water simulations, which are easy enough for beginners to use and can be tweaked at a granular level by advanced users.

Figure 1.17: Niagara Fluids templates in Unreal Engine 5

Figure 1.17: Niagara Fluids templates in Unreal Engine 5

While the fluid simulations can look amazing, not all devices on which your game may run will have enough resources to support a real-time fluid simulation. To bypass that, UE5 includes the Baker module to bake fluid simulations into a flipbook. These flipbooks can be used with sprite-based particle systems, which are very efficient and can run on slower devices. This also enables us to create rich secondary effects without sacrificing performance.

Niagara in UE5 also has a GPU ray-tracing option in the Collision module. Traditionally, GPU particles have used depth buffer to approximate collisions. Collisions using depth buffer are not very accurate. When using depth buffer, if the GPU particle system is occluded by an object, the particle system is culled by Unreal Engine and disappears. This can look odd. With the new hardware-based raytraced collisions, you can rest assured that the collisions will be accurate, and we will not encounter situations where GPU particles disappear.

In the following chapters, we will be building up an Unreal level from scratch and exploring a few of these use cases just discussed.