Writing

A random number generator that had to run live on stream

MGC needed to draw a random number during a live stream, with an animation that reveals it. The constraint is the whole problem: it has to resolve in the moment, so pre-rendering is out.

The grenade reveal animation for MGC
Topic
Broadcast and stream graphics
Client
MGC
Tools
Blender, After Effects, Webflow
Published
June 2024

The obvious version of this is not real. You cannot render the reveal in After Effects once the number is known, because that takes minutes and the stream is live, and rendering every possible outcome ahead of time stops being feasible the moment the range is larger than a handful.

So the animation has to be generic and the number has to arrive separately, on top, at the moment the animation calls for it.

The animation

A grenade, to sit with the visual language already running on the event. The model came from CGTrader for two dollars, which was the right call: nothing about a stock grenade needed to be custom for this, and the time was better spent on timing.

A simple Blender setup, exported with no background so the explosion timing could be adjusted in After Effects afterwards rather than re-rendered every time it felt wrong.

The MK2 grenade model on CGTrader, two dollars
The MK2 grenade model on CGTrader, two dollars

The reveal

The detonation is the reveal. The animation runs generic and the drawn number is composited in at the moment the grenade goes off, which is what lets the whole thing resolve live instead of being rendered once the number is already known.

The reveal, as it plays on stream
The idle loop it sits on between draws

The number

The generator itself is small, and this is the part where being honest is more useful than pretending: I described the constraints to ChatGPT and iterated through a few versions until one behaved. It is a random draw against a max value the operator enters, timed to land with the detonation.

It was tested as a code embed in Webflow, then exported to plain HTML so it can be opened locally and run as a browser source. That matters for a live setup, because it removes the network from the chain at the exact moment you cannot afford it to be there.