Pueringer develops Corridor Key to solve 30-year green screen problem
Overview
Green screen technology has remained largely stagnant for decades, relying on basic color subtraction that fails on complex edges like hair and motion blur. Traditional chroma keying often leaves visual effects artists stuck in a loop of tedious manual cleanup. Corridor Key, a tool developed by Niko Pueringer, shifts the paradigm from color picking to neural network prediction. By leveraging machine learning, the tool identifies the patterns of a foreground subject and mathematically "unmixes" them from the background, preserving semi-transparent details that legacy tools typically destroy.

Prerequisites
To understand and implement this workflow, you should have a baseline understanding of the following concepts:
- Machine Learning Fundamentals: Knowledge of how neural networks use training data to minimize loss functions.
- VFX Pipelines: Familiarity with alpha channels, mats, and compositing layers.
- Python Programming: Essential for interacting with the neural network models and training scripts.
- Render Engines: Basic experience with Blender or Houdini is necessary for generating synthetic training data.
Key Libraries & Tools
- PyTorch/TensorFlow: The backbone for training the neural network architectures.
- Houdini: Used for procedural generation of massive datasets to train the model.
- Blender: Provides additional character-based 3D assets and hair simulations for training diversity.
- After Effects: The destination software where the generated EXR files are composited into final scenes.
- GitHub: The repository host for the open-source code and implementation guides.
Code Walkthrough
The core of the technique relies on a supervised learning model. The process involves feeding the network an image and forcing it to predict the "ground truth" provided by 3D renders.
Data Preparation via Proceduralism
To avoid the errors of manual keying, the training data is generated procedurally. This allows for thousands of variations in lighting, texture, and subject matter without manual intervention. In Houdini, this looks like a node-based logic chain:
# Pseudocode for procedural parameter randomization
import random
def randomize_scene(node):
node.parm('light_intensity').set(random.uniform(0.5, 2.0))
node.parm('background_hue').set(random.choice(['green', 'blue', 'red']))
node.parm('motion_blur').set(random.uniform(0.1, 1.0))
node.trigger_render()
The Training Loop
The network takes a composite image (foreground + green screen) and attempts to output two distinct files: the original foreground and the alpha mat. The model improves by comparing its output against the "clean" render where the background was simply toggled off.
# Core logic for loss calculation between prediction and ground truth
def train_step(model, input_img, gt_fg, gt_alpha):
pred_fg, pred_alpha = model(input_img)
# Compute loss for both the color unmixing and the alpha precision
loss_fg = criterion(pred_fg, gt_fg)
loss_alpha = criterion(pred_alpha, gt_alpha)
total_loss = loss_fg + loss_alpha
total_loss.backward()
optimizer.step()
Unmixing Logic
Traditional keyers subtract green. This network performs an "unmix" operation. If a pixel is purple because of a red gel in front of a blue screen, the model learns the mathematical relationship to restore the original red color and assign it the correct transparency value.
Syntax Notes
The project utilizes Batch Files (.bat) for simplified execution on local machines, allowing artists to run complex neural processes without deep command-line expertise. The output format is strictly EXR (OpenEXR), a high-dynamic-range format that preserves the floating-point math necessary for professional compositing.
Practical Examples
This tool is specifically designed for high-volume productions like Son of a Dungeon. In a scenario with 500+ shots, Corridor Key allows an editor to skip the manual "garbage matte" and "refine edge" steps.
A practical use case involves "impossible keys"—subjects with fine blonde hair moving rapidly against a poorly lit green screen. Where a standard Chroma Key would create a flickering mess, the neural network maintains edge consistency by recognizing the shape of the hair rather than just the color of the pixels.
Tips & Gotchas
- VRAM Constraints: The current model is computationally heavy. To run the full-resolution inference, you need approximately 24 GB of VRAM. High-end gaming GPUs like the RTX 3090 or 4090 are required for local processing.
- Training Divergence: If the model starts producing "NaN" (Not a Number) errors or gray artifacts, it usually indicates a glitch in the math or an over-reliance on a specific dataset. Diversifying training images with random background colors (recompositing on gray or noisy textures) forces the model to learn the subject, not the green.
- Pre-multiplication: Always check if your software is interpreting the EXR as premultiplied or straight. For After Effects users, switching to "Preserve RGB" in the interpret footage settings can often solve alpha fringe issues.
- Houdini
- 15%· products
- After Effects
- 10%· products
- Blender
- 10%· products
- Corridor Key
- 10%· products
- Avatar
- 5%· movies
- Other topics
- 50%

It Took Me 30 Years to Solve this VFX Problem
WatchCorridor Crew // 30:29