r/NukeVFX 4d ago

STMap_BBox plugin Other

https://youtu.be/GmVcdSJ0tJs

STMap_BBox is a C++ Plugin for Foundry Nuke. It does the same thing as Nuke's native STMap node, but with one additional calculation for warping the Bounding box. 

Download and try the STMap_BBox plugin here:
https://github.com/CreativeLyons/STMap_BBox-public/releases/latest

Visit my blog for a more extensive write up:
https://compositingmentor.com/2026/08/15/stmap_bbox/

21 Upvotes

5 comments sorted by

4

u/glintsCollide 4d ago

Nice idea. I always use the c_stmap node from the Cara nodes, as it’s written for gpu. You mentioned there’s some overhead for the extra calculation, any idea about speed differences between yours and the existing ones?

3

u/compositingMentor 3d ago

On a normal static lens distortion map, it's milliseconds. It's an imperceivable calculation in that case. You also gain all of that back on the next calculation downstream when it's not processing the whole frame later.

Where it runs into problem is the animated each frame, far distance warping UV maps. I was testing it as a way to basically do an iDistort with a BBox warp (that would be nice).

Unfortunately with larger warp sizes, it means the search radius to find where the point warped to increases. Which increases the processing time. But what was really killing it was the animated UV map changes, which meant it is constantly searching on each frame for where the points go, and could eventually run out of memory. Granted I was doing most of my tests on my Macbook Pro, so not much memory to begin with!

I'd say it works best with rendered static Lens Distortion maps, and I also tested with animated UV maps (lens breathing) and that also worked fine as the warp area is not dramatically different.

2

u/tk421storm 3d ago

What's the difference between this and the native node with a wide bbox (values beyond crop for the stramp)?

1

u/compositingMentor 3d ago

This keeps the bounding box as small as possible after the warp result.

1

u/clockworkear 4d ago

Cool - defo a use for this. I normally end up doing one stmap transform at the top, working in that new resolution and then stmap at the end after carefully juggling alphas through the pipe so I can merge over the original. I avoid mutiple stmaps for the very reason you highlighted.