Build Stunning Real-time VFX with Unreal Engine 5 - Hrishikesh Andurlekar - E-Book

Build Stunning Real-time VFX with Unreal Engine 5 E-Book

Hrishikesh Andurlekar

0,0
29,99 €

oder
-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

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.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB

Veröffentlichungsjahr: 2023

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Build Stunning Real-time VFX with Unreal Engine 5

Start your journey into Unreal particle systems to create realistic visual effects using Niagara

Hrishikesh Andurlekar

BIRMINGHAM—MUMBAI

Build Stunning Real-time VFX with Unreal Engine 5

Copyright © 2023 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Rohit Rajkumar

Publishing Product Manager: Vaideeshwari Muralikrishnan

Senior Content Development Editor: Debolina Acharyya

Technical Editor: Saurabh Kadave

Copy Editor: Safis Editing

Project Coordinator: Manthan Patel

Proofreader: Safis Editing

Indexer: Hemangini Bari

Production Designer: Nilesh Mohite

Marketing Coordinators: Nivedita Pandey, Namita Velgekar, and Anamika Singh

First published: April 2023

Production reference: 1270423

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

ISBN 978-1-80107-241-0

www.packtpub.com

To my mentor, Shri Sharad Londhe, for all the different perspectives that helped open my mind; my parents, for their support; my wife, Dr. Nilangi Andurlekar, for tolerating me as I wrote this book; and my friends and all the students who unwittingly were the testers for the content of this book.

– Hrishikesh Andurlekar

Foreword

It is my pleasure to write a foreword for this book by Hrishikesh Andurlekar. I have known him for more than 18 years in different roles, from a CG supervisor to a real-time technology expert. Real-time technology has matured over the years and has moved from games to VFX. I have had the good fortune of working with computer graphics in movies as well as interactive graphics for games and virtual reality, and appreciate the overlap of the skillsets in the current games and VFX industry.

After enabling the creation of stunning effects in games, real-time game engines are revolutionizing the way visual effects are created for movies. With the power and speed of modern game engines such as Unreal, VFX artists can now create stunning visual effects in real time, eliminating the need for lengthy render times and costly post-production processes.

This technology has been used to create everything from realistic virtual sets to intricate particle effects, allowing filmmakers to create immersive and realistic worlds on a scale that was previously impossible. By using real-time game engines, VFX artists can see the results of their work immediately, making it easier to iterate and refine their designs.

At Annapurna Studios, we have leveraged real-time technology for movie production, having set up the largest LED volume in India. As our teams started adopting the technology, we felt the need for good training content that explains the basics of the technology, which would lay a solid foundation for our artists.

This book does a fantastic job of helping anybody new to real-time VFX to get started without being overwhelmed. It helps you work your way up and get comfortable with the tool to an extent that you start creating production-ready content. Niagara can be a bit overwhelming, even to artists who are familiar with Unreal, and this book holds your hand through the fundamentals. Hrishikesh not only demystifies the interface but also touches upon advanced concepts such as custom modules and event handlers.

Unreal Engine offers ways to enable directors to experiment on their sets in real time, and this aspect of the workflow is often overlooked by newer entrants in the virtual production field. This is possible through blueprints, and this book also introduces you to workflows where you can tweak particle systems at runtime for games or virtual production studios.

I appreciate the effort Hrishikesh has taken to encapsulate what is a pretty challenging topic into a step-by-step, easily digestible journey into learning particle effects in Niagara. I wish him all the success in the world with many more books to come.

You are in for an awesome journey into Niagara!

P N Swathi

Virtual Production Producer, AGM Annapurna Studios, Hyderabad

Contributors

About the author

Hrishikesh Andurlekar is an Unreal authorized trainer and founder of TPlusPlus Interactive, a studio delivering bespoke interactive content, including white-labeled games and simulations. TPlusPlus is also an Unreal authorized training center. Hrishikesh is a graduate of mechanical engineering from Mumbai University and has worked as a CG supervisor on movies with traditional VFX/CG pipelines with major studios before founding TPlusPlus. He has extensive experience in Unreal Engine, Unity, and Godot.He is also a speaker and a consultant on all things interactive.

About the reviewers

Benjamin Foo is a 3D generalist/Unreal artist who currently focuses on real-time rendering and virtual production. He has 12 years of experience working in broadcast branding, commercials, and film/TV VFX.

Some of the clients Benjamin has worked with include Petronas, Netflix, Astro, Samsung, and Ikea. He is also an avid digital sculptor who goes by the online handle of Jim Banne (Artstation), and he is also a real-time/Unreal Engine mentor at Mastered UK.

Benjamin currently resides in Singapore and reads way too much sci-fi in his free time.

Tuomo Taivainen is an experienced game programmer who has developed gameplay, background systems, AI, and UI in both blueprints and C++ for Unreal Engine 4 and Unreal Engine 5 on projects produced by Kerberos Productions. Tuomo is also a community member and teaching assistant for GameDev.tv.

