VG2, Quest 8 - Particle Systems

Download Files

Supporting files for VG2 quests are part of a single archive that you can download here.

(Optional) View Sample Project

Do NOT install this package in your main project. The Unity Particle Pack sample is meant to be installed in a blank project. Installing in your class project will inflate the size and create conflicts with your assignments.

Unity has created a particles showcase as part of the Unity Particle Pack at https://assetstore.unity.com/packages/essentials/tutorial-projects/unity-particle-pack-127325. This sample project takes the form of an exhibit hall showcasing various particle effects. In class, we will examine and dissect various effects from this collection.

Set Up Scene

Create a new blank 3D scene file and save it as "/Assets/Scenes/Particles.scene". We will be starting from an empty scene and will NOT be building off a scene from a prior assignment this time.

Import Texture Files

Four image files have been supplied in the class files for this assignment. Locate Flame01.tif, LargeFlame01.tif, SmokeLoop.tif, and smokeysteam.tif and drag these into your /Assets/Textures/ project folder.

Import Settings

You can configure all 4 textures at once by selecting them at the same time. Check that each of the textures has the correct import settings.

Create Materials

Before Textures can be sent to a Renderer, they are applied to a Material which processes the texture(s) through a Shader. Consider this as a simplification render pipeline: Texture(s) + Shader + Settings -> Material -> Renderer

Shaders have many differentiators, but notice how some of these materials will use a standard shader vs. an unlit shader. Unlit shaders do not respond to lighting. In our project, this category of shader makes sense for objects that emit their own light. For example, flame effects are unlit because there is no need to compute a shadow for an object that is portrayed as light.

Create an /Assets/Materials/ folder and use the Project window's Create (+) button to make the 5 materials portrayed below.

The Flame01 material will use the Flame01 graphic as an albedo texture. Be sure to match any other settings.

The LargeFlame01 material will use the LargeFlame01 graphic as a texture, but notice how it uses it for both albedo and emission to create a self-illuminating effect. Be sure to match any other settings.

Unlike the fire-related materials, the Smoke02 material uses the standard surface shader, which means it is affected by lighting and can receive shadows. Use the SmokeLoop graphic with a strong grey tint to texture this material. Be sure to match any other settings.

The SmokeySteam03 material uses the smokeysteam graphic for texturing and a surface shader. Notice that it has a grey-tinted emission (with no texture) in order to create the effect of steam scattering light. Be sure to match any other settings.

Finally, the Embers material uses an albedo texture that may appear difficult to find at first. You can locate the "Default-Particle" texture used in the Embers material by clicking the small selection circle next to the "Albedo" label.

With all of your materials configured, your collection should look like what is shown below:

Particle Effect 1 - Flames

Frequently, an entire particle effect is actually a combination of particle systems working together. To manage the effect as a group, it is common to nest children particle systems in a parent object. Create this game object structure:

This game object structure suggests that our LargeFlames particle effect is actually two particle systems with a FireEmbers particle system supplementing the LargeFlames. Add a "Particle System" compontent to the LargeFlames game object. You will see in the Scene view that the particle system immediately begins emitting default pink particles. Pay attention to how these particles change as you modify various settings.

By inspecting the Particle System component on LargeFlames, you'll notice that it's divided in many configuration categories. It's really important that if a category is not mentioned in these instructions, it must be TURNED OFF. For example, not all particle systems in this assignment use the renderer. To help avoid confusion what should be on and off, we'll simply turn everything off to start until we configure the categories we need.

For these instructions, we will work through the categories in an order that helps portray their effect rather than going in order. First enable both the Renderer and Emission categories. Notice how this produce a constant stream of pink squares.

Expand the Emission category. Note that the current "Rate over Time" of 10 means the particle system is spawning 10 pink squares per second. Update the settings so that the system spawns 1 particle per second, and 2 particles for every unit of distance moved. (Move the particle system around to see this effect.)

Expand the uppermost category for LargeFlames. Most of these settings are best explained by hovering over the label and reading the explanatory popup. A couple will be called out specifically below.

When a setting has two boxes, that means a number will be selected at random between those two numbers. If the two boxes are missing, you can enable them from the drop-down menu.

