Home Game Development Build Stunning Real-time VFX with Unreal Engine 5

Build Stunning Real-time VFX with Unreal Engine 5

By Hrishikesh Andurlekar
ai-assist-svg-icon Book + AI Assistant
eBook + AI Assistant $35.99 $24.99
Print $44.99
Subscription $15.99 $10 p/m for three months
ai-assist-svg-icon NEW: AI Assistant (beta) Available with eBook, Print, and Subscription.
ai-assist-svg-icon NEW: AI Assistant (beta) Available with eBook, Print, and Subscription. $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime! ai-assist-svg-icon NEW: AI Assistant (beta) Available with eBook, Print, and Subscription.
What do you get with a Packt Subscription?
Gain access to our AI Assistant (beta) for an exclusive selection of 500 books, available during your subscription period. Enjoy a personalized, interactive, and narrative experience to engage with the book content on a deeper level.
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
Gain access to our AI Assistant (beta) for an exclusive selection of 500 books, available during your subscription period. Enjoy a personalized, interactive, and narrative experience to engage with the book content on a deeper level.
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Along with your eBook purchase, enjoy AI Assistant (beta) access in our online reader for a personalized, interactive reading experience.
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
ai-assist-svg-icon NEW: AI Assistant (beta) Available with eBook, Print, and Subscription. ai-assist-svg-icon NEW: AI Assistant (beta) Available with eBook, Print, and Subscription. BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime! ai-assist-svg-icon NEW: AI Assistant (beta) Available with eBook, Print, and Subscription.
eBook + AI Assistant $35.99 $24.99
Print $44.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
Gain access to our AI Assistant (beta) for an exclusive selection of 500 books, available during your subscription period. Enjoy a personalized, interactive, and narrative experience to engage with the book content on a deeper level.
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
Gain access to our AI Assistant (beta) for an exclusive selection of 500 books, available during your subscription period. Enjoy a personalized, interactive, and narrative experience to engage with the book content on a deeper level.
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Along with your eBook purchase, enjoy AI Assistant (beta) access in our online reader for a personalized, interactive reading experience.
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    Chapter 1: Getting Started with Unreal Engine Particle System Frameworks
About 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.
Publication date:
May 2023
Publisher
Packt
Pages
312
ISBN
9781801072410

 

Getting Started with Unreal Engine Particle System Frameworks

Unreal Engine’s particle system, called Niagara, is a powerful tool for creating stunning, realistic special effects in games and other interactive applications. It allows developers to create and manipulate a wide range of particle effects, such as fire, smoke, rain, snow, and more. The particle system is highly customizable, with a wide range of settings that can be adjusted to create unique effects. It is optimized for real-time performance, making it a popular choice for game developers who want to add eye-catching visual effects to their games.

Niagara replaced Cascade as Unreal Engine’s particle system because it offered several significant improvements over its predecessor. Niagara was designed to be more flexible, scalable, and performance-friendly, making it a better fit for the demands of modern game development.

Some of the key features that set Niagara apart from Cascade include a more modern and user-friendly interface, improved particle simulation capabilities, and better performance and scalability. Niagara also allows developers to create and manage particle effects using either a visual interface or code, making it a versatile tool for a wide range of use cases.

In addition, Niagara was designed to be more flexible and extensible, making it easier for developers to create custom particle effects and incorporate them into their projects. This has helped make Niagara one of the most popular and widely used particle systems in the game development industry today.

We will begin our journey into Unreal particle systems with an overview of the particle system modules in Unreal Engine. There have been major changes in the particle system workflow in Unreal as we’ve moved from the older Cascade particle system to the Niagara particle system over the last few versions. Unreal Engine 5 continues to support the Cascade particle system, and though we do not expect to create new assets in Cascade, we will familiarize ourselves with Cascade in this chapter in case we need to support older projects made with Cascade.

We will discuss the changes Niagara brings and learn about the features expected in the future. We will also dive into the reasons behind Niagara’s development and end the chapter with some interesting use cases for Niagara.

This chapter will cover the following topics:

  • Particle systems in Unreal
  • The Cascade particle system
  • The reasons behind Niagara’s development
  • Use cases for Niagara
 

Technical requirements

For this chapter, you need to have access to a machine capable of running Unreal Engine 5. We are going to use the default assets, which should be available with your installation of Unreal Engine.

Here are the steps to install Unreal Engine using the Epic Games Launcher:

  1. Download the Epic Games Launcher: Visit the Unreal Engine website (https://www.unrealengine.com/en-US/download) and click on the Download button. After downloading the installation file, double-click on it to install the Epic Games Launcher.
  2. Sign in or create an account: If you already have an Unreal Engine account, sign in. If you don’t, create a new account.
  3. Launch the Epic Games Launcher: Once you’ve signed in, launch the Epic Games Launcher.
  4. Install Unreal Engine: In the Epic Games Launcher, click on the Library tab, find Unreal Engine in the list, and click Install next to it. The installation process will begin, and you can monitor its progress in the Downloads tab. Make sure that you have at least 80 GB of disk space as the full Unreal Engine installation may take up to 60 GB.
  5. Launch Unreal Engine: Once the installation is complete, you can launch Unreal Engine by clicking on the Launch button in the Epic Games Launcher.

And that’s it! You’ve now successfully installed Unreal Engine using the Epic Games Launcher.

These are the recommended system configuration requirements:

  • Windows 10 (64-bit, version 20H2)
  • 32 GB RAM
  • 256 GB SSD (OS drive)
  • 2 TB SSD (data drive)
  • NVIDIA GeForce RTX 2080 SUPER

AMD Ryzen 7 5800H and above (Intel Core i9, 10th generation and above)

You can find the project we worked on in this book here:

https://github.com/PacktPublishing/Build-Stunning-Real-time-VFX-with-Unreal-Engine-5

Let us now understand how particle systems are implemented in Unreal Engine.

 

Particle systems in Unreal

Particles are a bunch of assets, such as images, meshes, lights, and even fully rigged characters, which are managed by a particle system. The particle system enables us to manage a huge number of these elements and attach logic and behavior to them.

The term particle system was coined in 1982 by William T. Reeves, a researcher at Lucasfilm Ltd. while working on Star Trek II: The Wrath of Khan. He was developing an effect for the film where a planet was terraformed. To show this terraforming, a visual effect called the Genesis Effect was created where a firewall ripples across a whole planet. You can watch it here: https://www.youtube.com/watch?v=52XlyMbxxh8.

The term particle system was coined for the effect shot called the Genesis Effect.

While each particle in a particle system is a discrete entity, it’s the combined effect of all the particles in the particle system together that creates the impression of a bigger entity, such as an exploding fireball or a fireworks effect.

A game will need a particle system to show various effects such as fire, smoke, or steam. Unreal Engine previously featured a tool called Cascade to create particle system effects starting from the UE3/Unreal Development Kit (UDK) days. Cascade was also available in Unreal Engine 4. In UE 4.20, Epic introduced the new Niagara Fx system to replace Cascade as a beta version plugin, which was not enabled by default. In later versions of Unreal Engine, Niagara came enabled by default as an option along with Cascade. The user interface continued to give priority to Cascade as the primary particle effects creation tool to ease the transition to Niagara gradually. This changed in UE5 where the primary method of creating particles is Niagara and Cascade exists only to support legacy projects containing Cascade particle effects.

Figure 1.1: Creating a Niagara System using the right-click pop-up menu in the Content Browser

Figure 1.1: Creating a Niagara System using the right-click pop-up menu in the Content Browser

There's also a plugin called Cascade To Niagara converter, which can help you convert the majority of Cascade systems into Niagara Systems. It contains a Blueprint Function Library and some Python scripting to help with the conversion. You can enable the plugin in the Plugins Browser tab in Unreal 5. The Plugins Browser tab can be opened by clicking on Edit > Plugins in the menu bar.

Figure 1.2: The Cascade To Niagara Converter plugin

Figure 1.2: The Cascade To Niagara Converter plugin

Enabling this plugin will add a new option to the menu when you right-click on a Cascade particle system asset in the Content Browser.

Figure 1.3: Converting a Cascade system into a Niagara System using the Converter plugin

Figure 1.3: Converting a Cascade system into a Niagara System using the Converter plugin

This option will create a new Niagara System in the same folder as the Cascade system with the suffix _Converted added to it. The conversion does not fully support all cases, so expect to find a bunch of errors showing up in the Niagara System when you open it in the Niagara Editor, which will need to be manually fixed. So, while we can use the converter as a starting point to convert Cascade systems into Niagara Systems, additional work is almost invariably needed to complete the conversion.

To sum up, UE5 contains two different particle systems: Niagara, the primary particle system, and Cascade, which is available for compatibility purposes. In the next section, let us get an overview of the Cascade system.

 

Cascade particle system

Cascade is a modular particle effects editor integrated into Unreal Engine. As of Unreal Engine 5.1, the option to create a Cascade particle system has been moved into the Miscellaneous section.

Figure 1.4: Creating a new Cascade particle system in Unreal 5.1

Figure 1.4: Creating a new Cascade particle system in Unreal 5.1

Alternatively, if you upgrade from a UE4 project containing Cascade particle systems, you should be able to double-click on the particle system asset and open Cascade Editor. If you need to create a new particle system, you should use Niagara. This chapter is to familiarize you with Cascade just enough for you to manage any older projects that you might need to work on.

Learning about Cascade, Unreal Engine’s previous particle system, can still be important for several reasons:

  • Legacy content

Many older projects in Unreal Engine still use Cascade, so being able to work with it is an important skill to have in case you need to make changes or updates to existing content.

  • Historical context

Understanding Cascade can give you valuable insights into the history and evolution of Unreal Engine and how it has changed over time to become the powerful development platform it is today.

  • Skills transfer

Many of the concepts and techniques used in Cascade are still applicable to Niagara, so learning about Cascade can help you build a strong foundation of particle system knowledge that you can apply to your future work with Niagara.

  • Career opportunities

There may still be opportunities to work with Cascade in certain industries, such as film and television, where older projects may still be in use.

While Niagara has replaced Cascade as Unreal Engine’s current particle system, learning about Cascade and its capabilities can still be a valuable part of your education as an Unreal Engine developer.

If you do not plan on working on any old UE4 projects, feel free to skip this chapter and move on to Chapter 2.

Let’s take a look at how Cascade works before leaping into Niagara.

Cascade particle systems are available as a part of the Starter Content pack. Starter Content is a bunch of assets made available in Unreal Engine as a starting point for the user to have some basic assets to work on at the start of a project. It has a bunch of audio files, textures, materials, meshes, particle systems, and other assets that you might typically need to prototype a project.

So let’s get started: create a new UE5 project and enable Starter Content.

You can enable Starter Content by checking the Starter Content checkbox when creating a new project, as shown in Figure 1.5.

Figure 1.5: Ensuring that the Starter Content checkbox is ticked

Figure 1.5: Ensuring that the Starter Content checkbox is ticked

Once the project is created, you should see the Starter Content folder in the Content folder. In the Starter Content folder, open the Particles folder in which you will find a few sample Cascade particle systems.

Figure 1.6: The legacy Cascade particle systems

Figure 1.6: The legacy Cascade particle systems

Double-click on the P_Fire system to launch the Cascade interface.

Figure 1.7: The Cascade interface

Figure 1.7: The Cascade interface

There are six main zones in the Cascade interface:

  • MenuBar
  • ToolBar
  • Viewport
  • Emitters Panel
  • Details Panel
  • Curve Editor

We won’t go into the details of the Cascade Editor, but we will review some key features in the Editor that are relevant to our pursuit of learning about Niagara:

  • The MenuBar section has standard Save, Undo, Redo, and more menu options
  • The Toolbar section also has the Save, Undo, and Redo options along with a few notable buttons as follows:
    • Restart Sim: This resets the particle simulation in the Viewport window
    • Restart Level: This resets the particle system instance in the level
    • Thumbnails: This takes a snapshot of the Viewport and saves it as a thumbnail in the Content Browser
    • Bounds: This toggles the Bounds display in the Viewport
    • Origin Axis: This toggles the origin axis of the particle system in the Viewport
    • Background Color: This changes the Viewport background color
    • Level of Detail (LOD): This opens the options to create and modify particle LODs

The Viewport shows a real-time preview of the particle as it would appear in game. It also has different render modes such as Unlit, Wireframe, and Shader complexity, which can be accessed via the View modes submenu. You can also play the system at different speeds such as 100%, 50%, 25%, and 1%. There are a lot of properties available in the View menu to visualize different aspects of the particle system, about which we won’t go into detail.

The Viewport can be navigated using the left mouse button (LMB) to tumble the camera, middle mouse button (MMB) to pan the camera, and right mouse button (RMB) to rotate the camera, Alt + LMB to orbit the system, and Alt + RMB to dolly.

Emitters panel is the main work area of the Cascade particle editor. This is where you create all the emitters contained in the particle system. You can also add and modify different modules to the emitters. Modules control various the behavioral aspects of the particles released by the emitter. A module can interact with other modules and this interaction is affected by their position in the stack of modules. So, for example, if we have two modules applying different velocities, it will result in the cumulative velocity of those modules being applied to the particles.

Creating an emitter

Now that we’ve learned a little about the Cascade particle system, let us see how we can add a new emitter to the P_Fire particle system. A Cascade emitter can only be created inside a Cascade particle system.

Figure 1.8: Creating a new Particle Sprite Emitter by right-clicking in the blank space

Figure 1.8: Creating a new Particle Sprite Emitter by right-clicking in the blank space

You can add an emitter by right-clicking on the blank area in the panel and clicking on New Particle Sprite Emitter.

Figure 1.9: Newly created Particle Emitter with the emitter Block at the top and the modules below

Figure 1.9: Newly created Particle Emitter with the emitter Block at the top and the modules below

The emitter created is a column with an emitter block on top and a few default modules under it. The emitter block contains the main properties of the emitter, which can be accessed by clicking on it. On clicking the emitter block, the Details panel shows properties including Emitter Name, Emitter Render Mode, and Detail Mode Bitmask, which can be edited. You can also change the color of the color bar on the left of the emitter block here by changing the Emitter Editor Color setting, allowing you to color-code your emitters:

Figure 1.10: The Details panel in the Cascade Editor

Figure 1.10: The Details panel in the Cascade Editor

In each emitter, we can add modules (which are components of the emitter) to modify particle behavior. A module can, for example, affect the velocity, direction, color, and other properties of a particle. Every emitter will have a Required module and a Spawn module.

The Required Module has all the must-have properties of an emitter. These properties include properties that describe the material applied to the particles, the position of the emitter origin, any rotation applied to the emitter, and the alignment of the particle with respect to the screen. Many of these properties will be covered in the upcoming chapters in the context of Niagara.

The Spawn Module contains the properties that affect the way particles are spawned. In this module, the Spawn and Burst categories determine the rate at which particles are spawned.

Figure 1.11: The Spawn Module properties in the Details panel

Figure 1.11: The Spawn Module properties in the Details panel

After the Required and Spawn modules, you can add any number of modules as required to get the effect that you want. The modules can be added by right-clicking on the emitter column.

These modules can be divided into the following categories depending on their function. The functions of the modules in each category should be evident from their names:

  • Acceleration modules
  • Attractor modules
  • Beam modules
  • Camera modules
  • Collision modules
  • Color modules
  • Event modules
  • Kill modules
  • Lifetime modules
  • Particle lights
  • Location modules
  • Orbit modules
  • Orientation modules
  • Parameter modules
  • Rotation modules
  • Rotation Rate modules
  • Size modules
  • Spawn modules
  • SubUV modules
  • Vector Field modules
  • Velocity modules

As we learn more about Niagara, you will find that these Cascade modules have Niagara equivalents to allow us to recreate any of the effects produced in Cascade.

In addition to the aforementioned modules, we also have TypeData modules, which determine the type of particles emitted. These include the Beam type, GPU sprites type, Mesh type, and Ribbon Data type. The type of particles each of these emits should be evident from their names. As you would expect, Niagara has equivalent methods of its own to determine the type of particles emitted by the Niagara emitters.

Finally, we have the Curve Editor. This used to be the standard Unreal curved editor interface. This interface has since changed in other areas of Unreal Engine (including Niagara); however, it is somewhat frozen in time when it comes to Cascade. The Curve Editor allows the user to modify any values specified in any module that will change across the lifetime of a particle (or an emitter). To make a property editable in the Curve Editor, we need to set that property to DistributionFloatConstantCurve in the Details panel.

To push any module property to the Curve Editor, click on the green box on the left of the module.

Figure 1.12: Click the rightmost green box on a property to add it to the Curve Editor

Figure 1.12: Click the rightmost green box on a property to add it to the Curve Editor

To remove any curve from the Curve Editor, right-click on the property and click Remove Curve.

Figure 1.13: Remove Curve from Curve Editor

Figure 1.13: Remove Curve from Curve Editor

Curve Editor has tools to add/edit points to the curves, which are accessible from the toolbar at the top of Curve Editor.

Figure 1.14: The Curve Editor toolbar has tools similar to those in other animation apps

Figure 1.14: The Curve Editor toolbar has tools similar to those in other animation apps

This briefly sums up the Cascade particle system’s interface. Many of the concepts and tools used in Cascade will be discussed in detail when we learn about Niagara.

 

The reasons behind Niagara’s development

With an expanding user base, the need for a particle system that was more robust and worked across all industries was felt more acutely. The use of Unreal has now extended beyond gaming to industries including architectural visualization, automotive and industrial design, virtual production, and training simulations. This had led to demands for accurate, efficient, and easy-to-use particle workflows. The newer workflows demanded that artists should be able to work on particle systems easily without having to deal with a complex set of tools while also letting the technical team members have access to tools that may not be very user-friendly but allow them to create customized solutions. Particle systems also needed to be more fully integrated with the main code of the Unreal app.

Against the background of these scenarios, the shortcomings of the Cascade particle system started becoming more evident.

The development of Niagara was driven by the following goals:

  • It should be easy to use and put control in the hands of the artists
  • It should be customizable and programmable in every aspect
  • It should have an improved toolset for operations such as debugging, visualization, and performance
  • It should be able to seamlessly interface with other parts of Unreal Engine

Perhaps the biggest issue with Cascade was that it was very difficult to add additional features or customized behaviors to particle systems. Artists were heavily dependent on programmers to add new features. Niagara has made it possible for artists to develop additional features on their own, giving them more control.

Every aspect of Niagara can be customized. Cascade does not offer such flexibility. In Niagara, every parameter of forces acting on particles can be tweaked and connected to external parameters. The user can, for example, drill down and change the force of gravity acting on an object over time using a sine wave. This open-ended architecture puts no limits on the kind of effects that can be achieved with Niagara.

Cascade used CPU resources very inefficiently. CPU and GPU simulations would work very differently. Niagara is optimized to handle both GPU and CPU sims and achieve parity between them. Niagara also has two great tools for debugging simulations. In the Niagara Editor, you can use the Debug Drawing tool to see visual representations of the particle system, while in the game level you can use Niagara Debugger, which shows detailed information about given particle systems in the heads-up display. This helps pinpoint performance and behavioral issues in your particle systems easily.

Niagara works very well with other parts of Unreal Engine. For example, a game object’s speed data can be shared very easily with the Niagara particle system to drive various parameters in the particle system, such as sprite size, the brightness of the particle, or the amount of gravity acting on the particle. This lets game designers create fine-tuned game mechanics very easily in a short amount of time. You also read data from external sources.

Cascade did have some upsides. The module-stacking workflow was a great way to get an overview of the particle system at a glance, and Cascade was very approachable for non-technical artists. However, the node graph paradigm of Unreal is very powerful and was necessary to adopt to deliver the next-gen features promised by Niagara. So, a hybrid method with both a stack and graph was chosen for Niagara, which derives the advantages of both paradigms.

Figure 1.15 illustrates the stack paradigm in Niagara where modules are stacked on top of each other. The stack-based workflow is simpler and suitable for designing basic particle behaviors.

Figure 1.15: The stack paradigm in a Niagara Emitter node

Figure 1.15: The stack paradigm in a Niagara Emitter node

While the stack paradigm is simpler, it can be a bit limiting in its flexibility and hence its capabilities. Therefore, when such flexibility and power is required, a node-based approach is used, as shown in Figure 1.16. You will find Niagara adopting a node-based workflow for designing Niagara modules.

Figure 1.16: The graph paradigm inside a Niagara module

Figure 1.16: The graph paradigm inside a Niagara module

As we will learn later in the book, Niagara also makes it easy for teams to work in parallel developing particle systems by employing a modular approach to development and eliminating production bottlenecks.

All these reasons have helped Niagara replace and improve upon the old Cascade particle system and leave it perfectly poised to take on the challenges of delivering particle effects for the wide variety of industry verticals in which Unreal Engine 5 finds itself being used.

 

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 https://www.youtube.com/watch?v=Vg1niqfDuzs.

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.

 

Summary

In this chapter, we briefly introduced the legacy Cascade particle system. This is important because, while the Cascade particle system is a legacy system, being familiar with Cascade will help you work on any old projects which use Cascade; not only that but Cascade particles are also in extensive use in many ongoing projects in many companies. There are also a lot of Cascade-based particle systems in the Unreal Engine Marketplace that you may need to incorporate in your project (be they current or future projects), so it is worth developing this ability now. After that, we explored the design paradigms in the new Niagara System and discussed the reasons behind the development of Niagara (despite Cascade still being functional). Finally, we looked at the new features expected to arrive in upcoming Niagara versions. In the next chapter, let us delve into some basic particle concepts to lay the foundations for our further learning.

About the Author
  • Hrishikesh Andurlekar

    Hrishikesh Andurlekar is the founder of Tplusplus Interactive, an Unreal Authorized instructor, owner of a Unreal Authorized training center and a Mentor at Mastered UK. He has been a CG Supervisor at Prana Studios and Pixion. He has been working as a contractor/consultant in Unreal Engine for 6 years with leading companies including Reliance Jio Studios, Monk Studios, Prime Focus and True Telecom delivering Games, Simulations, Virtual Production Solutions and AR/VR experiences. He has trained companies around the world through Epic Games. More than 3200 hours of 1-2-1 training conducted for major companies like Technicolor, Yashraj studios, Infosys, Tech Mahindra, TCS, Aptech among others.

    Browse publications by this author
Latest Reviews (1 reviews total)
100% recommending, a great book!
Build Stunning Real-time VFX with Unreal Engine 5
Unlock this book and the full library FREE for 7 days
Start now