Naser Eslami is a real-time visual effect artist. He started his career in 2012 as a visual effect artist for animation and commercial TV. In 2016, he became interested in the game industry and real-time visual effects in Unreal Engine. He developed his first game in 2013, and following that, for a few years, he used Unreal Engine for commercial TV and short animation. Today, he is a content creator for the Unreal Engine marketplace, and he loves to create stunning real-time visual effects for Unreal Engine.

Zubaida Nila is an avid academic researcher in extended reality virtual production and visual effects who has a strong background in leading and collaborating with creative industry professionals. She is the first Unreal Engine fellow based in Malaysia who has gone through intensive training with Epic Games under the women creators program. She conducts Unreal workshops at creative industry events and universities, with hundreds of participants joining her speaker sessions and having hands-on experience using Unreal Engine 5, which mostly focuses on lighting and cinematography. Besides running technical workshops, she also seizes opportunities to work on local films and commercials as a visual effects artist. Zubaida is currently working on her thesis for her master’s and is on the journey to becoming an authorized Unreal trainer.

Table of Contents

Preface

Part 1: Introduction to Niagara and Particle Systems in Unreal Engine 5

1

Getting Started with Unreal Engine Particle System Frameworks

Technical requirements

Particle systems in Unreal

Cascade particle system

Creating an emitter

The reasons behind Niagara’s development

Use cases for Niagara

Summary

2

Understanding Particle System Concepts

Technical requirements

Exploring key particle concepts

Functionality

Module groups

Vector mathematics and matrices and their representation in Niagara

What is a vector?

Vector operations

Magnitude and unit vectors

Representation of vector operations in Niagara

Matrix operations

Understanding particle system tools

Afterburn

RealFlow

Trapcode Particular

Particle Illusion

nParticles

PopcornFX

Houdini

Summary

3

Exploring Niagara Concepts and Architecture

Technical requirements

The Niagara architecture

Niagara’s hierarchical hybrid structure

Stack groups

Summary

4

Building Our First Niagara System

Technical requirements

Exploring the Niagara Editor UI

The Niagara Editor

The Preview panel

The Parameters panel

The System Overview panel

The Local Modules panel

The Selection panel

Creating an Emitter

Taking a step toward achieving the target effect

Enabling the fountain’s movement in a random direction

Helping the particles stretch in the direction of movement

Changing the colors of the sprites

Enabling collision with the floor

Making the particles cast light

Creating a Niagara System

Adding a Niagara System to a level

Adding a Niagara System to a Blueprint Actor

Summary

5

Diving into Emitter-System Overrides

Technical requirements

Module Override

Parameter Override

Summary

Part 2: Dive Deeper into Niagara for VFX

6

Exploring Dynamic Inputs

Technical requirements

What are Dynamic Inputs?

Creating random colored particles using Dynamic Inputs

Summary

7

Creating Custom Niagara Modules

Technical requirements

Creating a new module

The Niagara Module Script Editor

Editing a Niagara Module to create custom effects

Understanding how the module works

Creating a Presence Detector particle effect

Create a blueprint class containing a Niagara System

Summary

8

Local Modules and Versioning

Technical requirements

Exploring Local Modules

Create a lighting effect using modules

Publishing modules and versioning

Summary

9

Events and Event Handlers

Technical requirements

What are Events and Event Handlers?

Tutorial – how to create fireworks

Death Event

The Collision Event

The Location Event

Summary

10

Debugging Workflow in Niagara

Technical requirements

Exploring the Niagara Debugger panel

The Particle System Playback Options toolbar

Debug Hud

FX Outliner

Debug Drawing

Performance profiling

Debug console commands

Summary

11

Controlling Niagara Particles Using Blueprints

Technical requirements

Exploring the User Parameters module

Calling Niagara User Exposed settings from Blueprint Actors

Tutorial – modifying a Niagara System using Blueprint Actors

Creating the Niagara System

Sampling the mesh

Sampling the texture

Emitting particles only from the white area of the logo

Adding animated sprites using SubUV to the particles to have a flame animation

Connecting User Exposed parameters to module parameters

Creating the Blueprint Actor

Creating the material for the plane geometry

Connecting the blueprint public variables to the Niagara User-Exposed Parameters

Organizing our public variables into a category

Testing our Blueprint Actor

Summary

Index

Other Books You May Enjoy

Preface

Unreal Engine’s Niagara is a powerful visual effects system developed by Epic Games for their Unreal Engine. It allows developers and artists to create stunning and complex particle effects and simulations in real time for use as high-quality visuals in games, films, and other interactive experiences. The learning curve is, however, very steep, and it is very difficult for beginners to get started with Niagara. This book addresses this issue and gives a gentle but detailed introduction to Niagara.

Who this book is for

This book is aimed at beginners who want to learn about Unreal Engine’s Niagara, a powerful visual effects tool used for creating complex particle simulations in real time. Whether you are a game developer, a visual effects artist, or a hobbyist, this book provides a comprehensive introduction to the Niagara system, its features, and its functionality. With clear explanations, practical examples, and step-by-step guidance, this book will empower you to create stunning particle simulations and visual effects in Unreal Engine.

What this book covers

Chapter 1, Getting Started with Unreal Engine Particle System Frameworks, gives a little history of particle systems in Unreal Engine.

