r/computergraphics • u/antahonist • Oct 28 '26
I wrote a tiny software rasterizer in Lua that renders 3D models straight to pixel art
It runs inside Aseprite as a script. No Blender or shaders, just triangles, a z-buffer and a bunch of rounding.
Turns out rendering big and scaling down looks like garbage, so everything is drawn at its final size (32, 64 or 128 px). Lighting is quantized to 4-5 tones per material, outlines come from depth differences between parts, and hard edges get a 1px highlight. Grain is tied to world position so it doesn't crawl around when the model spins.
Bayer dithering only works on light transitions. On 1-2px strips it just turns into a weird zigzag.
Circuit boards were a pain. Traces use A*, but in 2:1 iso you need 2px between parallel lines or they merge. So on a 32px board you're stuck with a tiny 6x4 grid. Bigger sizes look way better.
Still can't get the dithering to look right during rotation. It's screen-space, so it shimmers like crazy. Anyone figured out a way to keep it stable without it sliding around the surface?



4
u/openroom_xyz Oct 28 '26
That's amazing thanks for sharing
2
u/Mr_Sim_ Oct 28 '26
That's pretty !
2
u/AllNamesAreTaken92 Oct 28 '26
These look absolutely amazing. The aesthetic is right up my alley, and execution seems solid.
Gj man, I appreciate you sharing.
2
u/Bowl_of_Cham_Clowder 29d ago
Beautiful, this is so cool
3
u/keyclicker456 Oct 28 '26
can you describe your ai usage in this project, please?
1
u/antahonist Oct 28 '26
you can see the full pack here https://antahonist.itch.io/micro-electronics-3d-pixel-art-kit
2
u/KuKu_ab 28d ago
Well, I'd play actually some kind of iterative-game about hardware development in such style.
Sure if it is *game*, not just vibe coded generative gamificated product...