PRef To STMap

The PRef To STMap Baker is a Nuke tool that generates a motion-vector-based STMap using 3D Position Reference (PRef) passes. By analysing how 3D points on a deforming object move relative to a static "rest" frame, it calculates a UV map (Red/Green channels).

First submitted: 3 February 2026

Author: Marty Blumen

Website: https://www.martyblumen.com/

Compatible Nuke versions: 13.0 or later

Compatibility: Windows

This allows compositors to:

  • Stick textures to deforming geometry without needing original UVs.

  • Stabilize deforming 3D renders.

  • Inverse-map 3D position data into 2D UV space using a K-Nearest Neighbors algorithm.


System Requirements

  • Host Software: Nuke 13.0 or higher.

  • Python Version: Python 3.x (Standard in Nuke 13+).

  • Required Libraries: The following Python modules must be installed in a path Nuke can read (e.g., ~/.nuke/python or added to sys.path):

    • scipy (specifically scipy.spatial)

    • imageio

    • numpy

  • Input Data: A render pass containing 3D Position data (PRef), ideally unpremultiplied.

The "Amicable Computation" License (v1.0)

Copyright (c) 2026 Marten 'Bluey' Blumen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, subject to the following conditions:

1. ATTRIBUTION The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

2. COVENANT OF REASONABLE COMPOSURE ("THE CHILL CLAUSE") By executing, installing, or otherwise utilizing this Software, the Licensee agrees to maintain a standard of professional equanimity. The Licensee acknowledges that the Software is experimental in nature and agrees to:

(a) Exercise reasonable patience regarding execution times, particularly during scipy.spatial.cKDTree queries on high-resolution datasets;

(b) Forbear from aggressive or hostile communication regarding bugs, edge-case failures, or installation friction; and

(c) Accept that the Software is provided as a good-faith effort to solve technical challenges, and shall be utilized in a spirit of constructive collaboration rather than adversarial expectation.

3. NO WARRANTY THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

or register to download or rate.

Comments

or register to join the conversation.

Download Verification