Chapter 2, Understanding Particle System Concepts, helps you learn about foundational particle system concepts.

Chapter 3, Exploring Niagara Concepts and Architecture, teaches Niagara-specific concepts and provides an overview of its architecture, relevant terminology, and workflow.

Chapter 4, Building Our First Niagara System, gives an introduction to the UI and helps you create your first system.

Chapter 5, Diving into Emitter-System Overrides, takes a look at module and parameter overrides and workflow tips.

Chapter 6, Exploring Dynamic Inputs, helps you learn how to use dynamic inputs to extend parameter inputs and complex behaviors.

Chapter 7, Creating Custom Niagara Modules, explores extending the power of Niagara with custom-built modules.

Chapter 8, Local Modules and Versioning, demonstrates quick and dirty module development techniques and how to keep track of versions.

Chapter 9, Events and Event Handlers, examines the interaction between emitters using events and event handlers.

Chapter 10, Debugging Workflow in Niagara, delves into working with the Debugger panel, debug drawing, and debug console commands.

Chapter 11, Controlling Niagara Particles Using Blueprints, teaches you how to make an easy-to-use asset embedding a Niagara system in a blueprint and control the Niagara system through public variables.

To get the most out of this book

Before diving into Unreal Engine’s Niagara, it’s recommended that you have a basic understanding of the Unreal Engine editor. Additionally, familiarity with visual scripting languages such as Blueprint or similar programming languages will be helpful but is not required.

It’s also beneficial to have a general understanding of computer graphics and the concepts behind particle systems, such as emitters, particle lifetimes, and particle attributes. Familiarity with vector math and basic physics concepts can also be useful when working with particle simulations. Some of these basics are covered in the initial chapters.

Software/hardware covered in the book

Operating system requirements

Unreal Engine 5.1 – Niagara

Windows, macOS, or Linux

The recommended OS is Windows 11.

All the exercises in the book are available in a project posted on the GitHub link given in the next section. If your Niagara systems are not working as intended, please download the project file to find examples of working Niagara systems and figure out what you may have overlooked. If you are using a more recent version of Unreal than 5.1.1, please double-check for any errors that may crop up in the project during the project upgrade.

Download the example code files

You can download an Unreal project file for this book from GitHub at https://github.com/PacktPublishing/Build-Stunning-Real-time-VFX-with-Unreal-Engine-5. If there’s an update to the project, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/jM6sa.

Conventions used

There are a number of text conventions used throughout this book.

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “These include the Beam type, GPU sprites type, Mesh type, and Ribbon Data type.”

Tips or important notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you’ve read Build Stunning Real-time VFX with Unreal Engine 5, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

Download a free PDF copy of this book

Thanks for purchasing this book!

Do you like to read on the go but are unable to carry your print books everywhere?

Is your eBook purchase not compatible with the device of your choice?

Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.

Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.

The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily

Follow these simple steps to get the benefits:

Scan the QR code or visit the link below

https://packt.link/free-ebook/9781801072410

Submit your proof of purchaseThat’s it! We’ll send your free PDF and other benefits to your email directly

Part 1: Introduction to Niagara and Particle Systems in Unreal Engine 5

The objective of this section is to familiarize you with the basics of particle systems and introduce you to the Niagara user interface. It walks you through creating your first Niagara system and covers the system hierarchy and the workflow around it.

This section comprises the following chapters:

Chapter 1, Getting Started with Unreal Engine Particle System FrameworksChapter 2, Understanding Particle System ConceptsChapter 3, Exploring Niagara Concepts and ArchitectureChapter 4, Building Our First Niagara SystemChapter 5, Diving into Emitter-System Overrides

1

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 UnrealThe Cascade particle systemThe reasons behind Niagara’s developmentUse 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:

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.Sign in or create an account: If you already have an Unreal Engine account, sign in. If you don’t, create a new account.Launch the Epic Games Launcher: Once you’ve signed in, launch the Epic Games Launcher.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.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 RAM256 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

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

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

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

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

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

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

Figure 1.7: The Cascade interface

There are six main zones in the Cascade interface:

MenuBarToolBarViewportEmitters PanelDetails PanelCurve 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 optionsThe 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 windowRestart Level: This resets the particle system instance in the levelThumbnails: This takes a snapshot of the Viewport and saves it as a thumbnail in the Content BrowserBounds: This toggles the Bounds display in the ViewportOrigin Axis: This toggles the origin axis of the particle system in the ViewportBackground Color: This changes the Viewportbackground colorLevel 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 + RMBto 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

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

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

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

After the Requiredand 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 modulesAttractor modulesBeam modulesCamera modulesCollision modulesColor modulesEvent modulesKill modulesLifetime modulesParticle lightsLocation modulesOrbit modulesOrientation modulesParameter modulesRotation modulesRotation Rate modulesSize modulesSpawn modulesSubUV modulesVector Field modulesVelocity 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

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

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

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 artistsIt should be customizable and programmable in every aspectIt should have an improved toolset for operations such as debugging, visualization, and performanceIt 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

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

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.