Search Unity

Scary metal character with red eyes
Scary metal character with red eyes
Topics covered
Share

In 2020 LTS and 2021.1, VFX Graph’s updates have primarily focused on stabilization, performance optimization, better integration with gameplay using the new CPU event output, and more possibilities to spawn particles from meshes.

As we look forward to 2021.2 and beyond, our main goal is to push both platform and content reach, with refined support for the Universal Render Pipeline (URP), heightened compatibility with 2D, and extended platform reach (compute capable mobile, Oculus Quest, Switch, etc.) We also want to incorporate more tools for building and customizing your VFX – particularly with the advanced integration of Shader Graph in VFX Graph. This provides direct access to all URP and High Definition Render Pipeline (HDRP) master nodes, like hair and fabric, as well as a Signed Distance Field baker tool in-Editor, to save you time otherwise spent back-and-forth with third-party tools. We’re even adding support for graphics buffers to develop advanced simulations, like dynamic hair, without having to leave the GPU.

To accelerate project development, we’ve added a new sample in the sample library and updated the library to 2020 LTS. We’ve also upgraded the Spaceship demo, in light of its second anniversary. From visual improvements to better project compatibility with 2020 LTS, Mac, and Linux support, you can now choose between various quality settings to run the demo on a wide range of desktops.

Getting started

Before you get started with VFX Graph, we recommend watching the following short videos for a quick overview of the tool:

Creating fire, smoke, and mist effects with VFX Graph in Unity

Rendering particles with Visual Effect Graph in Unity

Multilayered effects with Visual Effect Graph in Unity

Once you’re ready to go, you can experiment with the HDRP Scene template in the Unity Hub as a starting point for your next project. This template contains a variety of lighting conditions to test your own particle systems, in addition to a few particle systems that have already been integrated, such as dust, butterflies, and falling leaves in the glass cage.

If you want to create an entirely new effect, you don’t need to start from scratch. Use the nodes in the system category to harness pre-configured setups for the main use cases.

Showcasing different effects in-editor

For complete systems, you can download the VFX Graph samples, which include effects like the bonfire, butterflies, and magic book, in addition to brand new effects that will be revealed later in this post.

Once you start using nodes, you can access contextual help with the new tool tips and error messages in 2020 LTS, or get further guidance from the updated documentation.

Showcasing aspects of VFX in-editor
Showcasing aspects of VFX in-editor

For some in-depth content, check out this list of tutorials and VFX breakdowns created by our accomplished teams of artists working on various productions:

If you’re looking for even more, take a look at these time-saving tools to ramp up your project:

New Meteorite sample

Short animation of a cartoon meteorite hitting a small forest scene

The new Meteorite sample showcases a complete scene with interactions between diverse elements triggered by the meteorite’s impact. This sample was made using a new feature in 2020 LTS called VFX Output Event Handlers, which chains events and additional effects with a timeline.

Still image of meteorite in the middle of hitting a small forest scene
Visual showing the many branching components of the meteorite's impact from the backend

Benefits of the Output Event Handlers

VFX Output Event Handlers are used to create the camera shake, the impulse of planks, as well as the light animation.

In this example, we use the Output Event to trigger a camera shake with a script component in the Inspector for the VFX. The camera shake gets velocity information from the Spawn Event Velocity node and is spawned as a single burst, 1.15 seconds after the main FX is triggered.

Visual of the Output Event to trigger a camera shake with a script component in the Inspector for the VFX.
Image of the in-editor VFX Output Event

Reactive rendering grass

The reactive grass, which comprises VFX particle strips, interacts with another effect that is rendered into a render texture to trigger the blast and burning. This buffer VFX reacts because of a VFX output handler on the main meteorite.

A camera is set up to record the buffer VFX (which is not rendered by the main camera) and saves it to a render texture used in the grass to implement wind blasts, for example, and dissolve shader and flame effects. This is how information flows from one effect to another and keeps everything in the same position.

Image depicting how the camera is set up to record the buffer VFX

Timeline for enhanced synchronization

Timeline is another great tool for VFX artists. It can be used to trigger many effects and adjust their timing as needed.

Image showing the timeline in-editor

Additional effects, such as light flash, flying birds, and falling leaves were initially linked to a button canvas with the main VFX, but later changed to be used in Timeline with the Demo Scene.

The trees were also made using VFX graph mesh outputs, subgraphs, and Shader Graph, which enable you to randomize many of their parameters.

Spaceship demo

We’ve come a long way since the initial release of our first spaceship demo. Over time, this demo has been polished, optimized, and upgraded to every major version of Unity, and is now nearing the end of its upgrade lifecycle.

Download the demo here, then watch this video for a brief introduction to the project. This example demonstrates the importance of integrating and optimizing different features together in a real production.

Please note that we made some slight changes and improvements to the demo’s content in 2020.3 to reflect many of VFX Graph and HDRP’s latest features.

Looking into space

The more we thought about it, the more we realized the importance of actually seeing your intergalactic surroundings while out exploring in space (why else would you be in a spaceship?) That’s why we finally implemented new details to the demo, so you can get a glimpse of outer space from the spacecraft – planets and all.

 

Animation of a spaceship looking out into space at a large planet

