Education

Learn Documentary Film Automation using Python

Python 

has been a key part of the movie-making process for the past few years. It is rare to find an animated feature or visual effects movie that doesn’t have Python as a major contributor.

People often think of the artistic side of movies when they think about programmers. The technical side of filmmaking is often overlooked by the general public.

Here are a few blog posts I wrote about Python and the major films I have been privileged to work on. This will hopefully show how Python can be used to enhance the life of any movie.

Udemy recently launched a course to help artists learn Python For Maya, which is becoming an increasingly important skill in the industry. These blog posts are also companion material for the course.

What is Python?

Python may be unfamiliar to some of you.

Python is a programming language that’s easy to learn and to write. It is extremely popular in feature film production as well as other fields like science and machine learning.

Learn more about Documentary Film Automation using  Python Project

It is important to remember that Python 2.7 is still the preferred language for film production. In 2020, there will be a concerted effort to switch to Python 3. We should see greater adoption of Python 3 starting in 2021.

The Feature Film Pipeline

Our feature film pipeline is where Python has its greatest use.

This image shows the pipeline at all major studios.

 The Pipeline connects all departments. It ensures that data flows between departments and that everyone is able to work together. It also manages the toolsets within each department to allow artists to work efficiently. But let’s focus on inter-departmental flow.

The Pipeline is responsible to transfer data between departments. The basic idea of how it works is here (although it is more organic than the one I have described):

We receive data from our clients or story artists in the form of plates or previsualization (previs), or storyboards, which tell us what’s happening in the scene.

Modeling looks at all this and creates 3D models for all assets.

Rigging takes the character models and applies a virtual framework to make them animated.

Matchmove is responsible for creating virtual cameras that match those used in the film, as well as any standing characters and geometry.

The layout takes the rigs and creates their own cameras. They are the equivalent of a virtual directory for photography.

Animation is responsible for the scene.

 They are the equivalent of actors. They control the movements of the characters and bring inanimate skeletons alive.

CharacterFX is responsible for all technical aspects of animation. CharacterFX is responsible for all technical aspects of animation, including muscle simulations and making cloth move realistically.

FX handles all non-animation effects. FX can handle all aspects of destruction, fire, and voxelization.

Texturing is responsible for giving color to 3D Assets, so they’re not just grey objects.

These textures are then shaped to give the assets a material that tells how light should interact with them.

Matte Painting is the department that we turn to when it’s not practical or logical to create an environment. Realistically, we can only build so many things. It’s much more efficient to have someone do a high-quality painting.

All this information is sent to Lighting, who adds lights to the shot and renders the image. To sweeten the image, they do some compositing. This may be the end for an animated feature.

Preparing plates for visual effects show involves removing unwanted elements, noise removal, and lens warping. Plate Prep (also known as RotoPaint) is responsible for this.

All images are sent to Compositing, who will combine all of our CG renders into the film plate. This is the final stage of a visual effects show.

All these pieces are connected using Python. 

Next, I will discuss publishing before moving on to describing the use of Python in each department.

Publishing and Asset Management

This is the heart of the traditional pipeline. It allows for asset sharing between departments and tracking.

Asset Publishing is the first section.

If a department considers its work complete, it publishes it for the benefit of the next department. Modeling exports models. But animation exports animation? It all depends on who is using it. It also depends on whether the product needs to be interactive beyond this point.

We publish geometry as a cache using Alembic, which is an industry-standard created by Imageworks and ILM to ensure consistency in cache format. Point cloud data is either Alembic, OpenVDB or tiff. Images are a mix of tiffs and OpenEXR. The industry will soon standardize on an OpenUSD universal scene format, which is a Pixar product.

The idea is to keep data in the most efficient format while still allowing for interchangeability. Cache data is usually the best option as it only takes an IO hit (which is cheaper) and not a deformation hit (which can be very costly).

It all becomes very complicated. Artists don’t have to know where or how their data got there. Artists only need to be capable of loading it in and publishing it.

Final Words


I hope this blog post has been a good look into how programming can be such a vital part of bringing moving to life nowadays, and more specifically, how Python itself is so useful.

It makes sure that we can quickly make very complex relationships between all these moving pieces simpler, and also makes it so each department can work more efficiently.

It’s often overlooked since it’s not an artistic part of the process and you rarely see the direct results of it on screen, but nevertheless, it’s a skiill that is increasingly valuable in getting these increasingly complex movies to the big screen.

Related Articles

Back to top button