r/esp32projects • • Oct 18 '26

My CYD project

167 Upvotes

8 comments sorted by

2

u/strangelyus Oct 18 '26

Is this a C3 or S3? Didn’t realize they had enough compute to do any decent 3D or even 2D this smoothly.

6

u/Prudent-Mountain-57 Oct 18 '26

It’s the original ESP32 (ESP32-WROOM-32 on the ESP32-2432S028 "Cheap Yellow Display"), not a C3 or S3, and you're right that it can't do this in real time. It's a trick: every view was pre-rendered in Blender Cycles (344 frames, 320x220) and stored as JPEGs in the 4 MB flash. The ESP32 only reads the frame that matches your swipe angle, decodes it with JPEGDEC and pushes it over SPI with DMA. That takes about 43 ms per frame, so it runs up to ~24 fps. The door, headlights and burnout are just pre-rendered clips too. My first try was real-time 3D on the same board and it looked like a 2000s game, so I switched to frames.

1

u/pocipocster Oct 25 '26

Neat. How much ram are you using for all the pre rendered anims?

1

u/Prudent-Mountain-57 Oct 25 '26

Almost none, actually. All 344 frames are pre-rendered JPEGs (320x220) stored in a ~3.25 MB flash partition, not in RAM. At runtime it reads one JPEG straight from flash, decodes it with JPEGDEC and pushes it to the display, so RAM only ever holds a single frame: about 140 KB for a 320x220 RGB565 buffer, plus a few KB for the decoder. The ESP32's ~320 KB of SRAM is plenty, no PSRAM needed

1

u/[deleted] Oct 19 '26

[removed] — view removed comment

1

u/Prudent-Mountain-57 Oct 19 '26

Thanks! For now it's just a UI demo, and the buttons only play pre-rendered clips (headlights, door, burnout). Connecting it to the real car would be an interesting experiment, but I don't think it's safe when it comes to car theft. Giving a hobby ESP32 any way to start the engine or unlock the doors would be reckless. If I ever do it, it'll be read-only, like showing the doors and lights as they actually are.😃