Get down to Hell and the Blood Knights are waiting, black armour in the dark. Look closely at one and you see a knight and a dark patch on the floor. To the game it's one picture: Blizzard North rendered every character from a 3D model and painted its shadow onto the floor of each frame, in the same pure black as the armour:


In 1996 that was the cheapest good-looking shadow you could have. For us it's in the way. This post is about the characters: heroes, monsters and townsfolk, with a game for you near the end. Barrels, statues and floors get a post of their own.
Why it has to come off first
A painted shadow never moves. It falls the same way under a torch and in the Tristram sun. In our lighting every fire (torches, braziers, candles) throws a real shadow, so the painted one would be a second shadow, usually pointing the wrong way:


With it gone, the shadow follows the light. Here we swing a fire round the knight:
It also gets in the way of everything else we do to a sprite: an upscaler draws boot and shadow as one black shape, and our lighting would shade the shadow as part of the body. So this comes first.
92,424 frames


That's 26 sets of monster art, the three heroes in 27 looks of armour and weapon each, and the townsfolk: 922 files, 92,424 frames. Every frame needs a mask, a map of which of its black pixels are shadow. We're a small team doing this next to our jobs and families. Going through 28 million black pixels by hand was never an option, so it had to be a method.
How the shadow got there
The shadows all follow one recipe. Take the character's outline, squash it to a third of its height, slant it a quarter of a pixel to the left for every row up (about 14 degrees), and pin it to the ground under the feet:
We checked it against all of Diablo's own frames, and nearly every animation fits it to within a pixel or two. Through Diablo's camera, which looks down at 30 degrees, that's a sun about 58 degrees up and 20 degrees to our right.
One surprise: the ground is one fixed row per direction, not wherever the feet are. That's why a bat's shadow stays put while the bat flaps above it:
OriginalNow the catch. The shadow is palette colour 0, pure black. So are the knight's armour, the dark outlines around most characters, and every gap between two legs.
The obvious way, and why it fails
If we know how the shadow was made, why not test every black pixel? Squash it the same way. If it lands on black, that pixel casts a shadow there, so it belongs to the character. If not, it's shadow. It's the first thing anyone would try, and it fails three ways:
- Shadow passes too. The squash pulls everything towards the ground, so a shadow pixel lands back in the shadow.
- A hit doesn't say which pixel. Three rows of character squash onto one row of shadow.
- The recipe is only nearly right. It misses the painted shadow by a pixel or two along most edges.
Here it is on our knight:


So we turned it round: predict the shadow from the outline, and call any black near it shadow. That finds the shadow. It also eats the legs:

The prediction aloneOriginal
OursOriginal
On 311 frames we hold the answers for, the prediction alone took about 3,600 pixels of character. The steps below bring that down to about 600.
Step by step
The method we kept, after sixteen versions, is a stack of steps. Not every step helps every frame: on this knight the rules make it worse and the 3D model cleans up after them. The numbers count the pixels still wrong:
Follow the motion. Shadow stays on the floor, so black that travels with the body from frame to frame is body. A knight standing still on his shadow gives this step nothing.
Eight views, one pose. Every pose exists in eight directions. A leg lost in the shadow in one view is often in the clear in another.

The rules. Things we learned by looking, written down. A crease in the armour is armour. A lone speck at the edge of the cut goes. A hero's thin black rim against the shadow is shadow, but a knight's we kept as armour, and on this knight that was wrong. The 3D model puts it right.
Spells apart. When a hero casts, we split the fire and lightning off first, so black behind a spell isn't taken for shadow. The knight casts nothing, so here's the Warrior instead:


A 3D model where black stands on black. The Blood Knights, the Succubi and some of the heroes wear black boots on black shadows, and nothing above can tell the two apart. For them we built a 3D model and nudged it until its outline matched all eight views of the character in motion, then let it decide which black is boot:
Side by side with the method alone, it won on all but two of the 141 frames we compared. It isn't magic: on the heavy Rogue's near-black legs it mostly cut the legs away, so most of her frames keep the method's answer, as does the heavy Warrior when he casts lightning.
The same model now casts the knight's shadow in the game: lit from the side, he throws his profile, not his picture stretched sideways.
A second look. Before any of it reaches a person, AI agents go through the animations one direction at a time, flipping frame to frame as you would through a flipbook. They hunt for the error we kept running into while painting fixes by hand: a leg found on one frame and half missing on the next, which in the game shows up as a flicker at the knee. So an agent starts each direction on the frame where the character stands clearest, before the spell is cast, and builds every next frame on the one it has just fixed. A leg keeps its place from the frame before and takes its width from what is drawn on its own frame. Without that second half, legs grew a little wider with every frame until the Warrior walked on planks. Of the first casts we checked, eight went back to the agents with notes, three of them for a leg broken at the knee. In all they corrected 2,401 frames across the cast of characters. On the 137 spell casts that flickered worst, they gave back 22,325 pixels of boots and shins and took 7,319 more of shadow, and the black that changes from one frame to the next fell from 9,428 pixels to 2,095.
A human eye. Whatever is left, we fix by hand: more than a hundred frames, over seven rounds, in a little pixel editor, and every fix stays when the method runs again. Our random spot checks found most frames needing nothing, so for one round the method picked the 60 frames it was least sure of, and 59 of them needed a fix. Its doubts point at the right frames.
Your turn
Think you can do better? Pick a difficulty and paint the shadow. Your brush paints the character too, so mind his boots. Check counts the shadow you found and the character you cut.
Watch the 26-second version of this post:
If you spot a shadow we missed, or a boot we cut, tell us on our Discord. Brutal Diablo is free and coming early 2027.
Thanks
To Blizzard North, who painted every one of those shadows, and the knights' boots in the same black. To the DevilutionX folks, who keep Diablo running today. To our supporters on Ko-fi, and to everyone leaving a heart or a kind comment under our posts.
Donate
Brutal Diablo will be free once released. Throw a coin and it goes into dev time, GPU hours and coffee.
This mod is a love letter to the original game, so nothing here is for sale. But every donation really helps us keep the development going. Thank you.









