COIT20271 · Week 8 Lab Tutorial

🔥 VFX Workshop

Build three production-style visual effects with Unity's Particle System — a flickering campfire, a magical pickup glow, and a one-shot explosion you can trigger from code.

Particle System
Main Module
Emission
Shape
Color over Lifetime
Bursts
3 Exercises
Introduction

What You'll Build

One tool, three different effects. Each exercise teaches a different combination of modules — by the end you'll have a mental map of which modules to reach for when you want a specific look.

EffectModules UsedSkill Built
🔥 CampfireMain · Emission · Shape · Color over Lifetime · Size over LifetimeLooping ambient effects, gradient editor
Magic GlowMain · Emission · Shape · Velocity over Lifetime · Rotation over LifetimeOrbiting particles, additive blending
💥 ExplosionMain · Emission (Bursts) · Shape · Sub EmittersOne-shot effects, scripted triggering
🎯
This week is hands-on

Hour 15 is a demo of Captain Blaster, not a build-along — there's no specific activity file. Hour 16 introduces the Particle System. This tutorial is your practical lab. There are also two scholarly readings due this week — see the Required Readings section at the bottom.

Step 0

Project Setup

  1. 1
    Open Unity Hub → New Project → 3D (Core). Name it VFXWorkshop.
  2. 2
    Create folders: Assets/Scripts, Assets/Effects, Assets/Materials.
  3. 3
    Save the open scene as WorkshopScene.
  4. 4
    Add a Plane at origin as a ground reference (GameObject → 3D Object → Plane). This makes effects easier to see.
  5. 5
    Optional but recommended — set the scene's ambient to dark so glowing effects pop. Window → Rendering → Lighting → Environment tab → set Environment Lighting → Source to Color, then choose a dark grey/blue.
Step 1

Anatomy of a Particle System

A Particle System is one component made of stacked modules. Each module is a section in the Inspector with a checkbox to enable/disable it. The first four modules below are always on — the rest are optional.

Create your first Particle System

  1. 1
    Top menu → GameObject → Effects → Particle System. A white smoke-like effect appears, drifting upward.
  2. 2
    Look at the Inspector — you'll see the Particle System component with multiple collapsible sections (modules). Click any header to expand/collapse it.
  3. 3
    Notice the small floating Particle Effect panel at the bottom-right of the Scene view. This contains Pause, Restart, Stop, and Playback Time controls — use these instead of pressing Play to preview your effect.
🎬
You don't need Play mode to preview particles

The Scene view's Particle Effect panel plays the system live as you edit it. Adjust a slider — the particles update instantly. This makes iterating on effects much faster than entering Play mode every time.

Reference

Module Cheatsheet

You won't memorise these today. Skim now, then refer back during the exercises.

Always-on modules

⚙️
Main
Required · top section
Duration, Looping, Start Lifetime, Start Speed, Start Size, Start Color, Gravity Multiplier. Sets the initial state of every particle.
📤
Emission
Required
How many and how often. Rate over Time for steady streams; Bursts for sudden one-shot bursts of particles.
📐
Shape
Required
Where particles spawn from. Cone (default), Sphere, Box, Hemisphere, Circle, Edge, Mesh. Also sets the initial direction.
🎨
Renderer
Required · bottom
How particles are drawn. Material (Default-Particle is the built-in placeholder), billboard mode, sort mode.

Optional "Over Lifetime" modules

These modify a particle as it ages. Tick the checkbox next to the module name to enable.

🌈
Color over Lifetime
Gradient editor
Particle's colour and alpha over its life. The most common module — used to fade particles in and out.
📏
Size over Lifetime
Curve editor
Particle grows or shrinks over time. Combine with Color over Lifetime for puffs that grow and fade.
💨
Velocity over Lifetime
XYZ values
Adds extra velocity in chosen directions. Use Orbital values to make particles spin around the centre.
🔄
Rotation over Lifetime
Degrees per second
Each particle rotates as it lives. Subtle but adds organic movement to smoke and flame particles.

Advanced modules (covered briefly later)

🎲
Noise
Turbulence
Adds wobbly random motion to particles. Great for fire flicker and smoke turbulence.
👶
Sub Emitters
Particle spawns particles
When a particle dies, spawn a new Particle System at its position. Used for explosion → smoke trails.
Exercise 1

🔥 Build a Campfire

1
Campfire
A looping flame with rising sparks
~15 min
Cone shape Color over Lifetime Size over Lifetime Looping
  1. 1
    Create the system. GameObject → Effects → Particle System. Rename it Campfire. Position at (0, 0, 0).
  2. 2
    Configure the Main module in the Inspector with these settings:
