r/howdidtheycodeit • u/kevisazombie • Feb 19 '23
Diablo 1 sprite generation workflow
I'm looking for any information on the Diablo 1 sprite generation pipeline. My current mental model is that they are low poly 3d models rigged and animated in a modeling tool. They are then snap shotted and output to sprite image files. The snapshot process rotates around the models to generate the 8 directions.
I'm looking for what modeling tool they were created in. I'm more curious to what produced the rough pixel dithering or decomposition effects. Also interested in the palette limitations and clamping.
61
Upvotes
2
u/AJenbo Oct 22 '24 •
I used this custom script and Diablo 1 Graphics Tool to render several monsters and players in Blender and import them in to the game.
```
import bpy
from math import radians
import time
renderpath = bpy.context.scene.render.filepath
angles = ['sw', 'w', 'nw', 'n', 'ne', 'e', 'se', 's']
for angle in angles:
bpy.context.scene.render.filepath = renderpath + '/' + angle + '/'
bpy.ops.render.render(animation = True)
for obj in bpy.context.selected_objects:
obj.rotation_euler.z += radians( 45 )
bpy.context.scene.render.filepath = renderpath
```
https://github.com/diasurgical/d1-graphics-tool
Example monster in game: https://www.youtube.com/watch?v=tt2dOPg3Jjo
4
u/kevisazombie Feb 19 '23
Sucks that I got downvoted for this if this is not the best place to ask for this please direct me elsewhere.
38
u/jcsirron Feb 19 '23
There's a GDC talk where the lead developer goes over their workflow in a broad way. It's a good talk, too! https://m.youtube.com/watch?v=VscdPA6sUkc
12
u/legoandmars Feb 19 '23
Not Diablo 1, but Factorio has a decent blog post with a simple overview of the (similar) workflow they use
7
u/Necrolis Feb 19 '23
Phil Shenk (the lead artist and "lore-guy" for D2, and also worked on D1 to my knowledge) has a ton of info on the processes for D2 on his Twitter. Most of this is the same for D1, the only real changes are the way palettes are handled and the file format(s) they were encoded in (all custom formats, animations mainly used a cel based compression approach).
He also kindly gave use some insights into the rendering process on the Phrozen Keep discord as well (disclaimer: I am an Admin here so I suppose that counts as self-promotion, so I'll leave that as "up to the reader to find").
As you describe is roughly how they did it (though the directions varied for monsters, players and missiles), along with some extra tricks due to the quality loss from both the pixel density and 8-bit palette (which is what produced the artifacts you mentioned). AFAIK they used 3DS Max with various plugins for D2 and likely D1.
7
u/Ignitus1 Feb 19 '23
I think you’re spot on with the general idea of snapshotting a 3D model. Donkey Kong Country did the same thing back in the day.
As for what tools were used, only Diablo devs know. I’m sure you could achieve the same effect with almost modeling software today.