Mini episode · Behind the build

A Knight of the Seven Kingdoms fight scene in LEGO, animated entirely in code

The Trial of Seven fight from A Knight of the Seven Kingdoms, recreated in LEGO-style bricks. Twenty-six seconds, 626 frames, and nobody animated any of it by hand. Every pose, camera move and impact is Python, written by an AI coding agent and directed in plain English. Here is how it was made, step by step, with the numbers.

A brick knight in a gold helm levels a spear at a mounted knight whose chained mace swings between them, in a misty tournament field

The numbers

All from the project's own files.

Film

26 seconds, 626 frames, 15 shots

Rendered at 24 frames a second. The characters are posed 12 times a second, like stop motion; the camera moves on every frame.

Code

About 2,900 lines of Python

Seven scripts: the scene, the cast, the arena, the brick loader, the animation and the render job. No keyframes were set by hand and nothing was dragged around a timeline.

Render

About 12 minutes for the whole film

Path-traced in Blender's Cycles renderer at 128 light samples per pixel, on rented cloud graphics cards.

Sound

18 generated effects, 1 score

Each effect is placed from the same list of times the animation uses. The score is one song cut into three pieces so its drums fall on the hits.

How it was made, in 5 steps

The same order as the video.

  1. Bricks

    Every piece on screen is a digital model of a real brick from the LDraw parts library, an open, community-made catalogue. The figures are assembled part by part (head, torso, arms, hands, legs, helmet, weapon), the same way the plastic ones snap together.

  2. Animation

    There is no puppet being dragged around. Every pose is a line of Python: where a foot plants, how far an arm swings, when a body tips over. The film's story is a list of times in the code (the flail lands at 13.14 seconds, the first helmet hit at 15.42), and every character reads its pose from that list.

  3. Contact

    The hits are solved, not eyeballed. The code searches for the pose in which the weapon actually touches its target on a chosen frame. Then a check runs over the whole film and lists every place two parts pass through each other; the final report shows only the hits that were meant to happen.

  4. Render

    All 626 frames go to cloud graphics cards. Blender traces the light for each one, and the frames come back to be graded: a little more contrast, a little less colour, a soft dark edge.

  5. Sound

    Sound came last. Each effect (mud, armour, the mace on the helmet, the horse) was generated from a written description, then placed on its frame from the animation's own list of times. The score was generated as a three-minute song and cut to the picture.

Step 1, Bricks: two brick knights and five loose parts in a row, with LDraw part numbers and names underneath
Step 2, Animation: the animation code beside the film, and one second of the film shown as twelve separate poses
Step 3, Contact: the film frozen on frame 371 at 15.417 seconds with a marker where the mace meets the helmet
Step 4, Render: one frame split down the middle, graded on the left and the raw render on the right
Step 5, Sound: the film above two sound tracks, effects and score, with the hits marked on a timeline

How it was directed

No code was written by the person directing it. The notes were plain sentences like these, typed after watching or listening to each version.

A note on movement

He goes down limp. Like a headshot.

A note on staging

He should run at the rider's line with the spear levelled, then lunge.

A note on sound

The second hit should still sound like the first, just slightly different.

A note on one moment

The armour in the very first scene is too loud. It sounds like stomps, not like shuffling.

The agent turned each note into a change in the code, rendered or rebuilt, and came back with the result and what it had measured.

What went wrong first

The first fight hovered and slid

Figures floated above the ground and passed through each other. The fix was rules in the code: feet plant, bodies rest on the ground they touch, and hits are solved to a frame.

The first soundtrack was rejected

The first version built every sound from maths. It sounded fake, and the person directing said so. Every effect was replaced with a generated recording picked by ear.

The agent can't hear

It measured what it could (when each hit lands, how loud each second is), but every sound decision was made by a person listening. The same went for how the film looks.

The score didn't fit until it was cut

A generated song runs three minutes at its own pace. Three pieces of it were joined on drum hits, and one piece was slowed by about 1% so the beat lands on the footsteps.

Why a business explainer made a brick film

It is the same way of working we use on business software, on something you can watch.

1

You describe the result

In plain English, the way you'd brief a person. The agent writes the code.

2

You check the result, not the code

Watch it, listen to it, use it. Say what's wrong in one sentence.

3

It checks what it can measure

Here, parts passing through each other and hits landing on their frame. In a business system, totals that add up and records that match.

4

A person decides what's good

Taste and judgement stayed with a person the whole way. That part doesn't hand off.

Chapters

  1. The fight
  2. How it was made: the bricks
  3. Animation: every pose is a line of Python
  4. Contact: the hits are solved
  5. Render
  6. Sound, and the last line

Want something built this way?

Benmore builds custom software and AI systems for businesses: you describe what you need, and we direct the build until it works.

Talk to Benmore

An unofficial fan animation, made as an experiment at Benmore. A Knight of the Seven Kingdoms belongs to its owners; this is a fan tribute, not affiliated with or endorsed by HBO or George R. R. Martin. Not affiliated with, sponsored or endorsed by the LEGO Group; LEGO is a trademark of the LEGO Group. Brick models from the LDraw parts library, used under CC BY 4.0. The narration is a synthetic voice.