Reduce control point counts on roto shapes while preserving visual fidelity — with animation baking and layer exploding built in.
Heavy roto shapes with hundreds of points are slow to manipulate and render. Roto Simplifier uses the Ramer-Douglas-Peucker algorithm to intelligently reduce point counts, automatically recalculating smooth tangents and optionally baking the result across a frame range.
- Three reduction strategies — manual epsilon tolerance, target point count, or percentage reduction
- Smooth tangent recalculation — adjustable tension for clean Bezier curves on simplified shapes
- Animation baking — simplify once, bake across an entire frame range with per-frame point tracking
- Layer exploder — split roto layers into separate nodes (top-level, recursive, or custom depth)
- Output options — simplify in-place or copy to a new node
- Feather preservation — feather points are carried through simplification
- Pure Python — no compilation needed, works on Nuke 13–16+
An experimental C++ native module (cpp/) implements the RDP algorithm for faster processing on very high point counts. It's not required — the Python implementation handles typical workloads well — but is included for anyone who wants to compile it against their Nuke's Python headers.
| OS | Path |
|---|---|
| Windows | C:\Users\<YourName>\.nuke\ |
| Mac / Linux | ~/.nuke/ |
Add these lines to ~/.nuke/menu.py (create it if it doesn't exist):
import nuke
import roto_simplifier
nuke.menu('Properties').addCommand('Roto Simplifier...', 'roto_simplifier.start()')A full example is in
install/menu_example.py.
Access via right-click on any Properties panel → Roto Simplifier...
- Select a Roto or RotoPaint node
- Select one or more shapes inside the node's curve editor
- Open Roto Simplifier (right-click Properties panel)
- Choose a reduction strategy:
- Epsilon — set a pixel tolerance; points within this distance of the simplified line are removed
- Target Count — specify exactly how many points you want (binary search finds the right epsilon)
- Percentage — reduce by a percentage of the original count
- Adjust Smoothing tension (0.0 = sharp corners, higher = smoother curves)
- Optionally enable Bake Animation and set a frame range
- Optionally check Output to New Node to preserve the original
- Click Simplify Shape
- Select a Roto node with a layered structure
- Choose a depth level:
- Top Level Only — explode first-level layers
- Infinite Recursive — explode all sub-layers
- Custom Depth — specify how many levels deep
- Click Explode Layers — each layer becomes its own Roto node
The simplification uses the Ramer-Douglas-Peucker algorithm, which recursively eliminates points that fall within a tolerance distance of the line between their neighbors. After simplification, new Bezier tangents are calculated using Catmull-Rom–style interpolation with adjustable tension.
For animation baking, the tool determines which original point indices survive simplification on the reference frame, then samples those same indices across every frame in the range — preserving the motion path while reducing the point count.
The cpp/ folder contains a native Python extension that accelerates the RDP algorithm. To compile:
- Edit
cpp/setup.pyand pointnuke_includeto your Nuke installation's Python include directory - Build with:
python setup.py build_ext --inplace - Place the resulting
.pyd/.soalongsideroto_simplifier.py
This is entirely optional — the pure Python version works well for typical use.
RotoSimplifier/
├── roto_simplifier.py # Main tool (algorithm + UI)
├── cpp/
│ ├── roto_native.cpp # Optional C++ accelerator
│ └── setup.py # Build script for native module
├── install/
│ └── menu_example.py # Example menu.py additions
├── images/
│ └── RotoSimplifyAnim2.png # UI screenshot
├── README.md
├── LICENSE
└── .gitignore
- Nuke 13.0+
- PySide2 or PySide6 (bundled with Nuke)
- No external dependencies
BSD 3-Clause — Copyright (c) 2026, Marten Blumen
Marten Blumen — martyblumen.com
