Nuke workFlow optimisation TIPS

Nuke work flow optimisation tips:

Work flow optimisation is very important  and help-full while you render or preview the shot. When you working with bigger shots you should optimise your script for better working speed and rendering. Otherwise you always suffer lot with your machine....  God damn in slow ???!!!!!

Here i'm going to give you guys some off my own way off working style and work flow optimisation tips....  Hope this will help you guys.... at-least...

First thing first.
1. Avoid multiple read nodes.



2. Keep adding(over) your FG layers always on "A" input and keep connect BG to "B" input. Working like this way will help to keep track your "BoundingBox" size.

Have a habit to always set your bbox to "B" from "union" after adding every Merge. i personally use to do this when ever add "Merge" node
 ( in some case you need keep it union, like.... BG replace, match-moving )


If you forget to keep the "bbox" set to right way. Its became oversized and slow down your script.

I already half of the way of my shot with out worrying "bbox" now only realising the problem, But how can i change the "Merge" nodes "bbox" to B" in a simple way??
( there are 1000 "Merge" nodes already)

Don't panic, simple python command will do the job in a single click. No need to go every 'Merge' node and manually change the 'bbox'.

for s in nuke.allNodes("Merge2"):
    s['bbox'].setValue(3)


Know more about working with bounding box:  working-with-bounding-box-in-nuke


3. Roto node.

Use "roto" node rather then "rotopaint" node for creating roto splines. Always keep the roto nodes output as alpha only. If you keep output in "rgba" (default) nuke take some time  to generate pixels in each channels.

If your using "Blur" node to soften your "roto" shape don't forget to change the channels from " All to alpha". If your "roto" node output only alpha channel, then "Blur" node automatically change the channel to 'alpha' only.



4. Extract matte from ID passes using Shuffle node.

If you want to extract "red" channel only from you ID pass, Keep all other channels as black(blank) except alpha channel in "shuffle" node. Don't check red channel to 4 channels.




Choose the channel as per your need on alpha tab only and keep all other channels as black.  Like below example.

You can save some computing time by following above method. Subtract, mask, stencil, in, out etc.. All these "Merge"operation's  need only alpha channel to produce the result.


5. Translate Rotate Scale  -  TRS

Always use separate nodes for "TRS". Never do these three things in a single "Transform" node. Because nuke render build with single threaded tech. you can save some render time by splitting  "TRS" to multiple nodes.  Don't worry about filter hit. Transform node's are concatenating each other so there no room for quality loss.
For more about concatenation : concatenation


Don't  forgot to change the filter setting on the end (last) node. Other wise there is no use off it, above nodes filter hits are not consider by nuke.


6. RotoPaint node

Use multiple "RotoPaint" node instead of single(1) node. Avoid en-number off paint stroke's in a single "RotoPaint" node. Nuke's "RotoPaint" node quit slow while rendering or previewing. So split your paint strokes into multiple node's. Won't go more then 40 paint strokes in a "RotoPaint" node.

7. Remove unwanted channels by using 'Remove' node.

If your working with multi channel 'exr' files. Remove unwanted channels from the comp 'flow'.  Add a remove node and select the channel which you wont use further down in your comp tree.

Be aware some nuke nodes operation are set default to all channels. Example 'Blur' node. When you try to blur your multi channel exr file (sometime will use 300) nuke not only blur the 'rgba' channel, it blur's all the channel inside the exr file.  Don't forget to change the blur nodes 'channle' to 'rgba' from all.

By default nukes 'ScanlineRender' nodes render some extra channels rather then 'rgba'. If you have many 'ScanlineRender' node in your script with the default setting, nuke will slow down. Avoid extra channels when ever you doesn’t need it. Turn off those channels by manually or use following simple python script.



for s in nuke.selectedNodes("ScanlineRender"):
    s['output_motion_vectors_type'].setValue(0)
    s['MB_channel'].setValue('none')


 8. Postage stamps (Thumbnail's)

postage stamps slow down the nuke script. If you have multiple read node or animated noise node's with postage stamp this will slow down your script. By default nuke switch-on "Postage stamps" on every read node and some other nodes like colorWheel, constant. Nuke writes the postage stamp image's into the disk and read it back while you scrub through the time-line. you can see read node update its thumbnail while you playback.



If you have multiple read node ? nuke dose the above process to each node to preview the thumbnail for the nodes. Same as animated constant & noise.

This little python code will switch off all the nodes "postageStamp".

for s in nuke.allNodes():
    s["postage_stamp"].setValue(False)




Else change the "postage stamp" settings to static frame from ( by-default ) current frame. By doing this nuke will render a single frame for each read node and use it for the thumbnail. By this way you can speed up the work flow.

you can find the postage stamp settings under the node graph tab on nuke preferences. Edit-->preferences-->nodegraph.


 you can choose the frame which you want set as thumbnail for that node.


This will work only you change the postage stamp settings to static frame.


9. Optical flow nodes:

Don't let optical flow node's live in the script. All Furnace nodes, OFlow, Denoise, Kronos are dramatically slow down your work flow. So make pre-comp of these node's will speed-up the nuke script.

10. Dissolve:

Use merge node's 'mix' for dissolve your 'A' input. Don't use "multiply" node to dissolve the 'A' input. Because when merge nodes 'mix' value come to zero, that time nuke stop to process the 'A' input side nodes. If you use 'multiply' node then nuke process these nodes after you dissolve the input.


Popular posts from this blog

2D Volumetric rays in nuke

Export Maya camera and Objects to Nuke