Changing the simulation space of a system from local to world means the particle moves in the global coordinate system and no longer follows the source game object that spawned it. Try moving the particle system around the scene and notice how the particles still move independently.

Enable and open the Shape category. Particles can be emitted in a variety of shapes. We want our flames to emit from a circle as if it were contained in a fire pit. It's especially important to rotate on the X axis, so the circle is flat with the rest of the game world.

Enable and open "Size over Lifetime." The default setting of using a curve lets you change the size of the particle as time progresses. Instead, we want a constant size, but in a random range. Use the drop-down menu to match this configuration and notice how the pink squares now spawn with random sizes.

Open the Renderer category (which you enabled previously). This is the configuration that will replace the pink squares with the flame graphics (although with some visual bugs for now). Notice in the second picture below that there is a shortcut for applying the correct "Custom Vertex Streams" by inspecting the LargeFlames01 material and clicking "Apply to Systems."

At this point, the flames appear as a grid instead of as an animation.

Enable and open "Texture Sheet Animation" and implement these settings to tell the particle system how to convert that grid of flames to an animation. To provide some variety in the flames, we also specify a random start point within the animation loop.

The flame effect looks nearly finished. The next thing to fix is how the fire very abruptly pops in and suddenly disappears when an individual particle begins and ends its lifecycle. We will use "Color over Lifetime" to fade the transparency of the flame in and out over its lifetime. In the Gradient Editor window, the bottom markers control tint color (which we will leave at white so that there is no color change), while the top markers control transparency. At location 0% transparency (alpha) will be 0. You can add more markers by clicking where you want to add them, and you can remove markers by dragging them away from the color bar. At about location 15%, transparency will rise back to full (255) and stay there until location 75%. At location 100%, transparency falls back to 0. This creates the effect of fading in and fading out over the time. A lot can be determined just by observing the marker colors and positions, and future diagrams may not tell you all the exact numbers to choose. In these situations, it is OK to estimate values that are not shown in the diagram. (Conversely, if a number is shown in a diagram, it is extremely important that you match it.)

FireEmbers

At this point, the LargeFlames system is complete and it is time to configure the child FireEmbers system. Just like before, turn off all of the categories until you actually need to configure them. We will start with the Emission and Renderer categories enabled.

Settings for the Top section:

Settings for the Emission section:

Enable and configure the Shape section. You should see the pink particles emanating upwards as a cone at this point.

Configure the Renderer.

Enable and configure Color over Lifetime. The gradient fades transparency in and out like the flames, but also transitions from white to burnt orange.

Enable Size over Lifetime. To configure this curve, you should expand the Curves tool at the bottom of the Inspector. The last preset icon is the curve shape needed for this effect. It is extremely important to make sure the Size (on the left of the curve chart) matches the diagram. A correct curve shape could still be ten times too large or too small if size is incorrect.

Finally, to add some organic randomness to the paths of the embers, enable and configure the Noise section.

The completed particle effect showing both LargeFlames and FireEmbers particle systems:

Particle Effect 2 - Rocket Trails

Create a RocketTrail game object with these 3 child game objects.

Rotate the parent, so that our rockets fire in the proper direction.

We'll start with the parent RocketTrail system and then work through the children systems. Attach a Particle System component to Rocket Trail. Turn off all of the components except Emission and Renderer. We will eventually turn off the renderer on this system. For now, it is on for debug and visualization purposes.

Use these settings for the main configuration.

Emissions can be configured to emit in bursts every time the particle system starts (including after it loops back to the beginning).

Enable and configure "Size over Lifetime" to finish the parent system for now. Even though this parent system will eventually be invisible, some of its sub-emitters will inherit this size.

You should see a pink square intermittently shoot into the sky. This represents our rocket flying through the air. The RocketTrail particle effect is interesting because the parent particle system will be invisible. (We will turn off this pink square in a future step.) As this particle travels through the air, it will generate other particle systems which will be visible instead.

To prepare for this concept, enable the Sub Emitters section, but leave it unconfigured for now. We will revisit when we finish the other particle systems.

