The shape of a punch

Every impact effect is a value that spikes and comes back down: bloom intensity, a flash, a shake, a scale pop. The peak and the duration are the two numbers everyone tunes, and neither is the one that decides whether it feels like a hit.

Identical peak and duration. Left: linear decay. Middle: exponential. Right: exponential with a short attack. The curve under each is its envelope.

Linear is the tell

Nothing in the physical world decays linearly. Energy leaves a system in proportion to how much is left, which is an exponential, and the eye has seen enough real decay to know the difference without being able to name it. A linear ramp-down reads as a value being animated rather than an event happening.

float a = max(1.0 - t/duration, 0.0);   // mechanical
float a = exp(-t / tau);                // physical

tau is the time to fall to about 37%. A useful starting point for an impact is 100 to 150ms, and the visible tail runs roughly three tau.

The attack is the half that gets skipped

An exponential starting at full value jumps from nothing to peak in one frame. That sounds like what you want from an impact, and it is subtly wrong: it reads as the value being set. A very short ramp in, one or two frames, reads as something arriving.

Short is the operative word. Past about 50ms it stops being an attack and becomes a swell, which reads as a charge-up rather than a hit. The third panel uses 22ms.

Author in seconds

The trap that outlives everything else: authoring in frames. A punch tuned as "three frames" is 50ms at 60fps and 100ms at 30, so the same effect is twice as long on a different machine. Since perceived strength depends on duration below about 100ms, per the flash law, that also makes it a different brightness, not just a different length.

One curve, many consumers

The useful architecture is one envelope value per event, read by everything that should respond: bloom gain, screen shake, a scale pop, a chromatic offset, an audio send. They stay locked together automatically, and the entire feel of the hit becomes one number to tune rather than five that drift apart.

Rules of thumb

  1. Exponential decay, not linear. Linear reads as animation, not impact.
  2. tau around 100 to 150ms for a hit; the tail is about three of them.
  3. Give it a one to two frame attack. Instant reads as assignment.
  4. Author in seconds, never frames, or the effect changes strength with frame rate.
  5. One envelope, many consumers. Everything that should feel like one hit reads the same number.

All 61 notes How to use them Credits