How we make our ads in Blender with Python

Every frame of our video ads is made with code. Learn how we build the scenes in Blender with Python and render them in Docker.

A film camera on a tripod films a tiny diorama of a house under studio lights

Our video ads are made in Blender, the free 3D software. But nobody moves objects by hand. Python scripts build every scene.

Why code?

  • Changes are fast: edit a line, render again.
  • The style stays the same in every video.
  • Everything is repeatable, from the first shot to the final file.

The pieces

  • Blender scenes written in Python: the pin, the house, the city, the phone with screen recordings of the app.
  • A text-to-speech model for the voice.
  • Music composed as MIDI in Python and rendered with a free soundfont.
  • ffmpeg to put picture and sound together.

One command

The whole pipeline runs in Docker with one command. It takes about an hour on a normal gaming GPU.

What we learned

The hardest part is not the 3D. It is timing: making the words, the music and the picture land at the same moment.

Guess the price of real Swedish homes

PricePinner is free on Android and iOS. It has no ads.

Get the app