Launch Smoke

Add a particle system to Launch Smoke, and turn off all categories except Emission and Renderer.

Back on the parent RocketTrail particle system, add the Launch Smoke particle system as a child sub-emitter.

Return to the Launch Smoke particle system and configure the main settings for Launch Smoke. Notice how Start Color shows a white rectangle with a partial black bar on the bottom. This means the overall color is white, but it is partially transparent. Make sure to configure your settings to match this shape.

Skip to the Renderer for Launch Smoke and fill in these settings so the smoke will be properly visible as we configure it. Remember that you can automatically fill in all of the Custom Vertex Streams by inspecting the SmokeySteam03 material asset and clicking "Apply."

The Texture Sheet Animation settings will ensure the particle actually portrays animated smoke instead of a grid of graphics.

These Emission settings will emit the particles in several bursts when the rocket launches. You can see how this peppers the air with smoke near the launch point.

Refine the Shape of the particle spawn area.

These Velocity over Lifetime settings will cause the particles to increasingly rise over time (y-axis velocity) and spread out (z-axis velocity). Take special notice of the Radial value which will project the particles outward from their origin.

This Color over Lifetime gradient causes the smoke to briefly flash a burnt orange before burning out to black and fading out. Notice how one of the markers is explicitly defined in the screenshot, since it is harder to guess these settings at a glance.

We want this smoke to aggressively expand its Size over Lifetime. Notice that these settings use both an upward curve and a scale of 10.

Finally, some Noise will add some organic randomization to the smoke's movement so it appears more realistic as the smoke naturally "disperses" through the air.

Fire Small

The second sub-emitter is the small fire that follows the parent rocket particle. Add a particle system to Fire Small and turn off all categories except Emission and Renderer.

Back on the parent RocketTrail particle system, add the Fire Small particle system as a child sub-emitter. It should inherit the size of the parent Rocket Trail particle system.

Return to the small fire particle system and configure the main settings for Fire Small.

To achieve the fire trail look, Fire Small should emit over a distance based on the movement of its parent rocket particle.

To better visualize the fire trail as we configure it, configure its Renderer.

Texture Sheet Animation converts the grid of graphics into an animated flame.

Rotation over Lifetime will give the flame trail a slight spiral motion.

This color gradient naturally fades the fire trail in and out, while also giving the fire some definition as it appears to burn out near the tip of the flame below the rocket.

The particle effect so far shows the rocket, launch smoke, and fire trail systems together.

Smoke

The last sub-emitter is also the smoke that follows the parent rocket particle. Add a particle system to Smoke and turn off all categories except Exmission and Renderer.

Back on the parent RocketTrail particle system, add the Launch Smoke particle system as a child sub-emitter. It should inherit the size of the parent Rocket Trail particle system.

Return to the Smoke particle system and configure the main settings for Smoke.

To better visualize the system as we configure it, skip to the Renderer.

Texture Sheet Animation converts the grid of graphics into animated smoke.

As a smoke trail, it makes more sense for the smoke particles to be left behind based on the distance movement of the parent rocket.

At the moment, the smoke trail looks a little bit like steam instead. Coloring it can help give the feeling that it starts off firey hot before burning out into dark smoke.

Similar to the launch smoke, we want this smoke to aggressively expand as it leaves the rocket. Take note of the scale of the curve.

As the smoke progresses through its timeline, we want it to be increasingly affected by random forces to simulate smoke dispersing in the air.

Completed Rocket Particle Effect

You must turn off the renderer on the parent Rocket Trail particle system, so that it does not show a pink square rising in the sky. The other sub-emitters will still render to complete the effect.

The completed rocket launch effect with sub-emitter systems for launch smoke, fire trail, and smoke trail:

Particle Effect 3 - Experimentation

Experiment with any available textures and materials to create a particle system design of your own. (It must not be a repeat of Flame and Rocket effects already explored in this assignment.)

Save and Test

Playtest to ensure all interactions work as expected and that the addition of any new features hasn’t broken any earlier interactions.

Submit Assignment

SAVE any open files or scenes.

Submit your assignment for grading following the instructions supplied for your particular classroom.