Managing the size of your Comp’s bounding box is one of the lowest-effort things you can do to find massive performance gains in Nuke. There are a few things we can do to stop processing extra, unseen pixels, and speed up your comp.Continue Reading "Ben, how do I manage my bbox size?"
topnode_name = nuke.tcl("full_name [topnode %s]" % nuke.selectedNode().name()) topnode = nuke.toNode(topnode_name) print(topnode.name())
Some gizmos dynamically hide/show a number of knobs with the KnobChanged python callback. This is a good option to keep your gizmo’s UI clean, but can start to get very heavy when you have too many knobs to handle, and too many nodes inside your gizmo.
Instead, it can be cleaner to use Python Script Buttons to add/remove knobs/nodes from your gizmo to keep things fast, neat and tidy.
I whipped up the following example node, which you can download here, to see how this works.Continue Reading "Dynamically add/remove knobs from gizmos"
Some nodes in Nuke, such as the Particle Emitter or your favourite Camera Shake gizmo, have a random seed knob. This allows you to create a different variation of a setup using the same parameters on a given node. When these setups are used throughout a sequence, we often want to change up the random seed value so every shot matches an approved look, but doesn’t behave in exactly the same way.
When setting up a sequence template, you could expression link all random seed knobs to a NoOp-based control panel, but there is a better, more automated way to get a “random” value by default.Continue Reading "Ben, how can I update Random Seed values in a template, automatically?"
There are two common ways you can expression-link knobs in Nuke.
- CTRL+Dragging one knob to another
- Right-clicking, choosing “add expression”, then typing your expression.
The TCL syntax for expression-linking knobs is simple:
However, there are some knobs that are a little more difficult to expression-link. For example, a channels knob can only be linked to other channels knobs, by CTRL+dragging+dropping the = button between them. Additionally, there is no visible option to expression-link Pulldown Knobs, such as a node’s filter knob. However, we can solve these problems with a little bit of Python.
In the following example, we’re going to be expression-linking Transform2‘s filter knob to Transform1‘s filter knob. Let’s write one line of Python to help us do this in the Script Editor.Continue Reading "Ben, how do I expression-link Pulldown Knobs?"
In Nuke, you’re able to dynamically change any knob’s value depending on if you’re looking through a Viewer in Nuke’s GUI, or rendering your Nuke script on a render farm. This can be useful to keep your Nuke scripts light & efficient while working, while automatically switching to more processor-intensive tasks at render time — for example, increasing motion blur render samples.Continue Reading "Ben, how do I use $gui when rendering locally?"
When adding a new gizmo to a menu inside of Nuke, I like to recycle the existing icons so I can keep everything thematically consistent. However, these icons are buried inside Nuke’s install directory, and I always forget exactly where they live…Continue Reading "Quick Tip: Reusing Nuke’s default icons."
When warping, I always use ST Maps as the base, as they provide so much extra control. Nuke’s built-in “MotionBlur” node, RSMB, and other nodes are available to generate motion blur from our warped input images, however, these nodes are generating new motion vectors, essentially making their best guess at where the pixels are travelling. Wouldn’t it be better to use our warp data to drive this instead?Continue Reading "Quick Tip: Add accurate motion blur to your warps."
You might have seen gizmos with knobs that dynamically disable/enable, or hide/show, based on the value of another knob. This is achieved by accessing the knobChanged knob, which is hidden to users, and can be accessed via Python. You can disable a selected node’s mix knob with this line of code: Similarly, you can hide…Continue Reading “Dynamic knobs in Nuke.”
We’ve all had one of those shots where our CG animates through frame and needs to change from one lighting condition to another. Perhaps this is a character travelling from indoors to outdoors, flashing lights in a scene, or an object passing through atmospheric haze; it can come in many forms.Continue Reading "Quick Tip: Animate scene states, not knob values."