Blog for puppetry projects and musings.

Tag: puppet

Shadow Theatre Collaboration with AI (final part 5)

Everything came together and the final reveal is here! I’ll outline all of the working components below and I’ve attached the source files for download. But if you can’t wait, cut to the chase and watch the video on youtube or perhaps checkout it out with all of the 2024 Silver Lining Film Festival videos. Otherwise I’ll start with a quick recap. I collaborated with GPT4 to come up with a script and choreography for 2 characters, a wood carver named Sandy and a squirrel named Whiskers. With some coding in Blender I worked out how to choreograph subtitles and object movements. And by using hand-drawn sketches I created a physical Sandy shadow puppet using black card, and a digital Whiskers puppet in Blender. For more detail you can read previous posts or start from the start with part 1.

The final production included the following components:

  • backdrop scene — This is drawn in Blender from a hand-drawn sketch.
  • animated objects — Also drawn within the same Blender scene are the 2 squirrel puppets, and a log carving animated in 4 frames, and some spotlights with animated luminosity to give the impression of sun rays through leaves. (image below)
  • choreography sheet — A master spreadsheet containing the timings of subtitles and squirrel movements.
  • chroma-key red screen — A green-screen backdrop on which to perform the shadow puppetry. I chose red for the chroma-key colour, because… I’m not sure why.
  • the recording setup — I positioned a webcam to focus on the chroma-key screen, making sure I didn’t get it the way while performing, and positioning a computer monitor so the result are visible while I’m performing. (image below)

The choreography including a good time buffer up front, to allow time for positioning the physical puppet and video editing, and a time buffer in the middle, to allow time to swap the fishing rod for an axe while the shadow puppet was off screen. I included movement “notes” subtitles for practicing, which could be switched off in the final version. In the end I setup OBS (Open Broadcast Software) to do a few things at once: input a video recording from Blender of the animated background scene, subtitles and squirrel puppetry; to take the webcam stream of the shadow puppet and overlay with the chroma-key red removed; and to record the final combined product.

In summary, this method is pretty solid. The only major change I’d make is with the master spreadsheet. I developed the python code for subtitles and object animation separately, so these use separate input files. While tweaking the timing and choreography I was constantly converting the master excel file into two CSV files, quite annoying, so in future I’ll fix the code to use one file. But that’s it in a nutshell, so here’s the final product…

For others pursuing this path, Blender is an amazing tool, so almost anything is possible. However, there are many challenges and sometimes mysterious behaviour. Expect to be scanning youtube, blog-posts and help documentation. Add features to your scene incrementally, save all previous versions, test everything! People will recommend having a powerful computer to render your scene quickly and perfectly. I don’t have a powerful computer, so I used quick and dirty Eevee rendering and recorded directly from the screen using OBS, which is good enough. So be encouraged, all of the above is quite accessible. I’ve shared my choreography master sheet, code and blender below for anyone to use. Let me know if you try this or are taking it to the next level. I might be able to provide some best-effort help with the coding, perhaps.

Attachments:

Shadow Theatre Collaboration with AI (part 4)

It’s time to start assembling all the components for the scene. This is requiring a lot of sketching, in the main for the 2 characters and the backdrop. For the woodcarver character I used a sketched template to cut out parts from black card stock. The parts included a body, 2 legs, an arm and a head. Sounds complicated, but it only has 2 control rods, one connected to the arm, the other connected to a leg, and the body position is easily controlled between the two rods. The head pivot I connected to the arm pivot with a 4-bar-linkage and a rough ratio of 3:1, so the head moves subtly with the arm. (Thanks to Alex and Olmsted’s wonderful video.) The final leg I left uncontrolled, thinking it could be subtly influenced by surface friction, gravity, and also the axle/pivot it shared with the controlled leg. After a few practices I decided to attach it to the the other leg with some thread (added after the below photo was taken), and then it could freely move but not too far apart.

For the squirrel I used a sketch as a “reference image” in Blender to create “grease pencil” drawings of the squirrel in parts. These drawings were simple dark shapes with a few cutouts. The body, the head and the tail were separate drawings, i.e. separate “grease pencil” objects in Blender. The head and tail were attached to the parent body at a pivot point, and all transforms were locked except for rotation. I decide not to use vertex groups or bones to animate the squirrel this time, to simplify the animation code as it manipulates objects. I gave the squirrel head a “constraint”, limiting the range of rotation, and also created a “driver” for the value of the rotation so that it pivots slowly in the opposite direction to body rotation. The effect is, if the squirrel is flat to the ground, it looks forward, but if it stands up it looks more towards the woodcarver. This is perhaps a digital equivalent of the 4-bar-linkage. So the movement file (that will eventually contain timings and instructions based on the AI’s choreography) only needs to control the squirrel and it’s tail, and the head will move sympathetically. Finally I duplicated the squirrel and gave the second squirrel an acorn, thinking the second squirrel can be swapped in after the acorn pickup, rather than having to worry about adding more Blender movement code to pick something up.

After all that the largest thing left is the scenery. I’ve pencil sketched it and again will use it as a reference image in Blender to create a grease pencil drawing. I’ll also need to create the block of wood that evolves into a statue, perhaps a separate set of drawings and just use Blenders standard animation (using the “dope sheet”) to fade in and out successive drawings.

I expect there to be only one more post after which the scene will be complete. This should cover how everything comes together, the Blender scene and objects, the movement and subtitles, and how I’ll integrated the physical shadow puppet with the Blender rendered scene.

© 2025 LJ Puppetry

Theme by Anders NorenUp ↑