From the course: Cert Prep: Unity Certified Associate Game Developer Audio and Effects

Create a VFX graph asset - Unity Tutorial

From the course: Cert Prep: Unity Certified Associate Game Developer Audio and Effects

Start my 1-month free trial

Create a VFX graph asset

- [Instructor] Unity now has two different Particle Systems for creating interesting effects like fire, fog, rain, smoke, fiery dust, traffic, birds, bees and all kinds of other stuff. In this chapter, we're going to be looking at the first of those two systems, the VFX Graph, which is available at least for the moment, only in the HD Render Pipeline. We're going to be working together over the course of the next few videos to create the Particle System that you can see in front of you here, this fiery smoky pillar of energy that you can just see here created with the VFX Graph. We'll be creating this, and to do that, I'm going to be jumping over to a completely new and different project to take this from the very top. So I've jumped over here to a new HD Render Pipeline project. This is included inside the course exercise files. It includes some textures that have been imported from the Unity Particle System package which is available from the Unity Asset Store. By checking out the textures folder here, you'll see a range of additional textures that we will be using to create this VFX Graph Particle System. So I'm going to move to the project panel, right-click, choose create, and then I'm going to select Visual Effects and select Visual Effect Graph from the context menu. In creating this, I'm going to name the Particle System we'll be creating. I'll call this VFX Fire and press Enter on the keyboard to accept those changes. Then I'll double-click the Fire System here. Now, when I double-click the Fire System Unity thinks about that for a while but it opens this free floating window which is the Particle System Editor. Now, it appears free floating at least by default, but I'm going to dock that into the scene here so I can see the editor on the right-hand side here. And then I can see the left-hand side the View port. You can maneuver around this view by just holding the middle mouse button on your mouse and then panning your mouse around, and you'll see these nodes connected in this tower of nodes here. in the left-hand side, we don't have any kind of pre-visualization of our Particle System but we can easily add that to the scene. All I need to do is to drag and drop the VFX Fire into the scene here, and we can see particles being generated in the scene. Now, you don't see the visualization of the Particle System, make sure that you hit play on the preview controls. And also that you can view Particle Systems inside the View port. To do that, you move to the toolbar here, click on the dropdown and make sure that you have Visual Effect Graphs activated here. So that way you can see the Visual Effect Graph results. So here on the left-hand side we are viewing the Visual Effect Graph that we are building here on the right-hand side. So you can see here, if I just scroll in a little bit further that we have some controls here linking from the top to the bottom. So right at the top, we have the spawn group. And this controls how quickly new particles will be generated into the scene. You can see that by default the rate is 16. If I wanted to increase the speed of that we can easily do that. I could change, for example, 16 to let's say 128. Now doing that, I'm going to increase the generation of particles in the scene. As I begin to tweak these numbers, Unity will sometimes recompile the Particle Systems. So it might take a little while for the changes to update in the View. You can also see we have a capacity setting here, which reflects the total number of particles that can exist at any one time. I can change this, for example, from 32 to 2000, and again Unity will recompile the system. And you can see we have a greater burst of particles in the scene. But I'm going to change the rate here back to 16, which was the default value. And I'm going to change capacity not to 32 but to leave that at 64. The system is then recompiled and we can see the changes. If the Particle System does not automatically update for you, make sure that the auto button is activated here. You can also compile the Shader manually by choosing the Compile button here.

Contents