Duration
5.00 (loop length)
Looping
✅ ticked
Start Lifetime
1.5 seconds
Start Speed
1.5
Start Size
Click the dropdown arrow → choose Random Between Two Constants → set 0.3 and 0.6
Start Color
Click the colour swatch → set to bright orange (e.g. #FF8800)
Gravity Modifier
-0.1 (negative = particles drift up faster than gravity)
  1. 3
    Configure the Emission module: set Rate over Time to 30.
  2. 4
    Configure the Shape module: set Shape to Cone, Angle to 15, Radius to 0.3. The cone defines a small upward-pointing emitter.
  3. 5
    Enable Color over Lifetime. Tick the checkbox next to the module name. Click the Color bar to open the gradient editor.
  4. 6
    Set up the gradient:
    Top row (alpha): click left edge marker → Alpha 255. Click right edge marker → Alpha 0. This makes particles fade out.
    Bottom row (color): click left edge marker → bright yellow #FFEE44. Click right edge marker → dark red #990000. Click in the middle of the bar to add a third stop → orange #FF6600.
  5. 7
    Enable Size over Lifetime. Tick the module. Click the curve preview to open the curve editor. At the bottom of the editor click the curve preset that goes down from left to right — particles start big and shrink as they rise.
  6. 8
    Optional polish — enable Noise. Tick the Noise module. Set Strength to 0.3 and Frequency to 1. This adds the irregular flicker real fire has.
Result

You should see flame-coloured particles rising from a small cone, growing, and fading out as they cool. Increase Rate over Time to 60 for a more intense fire, decrease to 15 for a small candle.

Exercise 2

✨ Magic Pickup Glow

2
Magic Glow
Particles orbiting around a magical item
~12 min
Sphere shape Velocity over Lifetime Orbital motion Additive material
  1. 1
    Create a target object. GameObject → 3D Object → Sphere. Name it MagicGem. Position at (3, 1, 0). Apply a bright cyan/blue material.
  2. 2
    Add a Particle System as a child. Right-click MagicGem in Hierarchy → Effects → Particle System. The new system is parented to the gem and inherits its position.
  3. 3
    Main module settings:
Looping
✅ ticked
Start Lifetime
2.0
Start Speed
0 (particles start motionless — Velocity over Lifetime drives them)
Start Size
Random Between Two Constants → 0.05 and 0.15
Start Color
Bright cyan #88E8FF
Gravity Modifier
0
  1. 4
    Emission: Rate over Time = 20.
  2. 5
    Shape module: set Shape to Sphere, Radius to 0.6. Particles spawn anywhere on the sphere's surface around the gem.
  3. 6
    Enable Velocity over Lifetime. Find the Orbital values (Y axis): set Y to 2. The particles now orbit around the Y axis of the system.
  4. 7
    Enable Color over Lifetime with an alpha that ramps from 0 → 255 → 0 (fade in then out). Keep colour cyan throughout.
  5. 8
    Make the particles glow — Renderer module. Scroll to the bottom of the Particle System. Click the Material field circle → search for and select Default-Particle (the built-in particle material). Then in the Project window, right-click → Create → Material. Name it Mat_GlowParticle. Set its Shader to Particles/Standard Unlit (or Mobile/Particles/Additive if available). Set its Color Mode to Additive. Drag this new material into the Particle System's Renderer → Material slot.
💡
Why "Additive" blending?

Additive blending makes overlapping particles brighten the pixels behind them rather than just covering them. The result looks like glowing light — perfect for magic effects, fireflies, lasers, sparks. For dark/opaque effects (smoke, dust), use the default Alpha Blend instead.

Exercise 3

💥 One-Shot Explosion

3
Explosion
A burst of particles triggered on demand
~15 min
Bursts Non-looping Hemisphere shape Stop Action Script triggering
  1. 1
    Create the system. GameObject → Effects → Particle System. Rename to Explosion. Position at (-3, 0.5, 0).
  2. 2
    Main module:
Duration
1.00
Looping
❌ unticked (this is a one-shot)
Start Lifetime
Random Between Two Constants → 0.5 and 1.5
Start Speed
Random Between Two Constants → 3 and 8
Start Size
Random Between Two Constants → 0.3 and 0.7
Start Color
Bright orange #FF6600
Gravity Modifier
0.5 (debris falls)
Play On Awake
❌ unticked (we'll trigger from script)
Stop Action
Destroy (system removes itself when finished)
  1. 3
    Emission — switch to Bursts only. Set Rate over Time to 0. Under Bursts, click +. Set Time = 0.00, Count = 50. This emits 50 particles at the start, then stops.
  2. 4
    Shape: Shape = Hemisphere, Radius = 0.2. Particles fly outward in a half-sphere — nothing goes underground.
  3. 5
    Enable Color over Lifetime — gradient from yellow → orange → red → black, with alpha fading to 0 at the end.
  4. 6
    Enable Size over Lifetime — start large, shrink as particles cool and disperse.
  5. 7
    Test it. In the Scene view's Particle Effect panel, click Restart — you should see a single burst of debris that then settles. (You won't see anything if you press Play because Play On Awake is off — that's by design.)
⚠️
Make this a Prefab

Drag the Explosion GameObject from the Hierarchy into the Assets/Effects folder. It becomes a blue prefab. Now your script (next section) can spawn copies of this explosion anywhere in the scene at runtime.

Step 4

Triggering Particles from a Script

The most common pattern: spawn an explosion (or any one-shot effect) at a location at runtime. Two approaches.

Approach A — Instantiate a prefab

Best when you want the effect at a specific position and you don't need to keep referencing it afterwards.

ExplosionSpawner.cs C# · attach to any GameObject
// ExplosionSpawner.cs
// ─────────────────────────────────────────────────────────────────────────────
// Press Space to spawn a copy of the Explosion prefab at a given position.
// Because the prefab's Stop Action is set to Destroy, the spawned copy
// removes itself from the scene after it finishes playing — no cleanup needed.
// ─────────────────────────────────────────────────────────────────────────────

using UnityEngine;

public class ExplosionSpawner : MonoBehaviour
{
    [SerializeField] private GameObject explosionPrefab;
    [SerializeField] private Transform  spawnPoint;

    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            if (explosionPrefab != null && spawnPoint != null)
                Instantiate(explosionPrefab, spawnPoint.position, Quaternion.identity);
        }
    }
}

