Home · Lab · FX Elements: fire, smoke, explosions

FE7 Element QC

Push the viewer, check alpha and grain, then fix the right thing

FX Elements: fire, smoke, explosions · ~7 min · Free

1 The idea

A delivered element can look fine in the comp and still hide faults that only show with the viewer pushed: a hard alpha, double grain, and small negative values in the empty area. Element QC hunts for these before the element goes in.

Use Inspect to switch between gain ×8, alpha and grain ×20 (a high-pass) and find each fault, then try the fixes one suspect at a time. Watch the three readouts: edge width and thin smoke kept, grain ratio, and the value where alpha = 0 and on soft edges.

fix: rgb − k·(1 − a), k = the value sampled where alpha = 0

2 Hands-on

Task: pass element QC: a soft smoke edge, grain that matches the plate, and nothing added outside the element.

A fix can cure one readout and break something else. After each change, check both the Inspect view and the readout, and ask whether the fix removes the fault or only hides it.

SkyVFX Lab · FE7interactive · 1001

3 Deep dive

Inspect the element before it goes in

At normal exposure a hard alpha, a small offset or a fringe is close to invisible. Push the viewer gain to ×4 or more and look at both rgb and alpha; sometimes you find things that don’t belong in the alpha, such as a baked-in shadow.

Run the same pass every time; each view finds a different kind of fault.

  1. 1Normal comp
  2. 2Gain ×8
  3. 3View alpha
  4. 4Grain high-pass
  5. 5Measure

Hard alpha: get the real one, don’t blur

Smoke with an alpha cut to 0 and 1 loses its semi-transparent wisps and reads like a paper cut-out. In the alpha view the edge is a sharp line, and the edge width (the 10–90% alpha ramp) is close to zero.

Blurring a hard alpha does soften the edge, but the smoke detail that was cut away doesn’t come back: soft is not the same as detailed. The real fix is the original soft alpha from the source.

When you find a hard alpha, ask for the original before you start repairing it.

Grain once, at the end

Grain belongs near the very end of the comp, with no grading on top of it. If an element already carries grain and a grain node goes on top, you get two layers. On a real job this left an element with about 3× the plate’s grain.

The fix is to denoise the element, use the clean version for the rest of the comp, and add grain a single time at the end from one reference. Adding more grain to cover it up never helps.

  1. 1Denoise element
  2. 2Comp clean
  3. 3Grain once
  4. 4Crop

The empty area must be exactly 0

A premultiplied, log-encoded element can decode to a small negative value where alpha = 0; on real elements it measured about −0.009 to −0.014. Over is A + B·(1 − a), so where a = 0 that A goes straight onto the plate and the whole frame darkens a little. The offset planted here sits inside that range.

rgb − k·(1 − a), with k sampled from the empty area per shot, removes the offset in the empty area and on the soft edges, unlike a hard a == 0 switch or a clamp.

MethodWhere alpha = 0On soft edges
As deliveredOffset staysOffset stays
Clamp rgb ≥ 0Negatives become 0Offset hidden in positive values stays
a == 0 ? 0 : rgbBecomes 0Offset stays
rgb − k·(1 − a)Becomes 0Removed in proportion to alpha

Measure grain in the right place

Measure grain on flat areas only, per channel, in float. Put the sample box on rocks or on smoke detail and the texture gets counted as grain, so the number comes out too high.

Grain differs per channel, and blue often needs more, so match each channel on its own rather than judging the mix.

Put the sample box on flat sky, away from the hills, the rocks and the smoke itself.

4 In real work

In Nuke

  1. Viewer: push gain to ×4 or more and press A to view the element’s alpha before you use it.
  2. Expression on the premultiplied element: in the red channel type r-k*(1-a) (green and blue the same way), with plain ASCII minus signs, and type the value sampled from that shot’s empty area in place of k.
  3. Denoise the element that carries baked grain, and comp with the clean version.
  4. Clear the plate’s alpha (set it to 0 with a Shuffle) before the first Merge, so the only alpha in the stream comes from the elements you add.
  5. Grain2 last, before the crop, applied once and matched per channel.
  6. If the regrain is limited by a mask, feather the mask with FilterErode.

Common mistakes → the fix

  • ✗ Blurring a hard alpha instead of getting the real one✓ Get the original soft alpha; a blur only softens the edge, the smoke detail stays lost.
  • ✗ Fixing double grain by adding even more grain✓ Denoise the element and regrain once at the end.
  • ✗ Clamping negatives to 0 where alpha = 0 but leaving the offset on soft edges✓ Use rgb − k·(1 − a) with k sampled per shot.
  • ✗ Checking elements only at normal exposure✓ Push the gain and view the alpha every time before use.
  • ✗ Measuring grain on textured areas✓ Measure on flat areas, per channel, in float.

Before you send the shot

  • Element alpha checked at gain ×4 or more: no hard edge, no baked shadow.
  • The smoke edge is soft and still detailed, not just blurred.
  • Element and plate grain match on flat areas, in every channel.
  • One grain node, at the end, with no grades after it.
  • The element’s empty area reads 0, soft edges included.

5 Check yourself

One question to check yourself

On the flat sky the element’s grain is well above the plate’s, and the element came with grain baked in. What’s the fix?

What you learned

🔒 Answer the question above and this card opens

More questions

1. Why use rgb − k·(1 − a) instead of setting rgb to 0 where a == 0?

2. A smoke element arrives with a hard alpha, only 0 and 1. What’s the right fix?

Where the numbers come from: The three faults are planted by us on our own smoke render: a thresholded alpha, baked element grain, and a black offset that fades with alpha like a log-encoded element (teaching version). The plate grain is synthetic Gaussian grain added in the browser, and the 2 px edge, 0.85–1.2 grain and 0.001 empty-area limits are our teaching thresholds. Every element is our own: Mantaflow sims in Blender 5.2, rendered in Cycles through the plate’s camera (EmberGen could not export headless on this machine). No stock elements.