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)
1
Part 1: Introduction to Niagara and Particle Systems in Unreal Engine 5
7
Part 2: Dive Deeper into Niagara for VFX

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.