Devlog

Carving out the characters' shadows

Diablo's heroes and monsters are flat pictures with their shadows painted in. We wanted every brazier, torch and fireball to cast real ones, so we carved each character a body out of the pictures the game draws it from.

Cast a Fireball down a dark hall in Diablo (1996) and watch the floor. It lights up as the spell flies, but the monsters' shadows don't budge: each one is painted into its monster's picture, falling to the left whatever the light does. We wanted shadows that follow the fire, that turn as you walk round a brazier and sweep across the room as a fireball flies past. Here's the same Fireball in Diablo (1996) and in Brutal Diablo:

Diablo (1996)Brutal Diablo
In the game, the Sorcerer's Fireball flying across a dark hall full of monsters. Left: Diablo (1996), every shadow painted into the picture. Right: Brutal Diablo, every shadow cast by the fireball as it passes. Drag to compare.

For that, we first had to take the painted shadows out of every picture: that was our last post. There, most characters threw their own picture as a shadow, stretched away from the fire: fine with the fire behind them, wrong from the side, where a knight throws his front view stretched sideways. Which raises a strange question: how do you cast a shadow from a picture?

Five ways to throw a shadow

A shadow is the shape of a body as the light sees it, and Diablo has no bodies, only pictures. In 1996 Blizzard North rendered every hero and monster from a 3D model and saved each moment of every animation, a pose, as eight drawings, one from each direction, all from the same camera looking down at one fixed angle. The models are long gone. Here's one pose of a Blood Knight's attack, all eight:

One pose, eight drawings, going round the knight. None of them shows him from above, as a light overhead would see him.

Whatever we draw on the floor has to come out of those eight. Here are the ways we weighed:

A blob under the feet. Cheap, and it keeps a character standing on the ground, but it has no direction and no shape. We kept it, as the soft dark patch right under the feet.

The drawing that faces the light. Take whichever of the eight drawings the light sees best and lay its outline on the floor, stretched away from the light. With the light standing just where that drawing's camera stood, that's spot on. In between it's wrong, and as the light moves, the shadow jumps from one drawing to the next every 45 degrees.

A blend of the two or three nearest drawings. Smooth, and the first idea most people have (ours too). But where the drawings disagree you get two faint arms and a sword in two places. And with the light overhead no blend helps: none of the drawings is the view from above.

A real 3D model for every character. Exact, and out of reach: every monster, and every hero in every armour, would need its own model, matched to over ten thousand poses, far more than a small team can do. We built two, for the Blood Knight and the Succubus (they cast their shadows in our last post), and now keep them as a yardstick.

A body carved from the eight drawings, and the shadow cast from it. That's the one we kept; more on it below.

With a model we know what the shadow should look like from any angle, so we can score the rest. Cast each method's shadow, lay it over the model's, and count how far off it is in steps of light: Diablo shades its floors in sixteen steps from full light to black, and a full shadow is eleven of them deep. Over all 81 poses of the knight and the Succubus, the carved body comes closest at every height of the light, up to two and a half times closer than any blend. All five, side by side:

MethodShapeLight movesLight overheadSpeedSpaceEvery character
Blobno shapenever changesa round blobalmost freenothing extraYes
Facing drawing2.7 offjumps 45°wrongfastnothing extraYes
Blend of two or three2.4 offsmoothwrong2–3× slowernothing extraYes
3D modelexactsmoothrightfasta model eachNo, we made two
Carved body1.1 offsmoothclosefast15 MBYes
More dots is better. Shape: steps of light off the 3D model's shadow, on average. Speed: a carved Blood Knight's shadow takes about a fifth of a millisecond, a little less than the stretched picture the game threw before. Twenty knights round one brazier take about 3.6 ms, out of the 17 ms a frame has at 60 frames a second. A blend casts two or three drawings, so it costs two or three times as much. Space: what the game stores on top of the drawings.

So we carve. It's the closest of the cheap methods, and it's built from each character's own drawings, so nearly every hero and monster gets one, with nothing modelled by hand.

Carving, one drawing at a time

The idea is old: it's called a visual hull, a name from the early 1990s. Think of a sculptor with eight photographs. Start with a solid block, look at it from the first drawing's direction, and cut away everything outside the character's outline, all the way through. Turn to the next drawing and cut again. Each drawing removes what it can see isn't there:

Our tool carving the Blood Knight out of a solid block, one drawing at a time, then the same pose in the game.

After all eight cuts, what's left is the biggest shape that looks right from every one of the eight directions. It isn't the original model. It can't see into hollows, so a gap between an arm and the body that no drawing shows stays filled. But it's right where a shadow needs it most: the outline from each of the eight sides, and close in between.

From body to shadow

The game doesn't keep the body as a solid. It keeps it as thin columns standing on the floor, about a thousand for a typical pose and a few thousand for the biggest, and each column only remembers where the body starts and stops above its patch of floor. That's why a pose takes only a few kilobytes. Slide through the knight from his back to his front and see each slice's columns:

Our tool's render of the carved knight cut through at one slice, the part in front lifted away; on the cut face, a row of orange bars, each a column from where the body starts to where it stops

The carved knight, cut through at one slice, with everything in front of it lifted away. Each orange bar on the cut is one column, from where the body starts to where it stops; where there's a gap, a column keeps two or more pieces.

To cast the shadow, every column throws a stripe across the floor, away from the fire: the taller the column and the lower the fire, the longer the stripe. Together the stripes make the shadow for exactly where the fire is, softened the further it falls from the feet. Here are seven of the game's monsters, some mid-attack, some standing. Pick one and watch the fire circle it:

Our tool's render of the Blood Knight's carved body on a stone floor, a fire beside him, his shadow cast across the floor with a few of its stripes in orange

Each monster's carved body, from the eight drawings of one pose, and the shadow it casts from a fire circling it. The orange lines are a few of the columns' stripes. Drag across to turn the view, up and down to tilt it.

Your turn

Here's a patch of floor, a brazier and three characters: the Blood Knight, the Succubus and the Warrior. Drag the brazier around them, then flip the switch between the shadows painted in 1996 and the ones its fire casts now:

Shadow
A Blood Knight, a Succubus and the Warrior on a stone floor round a brazier, each casting a carved shadow away from it

In Diablo (1996) the painted shadows stay put wherever the fire goes. In Brutal Diablo each character's carved body casts its own, worked out live in your browser.

In the game, 873 animations have a carved body now, covering nearly every hero and monster. So next time you send a Fireball down a dark corridor, keep an eye on the floor.

Watch the 20-second version of this post:

Spot a shadow that looks wrong? Tell us on our Discord. Brutal Diablo is free and coming early 2027.

Thanks

To Blizzard North, whose eight drawings of every pose held more than anyone needed in 1996. To the DevilutionX folks, who keep Diablo running today; our lighting and these shadows are built on top of their engine. To our supporters on Ko-fi, and to everyone leaving a heart or a kind comment under our posts.

One email when the mod is out, and that’s it. We won’t share your address. Changed your mind? Write to us and we’ll delete it.

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.

Donate on Ko-fi