Why it's important: In a world dominated by powerful GPUs from Nvidia and AMD, one self-taught programmer is proving it's possible to create impressive 3D graphics from scratch. Alex Fish has released his amazingly smooth 3D engine running on a small homebrew GPU with an Espressif ESP32-S3 microcontroller.
This isn't Fish's first foray into homemade graphics. He initially developed the “Pescado” engine in his WebGL for web browsers and ported it to his OpenGL for his PC graphics cards. However, achieving smooth 3D rendering on a low-power microcontroller is a major advance.
Fish's engine, named “ESPescado” for the ESP32 port, is completely handcrafted using C++ and OpenGL. He created vector, matrix, and rendering math libraries from scratch. As Fish explains, “The physics and geometry are done in 3D, but if you display the image on a 2D monitor, you can only plot your 2D points.”
ESPescado uses perspective projection to flatten 3D objects to 2D for the screen.
Moreover, it is quite responsive. Thanks to the ESP32's dual-core design, Fish's code can handle physics and input processing at 700 frames per second on one core, while his other core focuses on smoothly rendering wireframes at 40 fps. I am putting
The hardware itself is a hacker's dream. Surrounded by an ESP32 brain is his compact 1.9-inch, 320 x 160 pixel display, combined with an external joystick that allows full 3D control. Attach a single joystick to your finger for an immersive experience. The accelerometer provides motion input to adjust the in-game camera.
See also: FuryGPU is an open source hardware GPU built from the ground up
Under the hood, ESPescado utilizes the standard 3D toolkit of meshes, vertices, and matrices. Meshes of triangles of points and lines form the basic objects and terrain found in video games. The engine can then apply transformations such as scaling, rotation, and positioning to place these meshes in the virtual 3D world.
A YouTube demo shows ESPescado in action, with Fish manipulating a simple green triangular object against a black background. This provides fundamental insight into the engine's capabilities and shows that even the most basic 3D graphics can be developed from first principles.
Fish's project is an interesting glimpse into the core concepts behind 3D engines for tinkerers and students of 3D mathematics. Both the ESP32 “ESPescado” version and his original OpenGL “Pescado” are released on his GitHub for anyone to learn and build on.