To emphasize the turbulent trajectory of the spaceship, we also added a secondary shake to the environment cubemap, with a different noise, on top of the camera shake.

Sparkle, sound, and light sync done right

While we had previously altered the way that we handled sparkles by using a script to synchronize its sound effects and light animations, we decided to make it even more accessible to VFX artists.

Animation of sparks flying from the ceiling in a spaceship

We updated the system to use the Output Event Handlers as part of the additional VFX Graph samples (new in 2020.3). We changed the behavior of the VFX, so that the random spawn occurred directly in the VFX Graph, and configured the duration of the flash at that time.

Image describing the orchestration branch

Then, with support from a Prefab spawn and Play Audio Helpers, we were able to perform the random spawn entirely in VFX Graph, and synchronize its light and sound effects with the Spawn Context. By using the Flash Lifetime attribute as delay, the VFX Output Event Prefab spawn was also able to disable the Prefab after that time span.

Image depicting the VFX Output event prefab spawn

Quality settings and specific content

We implemented a Quality Settings option to run the Spaceship demo on a wide range of hardware. This allows for more detailed post-processing, volumetrics, and increased lights during the walkthrough in an Ultra Quality mode, no matter the device.

We even added a low-quality option for low-end gaming hardware – down to GTX 760 – disabling the most expensive options.

We aim to release the final Spaceship demo later this year, with a project upgrade to 2021.2 that brings accelerated performance, NVIDIA’s DLSS and AMD FSR support, and many more exciting, unannounced features – so be sure to stay tuned.

New and noteworthy updates to 2020 LTS and 2021.1

We’ve added many new features to the 2020 LTS version, leading up to the 2021.1 development cycle, which centers on bug fixes that will benefit both versions. Here are a few highlights.

Import and iterate fast on flipbooks

The improvements made to our Image Sequencer, to scale with additions to the Texture Import, are also handled by VFX Graph in 2021.1. You no longer need to set the rows and columns manually when changing flipbook textures in VFX Graph, since we added new options to import flipbooks as Texture arrays, where the row and column values are stored directly in the Importer and handled automatically by Image Sequencer.

Showcasing the improvements made to our Image Sequencer

Spawning particles from meshes

Animated woman running while on fire

With the new Skinned Mesh Sampling feature in 2021.1, you can create flames and trails, while dissolving, morphing, and implementing many other effects on both characters and objects.

To explore this feature, use the Position (Skinned Mesh) operator in either Initialize, Update, or Output contexts – depending on the effect you want to achieve.

Next, set up an exposed Skinned Mesh Renderer property with a transform in the blackboard.

Image showcasing getting the transform information of your Skinned Mesh in the Scene in order to position the effect in the right place

After linking your Skinned Mesh to the position block in your desired mode, you need to get the transform information of your Skinned Mesh in the Scene in order to position the effect in the right place. Leverage the VFX Game Object Inspector to do this. With support from the Property Binder, you can locate the component needed to bind the hierarchy of your skeleton.

Image going through the user interface indicating what each portion does

Here is another example of Skinned Mesh Sampling in the Update context:

Showcasing an example of Skinned Mesh Sampling in the Update context

We look forward to seeing the amazing content that you’ll create using Skinned Mesh in VFX Graph.

Optimized performance using Mesh LOD

Image of generated space with a planet, meteorites, and a sun in the background

Special effects that use mesh outputs can now be optimized through the implementation of a level of detail (LOD) system, so you can manually specify simpler meshes for distant particles.

When selecting a mesh output in the Inspector, you can access a new Mesh Count property that allows you to specify up to four meshes for your output. If you enable the LOD checkbox under it, your particles will select meshes based on the percentage of the screen that they occupy.

Showcasing the ability to modify the LOD values field in your output to designate the minimum percentage of the screen that each of your meshes must occupy to be visible

You can modify the LOD values field in your output to designate the minimum percentage of the screen that each of your meshes must occupy to be visible. For example, a value of 10 means that this particular mesh will only be visible if it occupies at least 10% of the screen. To improve performance while maintaining the visual quality of your effects, you can select simpler meshes and smaller LOD values for particles that are further away. The LOD values can also be adjusted at the same time, for all meshes, by modifying the Radius Scale value.

As shown in the planetary ring example below, implementing LODs for mesh particles can improve performance from nearly six to more than 60 frames per second (fps), without any noticeable visual impact.

Image showcasing the difference in frames per second between no mesh LODs and with mesh LODs

What’s next

In the upcoming versions, starting with 2021.2 beta, we want to push both platform and content reach further through:

We also want to provide more tools for you to build and customize your VFX, such as:

Similarly, there’ll be extra support for Graphics buffers, so you can leverage more advanced simulations without leaving the GPU during development.

If you want to experiment with these updates, the majority of them are already available for you to test and provide feedback on as part of 2021.2 beta (but please keep in mind that they’re still in the process of evolving).

For more information on what’s to come in future releases, you can always visit our Graphics Product Roadmap to vote for specific features, inform us of your needs, and submit new ideas or requests.

 

The following is intended for informational purposes only, and may not be incorporated into any contract. No purchasing decisions should be made based on this material. Unity is not committing to deliver any functionality, features, or code. The development, timing, and release of all products, functionality, and features are at the sole discretion of Unity, and are subject to change.

Topics covered