UE5 / Recipe / Stylized VFX

Energy Beam for UE5

A stylized beam material for lasers, magic channels, charged attacks, and projectile trails. The recipe focuses on a clean core, readable falloff, directional flow, and controlled HDR emission.

Recipe baseline

Core first, noise second

A beam needs a strong center line before it needs detail. If the core is weak, extra noise and bloom only make the shot harder to read.

01

Visual Target

What we are building: a beam with a hot center, softer outer glow, traveling internal motion, optional impact flare, and enough controls to scale from thin laser to wide magic channel.
Image placeholder: energy beam hero Future image should show a horizontal stylized beam with bright core, soft outer falloff, directional streaks, and a small impact glow at one end.

02

Use Cases

CombatLaser beamA straight readable line where width, core brightness, and edge falloff need separate tuning.
MagicChannel spellInternal flow and color variation sell energy transfer between caster and target.
WeaponCharge trailUse on weapons, projectiles, or held attacks where the beam grows over time.
EnvironmentPower conduitWorks as an animated material on cables, tubes, or sci-fi machinery.

03

Mental Model

A beam is a shaped strip

Think of it as a long rectangle with a center mask across width and a flow mask along length. Width controls readability. Length motion controls energy direction.

Do not let bloom replace structure

The beam should still have a core and falloff in grayscale. Bloom can make it feel powerful, but it should not be the only reason the beam is visible.

04

Graph Steps

Beam UVs Width mask Flow noise Core + edge Color ramp Impact glow

1. Normalize beam UVs

Use one axis for beam length and one for width. Keep this convention consistent across beam materials so artists can reuse textures and masks.

2. Build the width mask

Start with a simple centerline falloff. The center should be strong, the edge should fade gently, and the width should be adjustable.

3. Add traveling flow

Pan streak noise along the beam length. This is what tells the viewer which direction the energy is moving.

4. Split core and outer glow

The core can be sharp and bright. The outer glow should be softer and wider. Treat them as two layers, even if they share the same UVs.

5. Add impact or endpoint masks only when needed

Endpoint glow is useful for lasers and channel spells, but not every beam needs it. Keep it optional so the same material can support loops and one-shots.

05

Artist Controls

06

HLSL Sketch

float widthCoord = abs(uv.y * 2.0 - 1.0);
float coreMax = coreWidth + coreSoftness;
float core = 1.0 - smoothstep(coreWidth, coreMax, widthCoord);
float outerMax = outerWidth + outerSoftness;
float outer = 1.0 - smoothstep(outerWidth, outerMax, widthCoord);

float2 flowUV = float2(uv.x * flowTiling - time * flowSpeed, uv.y);
float streaks = Texture2DSample(flowTex, flowTexSampler, flowUV).r;
streaks = saturate((streaks - streakBias) * streakContrast + 0.5);

float impact = 1.0 - smoothstep(0.0, impactFalloff, uv.x);
float mask = core + outer * outerStrength;
mask += streaks * flowStrength + impact * impactStrength;
mask = saturate(mask);

float3 color = coreColor * core + edgeColor * outer + impactColor * impact;
float3 emissive = color * mask * emissionStrength;
return float4(emissive, mask);

07

Senior Notes

Beam mesh setup matters

The material is only half the recipe. You need predictable UVs, stable width, and clean endpoints. Bad mesh UVs make even a good beam graph feel broken.

Niagara can drive the useful parameters

Width, length, flow speed, color, and endpoint intensity are good Niagara user parameters. Avoid exposing tiny internal math values to VFX artists.

Depth and intersection need art direction

If the beam passes through geometry, decide whether it should clip, fade, spark, or create an impact mask. Do not leave intersections accidental.

08

Common Mistakes

  • Making the beam a uniformly glowing rectangle with no centerline hierarchy.
  • Scrolling noise sideways instead of along the beam direction.
  • Using excessive bloom that hides the beam width and endpoint.
  • Forgetting cheap background variants for repeated beams or power cables.