Approach B — Call Play() on an existing system

Best when the effect lives on a specific GameObject (e.g. a gun's muzzle flash) and replays often.

EffectTrigger.cs C#
// EffectTrigger.cs
// ─────────────────────────────────────────────────────────────────────────────
// Calls Play() on a referenced ParticleSystem when the player presses E.
// The ParticleSystem must have Play On Awake unticked.
// ─────────────────────────────────────────────────────────────────────────────

using UnityEngine;

public class EffectTrigger : MonoBehaviour
{
    [SerializeField] private ParticleSystem effect;

    void Update()
    {
        if (Input.GetKeyDown(KeyCode.E) && effect != null)
        {
            effect.Play();   // triggers the burst
            // effect.Stop();    // would stop emission
            // effect.Clear();   // would remove all live particles instantly
        }
    }
}
Step 5 · Polish

🎁 Real VFX Textures from the Asset Store

The default white particle squares look basic. Real games use textured sprites — actual flame shapes, smoke puffs, explosion frames. This section shows you how to grab a free pack and apply its textures to the Campfire and Explosion you already built.

⚠️
Render pipeline matters

Your project uses the Built-in Render Pipeline (the default for the 3D Core template). Materials made for URP or HDRP will appear pink/magenta when applied to a Built-in project. When choosing an asset, look for "Standard" or "Built-in Render Pipeline" support in its description, or pick a pack that supports all three. Unity's free official Particle Pack (recommended below) supports Built-in.

Step 5A — Get Unity's Free Particle Pack

Unity Technologies publishes a free, official VFX pack with explosions, fire, smoke, sparks, and dust. It's the safest first pick.

  1. 1
    Open your browser and go to https://assetstore.unity.com. Sign in with your Unity ID.
  2. 2
    Search for "Particle Pack" by Unity Technologies. Click the asset.
  3. 3
    Click the blue Add to My Assets button (it's free). When the dialog appears, click Open in Unity.
  4. 4
    Unity opens the Package Manager. (If it doesn't: Window → Package Manager → Packages dropdown → My Assets.) Click Download, then Import. Leave all files ticked → click Import.
  5. 5
    A new folder Assets/EffectExamples/ appears in the Project window with subfolders like Fire & Explosion Effects, Misc Effects, etc.

Step 5B — Two Ways to Use the Pack

Option A — Use a ready-made prefab

  • Quickest: drag a prefab into the scene
  • Find them in EffectExamples/.../Prefabs/
  • Best for instant results
  • Less educational — you don't learn the modules

Option B — Apply textures to your effect

  • Keep your Campfire and Explosion as-is
  • Swap in a real texture via the Renderer module
  • Best for learning
  • This is what we'll do below

Step 5C — Find a Texture in the Pack

  1. 1
    In the Project window, navigate into Assets/EffectExamples. Browse the subfolders — each effect category has a Materials folder and a Textures folder.
  2. 2
    Click any texture file (.png, .tga) to preview it in the Inspector. You're looking for: a soft white-on-black flame for the campfire, a circular explosion sprite or sprite sheet for the explosion.
  3. 3
    Note: the existing materials in the pack may be configured for specific effects. The cleanest approach is to create your own material using their texture — that way you control the blending and tinting.

Step 5D — Apply a Real Flame Texture to your Campfire

  1. 1
    Find a flame texture. In the Project window go to Assets/EffectExamples/Fire & Explosion Effects/Textures/. Look for a texture with "Fire", "Flame", or "Smoke" in the name. Click on a few to preview.
  2. 2
    Create a new material. Right-click in your Assets/Materials folder → Create → Material. Name it Mat_Campfire.
  3. 3
    Set the shader and blending. Select Mat_Campfire. In the Inspector at the top, click the Shader dropdown → Universal Render Pipeline → Particles → Unlit if you're on URP, or Particles → Standard Unlit if you're on Built-in (default).
Surface Type / Rendering Mode
Set to Transparent
Blending Mode / Color Mode
Set to Additive (so overlapping flames get brighter, not flat)
Albedo / Base Map
Click the small circle next to the texture slot → search for and select the flame texture from the Particle Pack
Color Tint
Leave white (the Particle System's Start Color handles tinting per-particle)
  1. 4
    Apply to the Campfire. Select the Campfire GameObject in your Hierarchy. In the Inspector, scroll down to the Renderer module of the Particle System (it's at the bottom). Drag Mat_Campfire from the Project window into the Material slot.
  2. 5
    Tweak the look. The flame texture changes how the system renders. You may need to: increase Start Size (textured particles often look better at larger sizes), reduce Rate over Time (a texture has more visual weight than a flat dot — fewer particles needed), or pull back the Color over Lifetime alpha so trails are subtler.

Step 5E — Apply an Explosion Texture to your Explosion

Same workflow with one twist: explosion textures are often sprite sheets — a grid of frames meant to be played as an animation. Use the Texture Sheet Animation module to play through the frames.

  1. 1
    Find an explosion sprite sheet. In Assets/EffectExamples look for a texture called something like Explosion_SpriteSheet or similar. It will look like a grid of explosion frames in the preview.
  2. 2
    Note the grid size. Click the texture and look at it in the Inspector. Count the columns (Tiles X) and rows (Tiles Y). Common values: 4×4, 6×6, 8×8.
  3. 3
    Create a new material. Same as the Campfire: Create → Material → name it Mat_Explosion → set Shader to Particles/Standard Unlit (Built-in) or URP equivalent → Blending Mode Additive. Drag the explosion sprite sheet into the Albedo / Base Map slot.
  4. 4
    Apply to your Explosion prefab. Select the Explosion prefab in Assets/Effects → in the Particle System's Renderer module → drag Mat_Explosion into the Material slot.
  5. 5
    Enable Texture Sheet Animation. In the Particle System Inspector, scroll to the Texture Sheet Animation module — tick its checkbox.
Mode
Grid
Tiles
Set X and Y to match the grid size you noted (e.g. 4 and 4 for a 4×4 sheet)
Animation
Whole Sheet
Frame over Time
Leave as default linear curve — plays frames 0 → end across each particle's lifetime
Cycles
1 (each particle plays the explosion animation exactly once)
  1. 6
    Test. Click the Restart button on the Scene view's Particle Effect panel. Each particle now plays through the full explosion animation as it lives — turning a flat blob into a real explosion frame sequence.
  2. 7
    Tune for impact. Reduce Burst Count from 50 to 5–10 (textured frames are visually heavier — fewer is more). Increase Start Size to 1.0–2.0 so the texture is readable.
🎉
Result

Your effects now use real VFX textures instead of the default white squares. Take a few minutes to swap textures between effects, change the Color Tint on the materials, and see how dramatically the visual character changes — same modules, totally different feel.

Common Asset Store VFX Pitfalls

SymptomCauseFix
Imported pack's prefabs all show pink/magentaPack's materials use a render pipeline shader (URP / HDRP) that doesn't exist in your Built-in projectCreate your own material using just the pack's texture, with a Particles/Standard Unlit shader
Texture looks like one frozen frame, not animatedTexture Sheet Animation module not enabled, or Tiles X/Y values wrongEnable the module; set Tiles to match the actual grid layout
Texture has visible square edgesMaterial is using Alpha Blend instead of Additive; or texture has a black background not transparentSet Blending Mode to Additive — black areas of the texture become transparent
Edges of texture appear bright/sharpTexture's Wrap Mode is set to RepeatSelect the texture → Inspector → Wrap Mode → Clamp → Apply
Textures look low-quality / pixelatedCompression settings reduced quality; or Filter Mode is PointTexture Inspector → Compression: High Quality; Filter Mode: Bilinear or Trilinear
Help

Common Problems

SymptomLikely CauseFix
No particles visibleSystem is paused, Stopped, or playhead at endClick Restart in the Scene view's Particle Effect panel
Particles are pink/magenta squaresMaterial missing or shader incompatible with render pipelineRenderer module → Material → assign Default-Particle or create a new Particles/Standard Unlit material
Particles look flat / not glowingMaterial is using Alpha Blend instead of AdditiveOpen the material → set Color Mode / Blend Mode to Additive
Explosion plays as soon as scene startsPlay On Awake is tickedMain module → untick Play On Awake. Trigger via script or Restart button.
Particles continue after expected stopLooping is on, or Duration is too longUntick Looping for one-shots; reduce Duration for short bursts
Particles spawn but don't moveStart Speed is 0 and no Velocity over Lifetime enabledSet Start Speed > 0, or enable Velocity over Lifetime module
Particles fall through the groundParticle System has no collision moduleEnable the Collision module → Type = World → Bounce / Lifetime Loss as needed
Effect spawns at wrong location after InstantiatePass a position to Instantiate, or set transform.position manually after spawningInstantiate(prefab, somePosition, Quaternion.identity)
Spawned explosion never disappearsStop Action set to None on the prefabEdit the prefab → Main module → Stop Action = Destroy
Going Further

Extension Challenges

⭐ DifficultyChallengeNew Concept
Add a smoke trail to your Campfire by making a second Particle System with grey, slow-rising particlesLayered effects (multiple systems on same object)
Make the Magic Glow change colour by tweening the Color over Lifetime gradient between blue and purpleGradient editor mastery
⭐⭐Add a Sub Emitter to your Explosion so that each main particle leaves a tiny smoke trail when it diesSub Emitters module · Death event
⭐⭐Build a footstep dust effect using Rate over Distance — particles only emit when the parent movesEmission · Rate over Distance
⭐⭐Add a Collision module to your Explosion so debris bounces off the ground planeParticle Collision · World mode
⭐⭐⭐Create a flamethrower attached to a moving GameObject, with the flames trailing behind realisticallySimulation Space (Local vs World)
⭐⭐⭐Build a snow effect that fills a large area, falls realistically, and fades out before hitting the groundBox shape · Gravity · Color over Lifetime alpha
⭐⭐⭐⭐Replicate the muzzle flash + smoke + impact spark sequence from a typical shooter, all triggered by one script callCoordinated multi-system effects
Theory

📚 Required Readings

Two scholarly articles accompany this week's practical work. They build the theoretical side of game development — how researchers analyse and critique games as media. Read both before next week's session.

📄
Game Analysis: Developing a Methodological Toolkit for the Qualitative Study of Games
Consalvo, M. & Dutton, N. (2006). Game Studies, Volume 6, Issue 1.
Proposes a structured framework for analysing games qualitatively — the object inventory, interface study, interaction map, and gameplay log. Useful for thinking about your own projects systematically. Available via Moodle.
📄
Computer Game Criticism: A Method for Computer Game Analysis
Konzack, L. (2002). CGDC Conf. Proceedings.
A seven-layer model for criticising games — hardware, program code, functionality, gameplay, meaning, referentiality, socio-culture. Complements Consalvo & Dutton with a more vertical analytical lens. Available via Moodle.
📝
Reading prompt — try this while you read

Pick one game you've played recently. As you read each article, attempt to apply the framework to that game in your head. Which categories does it fit easily? Which categories feel forced? Bring a 2-minute observation to next week's session.

🎉
You've completed VFX Workshop!

You've built a looping ambient effect, an orbiting glow, and a script-triggered explosion. Combined with this week's readings, you now have both the practical and theoretical foundation that game design courses build on.