Search Unity

Create spellbinding visual effects with our advanced VFX guide

December 6, 2022 in Games | 8 min. read
Create spellbinding visual effects with our advanced VFX guide | Hero image
Create spellbinding visual effects with our advanced VFX guide | Hero image
Share

Is this article helpful for you?

Thank you for your feedback!

Visual effects examples from "The definitive guide to creating advanced visual effects in Unity" e-book.

The sparks from a magic spell, plumes of smoke, ultraviolet or electric blue energy bolts, city lights seen through mist or rain, open fields of swaying grass... It’s hard to imagine a modern game without the evocative power of visual effects.

Visual effects are the key to creating deeply immersive experiences for your players. And thanks to continuous hardware advancements, what used to be available only for Hollywood blockbusters can now be attained in real-time.

VFX Graph is one of several major toolsets available in Unity for artists and designers to create with little or no coding. With its node-based visual logic, you can create any number of simple to complex effects for projects across genres.

Our new 120-page e-book, The definitive guide to creating advanced visual effects in Unity, guides artists, designers, and programmers using the Unity 2021 LTS version of VFX Graph. Use it as a reference for producing richly layered, real-time visual effects for your games.

Collage of images from "The definitive guide to creating advanced visual effects in Unity" e-book

Robust VFX authoring

The SpaceshipHoloTable from the Unity Spaceship Demo, available on GitHub and Steam
The SpaceshipHoloTable from the Unity Spaceship Demo, available on GitHub and Steam

The VFX Graph creates GPU-accelerated particle systems, and therefore requires compute shader support to maintain compatibility with target devices. It works with the Universal Render Pipeline (URP, including the 2D Renderer) and the High Definition Render Pipeline (HDRP).

Compared to the Built-in Particle System, the VFX Graph can drive more particles with faster simulation, customizable behaviors, extensibility, Camera Buffer access, and native Shader Graph integration. You can use any custom shader created in Shader Graph to target VFX Graph. These shaders are able to use new lighting models like HDRP hair or fabric, and can even modify particles at the vertex level to enable effects like birds with flapping wings, wobbling particles like soap bubbles, and so much more.

A vivid and highly informative guide

The Magic Lamp sample scene from the VFX Graph Samples package
The Magic Lamp sample scene from the VFX Graph Samples package

The VFX Graph e-book is as beautiful to look at as it is inspiring and informative. Created in collaboration with Wilmer Lin, a veteran VFX artist from the film and games industries, and internal experts on the Unity Graphics team, it’s generous in scope, level of detail, thoughtful instruction, images and videos, and numerous downloadable resources and references for VFX authoring in Unity.

Let’s take a quick look at what’s in the guide.

This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers.

Video tutorials, such as this one, supplement the content of the e-book and will be available on Unity’s YouTube channel shortly.

Understand the anatomy of a VFX graph

The VFX Graph window
The VFX Graph window

Get a thorough understanding of each part of the VFX Graph, starting with the VFX Graph Asset and component, and the VFX Graph window. Learn how to create logic with Systems, Contexts, Blocks, Properties, Operators, Blackboards, Subgraphs, Events, Attributes, and more.

Connect the moving parts to create interactivity

Using a Property Binder to create a Bézier curve effect for the genie in the Magic Lamp sample scene
Using a Property Binder to create a Bézier curve effect for the genie in the Magic Lamp sample scene

Visual effects often involve many moving pieces. Connecting them to the correct points in your application is essential to integrating them at runtime. You’ll learn about the available tools for playing back an effect and how to use them:

  • Event Binders: These listen for several different things that happen in your scene and react to specific actions at runtime.
  • Timeline: Sequence visual effects with Activation Tracks to send events to your graph at select moments. Gain precise control with pre-scripted timing (e.g., playing effects during a cutscene).
  • Property Binders: These link scene or gameplay values to the Exposed properties on your Blackboard so that your effects react to changes in the scene, in real-time.

Explore detailed VFX Graph sample scenes

GooBall is back: The very first Made with Unity game returns as a VFX sample scene.
GooBall is back: The very first Made with Unity game returns as a VFX sample scene.

Colorful swarms of Particle Strips, explosive effects for a crashing Meteorite, and an extra slimy GooBall: These are just a few of the effects you’ll find in the Visual Effect Graph Samples (HDRP).

Each sample highlights different scenarios involving the VFX Graph. For a better understanding, this section of the e-book examines how some of these samples were created, namely through the use of:

  • Shader and VFX Graph together
  • GPU Events to trigger other systems in the same graph
  • Organic movement added to Particle Strips via the Noise Operator, and available Blocks for customizing each Particle Strip’s texture mapping, spawning, and orientation
  • A single graph to drive other graphs in a visual effect
  • A Spawn Context to trigger many other effects
  • Experimental mesh sampling to fetch data from a mesh and include the result in the graph

See the e-book for more clips that show the different samples, including the following introduction to the GooBall scene.

This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers.

The GooBall VFX sample: More clips and videos are linked in the e-book.

Enhance your visual effects with pipeline tools

A Vector Field drives the UnityLogo effect.
A Vector Field drives the UnityLogo effect.

Effects aren’t isolated in a vacuum. Often you’ll need to supply them with external data to achieve your intended look.

What if you want the genie to emerge from a magic lamp? Or you’d like to integrate a hologram? While you can accomplish much of this with math functions and Operators, you might need the effect to interact with more complex shapes and forms.

This section explains how to use three Data types supported in Unity to enhance your visual effects: Point Caches, Signed Distance Fields, and Vector Fields. Other tools you’ll learn about are the VFXToolbox, which features additional tools for Unity VFX artists, and Flipbook Texture Sheets to bake animated effects into a sprite.

Download the e-book and let us know what you think

The definitive guide to creating advanced visual effects in Unity | E-book

Other chapters in the guide cover optimization techniques for visual effects, future developments for VFX Graph, and finally, a long list of tutorials and videos. We’re thrilled to be able to offer you this valuable resource, which is free to download (as all of our technical e-books are). Please don’t hesitate to share your feedback with us in this forum.

For a full list of available Unity e-books, check out the How-to hub or browse the documentation under Working in Unity > Best practices guide.

December 6, 2022 in Games | 8 min. read

Is this article helpful for you?

Thank you for your feedback!

Join a discussion on our Forums
Related Posts