I’ve managed to connect a webcam to the ArduinoMega that is controlling my 3D printer, so now I can trigger a picture from the G-code that the printer is reading to make the part.
This means I can take a picture at the beginning of each printed layer, and make time-lapse video like this: