Back to Tech Art

Cyberpunk Edgerunners Afterimage VFX

A study recreating the iconic afterimage effect from Cyberpunk Edgerunners. The trick is generating particle sprites sized to the mesh's screen-space bounds, then applying a render target mask so only the character silhouette shows. This combines a lot of different techniques: Blueprint scripting, Niagara, stencil masks, render targets, dot products, and screen-to-world projection math.

Unreal EngineNiagaraMaterialsBlueprintRender Targets

Reference

Cyberpunk Edgerunners anime afterimage effect

Sandevistan afterimage effect from Cyberpunk Edgerunners (Studio Trigger)

My Recreation

Edgerunner afterimage effect with neon trails

Table of Contents

Screen Bounds Calculation

First I needed to figure out where the character appears on screen and translate that back to world space. The red plane in the debug view shows the screen-space bounding box projected into the 3D scene.

Debug view showing screen space bounds as red rectangle

Screen bounds visualized as red plane

The GetScreenBounds function takes the mesh's component bounds (8 corners of the bounding box), projects each corner from world space to screen space using ProjectWorldToScreen, then finds the min/max X and Y values to get the screen-space rectangle.

Blueprint for calculating screen bounds from mesh bounding box

GetScreenBounds function with 8-corner projection

World Position from Screen Space

This is the tricky math part. Using the camera location, forward vector, FOV angle (via tangent), and viewport size, I calculate where in world space to place the sprite so it appears at the correct screen position. Dot products help project vectors and get the right distances.

Blueprint for calculating world position from screen bounds

Camera FOV and dot product math for world position

Spawning the Afterimage

The main spawning logic: spawn a Niagara system at the character's location, get the current screen bounds, create a render target sized to match, then pass all the data (sprite size, position, render target texture) to the Niagara system as variables.

Blueprint for spawning afterimage with render target

Spawn system with render target creation

Afterimage Outline Material

The material reads the render target, applies a Gaussian blur for softness, then uses edge detection (subtract, abs, multiply) to extract just the outline. The particle color input controls the neon glow tint, and it outputs to emissive for that bright look.

Material graph for afterimage outline effect

Blur + edge detection for outline extraction

It's a lot of different systems working together: screen-to-world math, render targets, Niagara sprites, and material edge detection. The effect looks simple but there's a lot happening under the hood to make those neon outlines trail behind the character correctly.

Tech Stack

Niagara VFX

Sprite particles

Render Targets

Character capture

Stencil Buffers

Masking

Blueprint

Bounds & spawning

Dot Product

Projection math

Gaussian Blur

Edge softening

Credits

  • Reference: Cyberpunk Edgerunners (Studio Trigger / Netflix)
  • Character models from Unreal Engine free assets