renderthreads header

renderthreads is a Python package that enables per-frame easy command-line multithreaded rendering for the popular compositing application Nuke. It is created and maintained by Timm Wagener.



Documentation Status Downloads Latest Version Development Status Download format License Gitter

Content

renderthreads icon

Installation

The installation is easy. Choose one of several options.

Manual installation


  • Go to PyPI and download the package.
  • Then extract the zip and go into the folder renderthreads-x.x.x (for example renderthreads-0.2.3). In there you’ll find a folder called renderthreads.
  • Take it and copy it into your Nuke site-packages (usually NukeX.YvZ/lib/site-packages/) or anywhere else on your Nuke Python path.

pip


If you have pip installed for your Python interpreter in Nuke you can just type the following:

pip install renderthreads

To verify the installation type:

pip list

and see if renderthreads is amongst the listed packages.

Note

In case you have pip but NOT for your Nuke Python interpreter, which might often be the case, i would still recommend doing the above procedure. renderthreads will then be installed into your default system Python and you have to copy it into your Nuke site-packages by hand but pip still provides an easy and clean way to quickly update renderthreads.

Run it


To start it open up your Nuke Python script editor, copy this and run:

from renderthreads import renderthreads
reload(renderthreads)
renderthreads.run()

In the case of a successful execution you should see the following window:

renderthreads blank

You successfully installed renderthreads.

renderthreads icon

Quickstart


Have your first renderings up and running in under a minute (...or 2). To start a command-line rendering with renderthreads do the following.


renderthreads icon

Run the startup script like so. You may want to make a button out of it and integrate it in a menu. (Forgot how to install it? Here’s how.)

renderthreads icon

Select a write node and add it like so.

renderthreads icon

Success. Your Write node is in renderthreads along with a frame range and a priority.

renderthreads icon

Optional: Check the command line menu if the command line settings are fine. For example you could tell Nuke to use render licenses over interactive ones. Each command line flag has a tooltip to (more or less) explain it. The explanations are copied from ../Nuke.exe -help

renderthreads icon

Optional: Check the script name and the Nuke path under Constants. The nuke script is always the one you have open right now. If it says Root you might be prompted to save before rendering can start. The Nuke version can be choosen.

renderthreads icon

Start the rendering like so. By default rendering will happen on half of the cores you have available. (You can adjust the number of cores in the Threads menu)

renderthreads icon

Success, you are rendering. A lot of command shells pop up by default (No worries, you can disable this in the Threads menu). The progress is displayed in the interface.


renderthreads icon

You can disable the rendering anytime, like so. Disabling will kill the jobs currently running and not start those that are still queued up anymore.

renderthreads icon

Options


renderthreads gives you a few menus to adjust things and influence the rendering. All the widgets provide reasonable tooltips that tell you what they are doing. Anyways, here’s another source of information on what those settings do.


Render


renderthreads icon

  • Nuke node is the name of the write node you are about to render. You can edit it from within renderthreads. Write nodes within nested groups are also valid.
  • Start frame of your render sequence. The initial value is taken from the root node.
  • End frame of your render sequence. The initial value is taken from the root node.
  • Progress of the rendering of your specific write node. The blue number is the total amount of jobs/frames. The progressbar at the bottom displays the sum of all write nodes.
  • Priority of the rendering of the specific write node. This cannot be adjusted once the jobs are added. In case of equal priorities the jobs are prioritized by the write node alphabetic order.
  • Log displays success/fail messages for the command-line jobs. By default only error messages are logged, but you can change that in the Threads menu.

Threads


renderthreads icon

  • Threadcount lets you adjust how many threads/cores you want to use for rendering. Each core renders a single frame. By default the number of cores is half the number of the available cores in your system, which is a conservative setting ment to prevent memory overflow.

    Warning

    Be aware that each command-line render opens your Nuke script to process it. Therefore it needs a certain amount of memory. When too many jobs are started that eat a lot of memory you might want to pick a lower threadcount to prevent memory overflow.

  • Thread interval is the rate at which a new job is started by a thread after the thread finished the current job. The should rarely be a reason to increase this value.

  • Thread timeout is a more important value. It sets the time in minutes that a rendering is allowed to take before it is forcibly closed. The default is 10 minutes, but demanding nuke comps can easily take longer. If you wonder why all your renderings are terminated, a too low timeout setting might be the reason.

  • Display render shell lets you adjust wether or not you want shell windows popping up.

  • Log exitcode errors only Wether you just want errors and their exit codes logged (process terminated, timed out, was disabled...) or also sucess messages.

  • Re-add broken job Wether or not to add a job to the queue again that terminated unsuccessfully. (With an exitcode different from 0).

  • Re-add broken job count How often such an error job gets added again. The default is 2.

  • Start/Stop threads Pause rendering. Will finish all currently running jobs and then re/start or stop rendering. All the jobs remain, so this is like a pause function.

  • Print queue size Print complete count of all jobs.

Command-line


renderthreads icon

  • Command-line flags Assemble the Nuke command line used for rendering. Here you have the default command line options (Taken from Nuke 8.05). At the top you see the command line that you assembled. Some values like -X, -x or -F are locked and cannot be changed. They are handled internally. Each flag has a tooltip that describes what it does.

    Warning

    renderthreads does not restrict you in the combination of flags. Therefore you can set flags that are incompatible or make no sense (like enabling proxy mode while forcing full size rendering).

  • Nuke script is the currently open script. If the value is Root (script not saved yet), you might be prompted to save before rendering starts. The value updates automatically when you save the script. You cannot change this value.

  • Nuke executable The nuke exe that is used for rendering. You are free to pick the Nuke version you want. Nuke is always started with the environment of the Nuke that is starting the jobs.

Options


renderthreads icon

  • Logging level How verbose renderthreads tells you about its state.
  • Save script before render lets you adjust if you want to automatically save before before starting a render. The default is on. If this is off you might not render the latest adjustments in your comp unless you saved manually
renderthreads icon

Compatibility


Here i will note environments (OS, Nuke versions) that renderthreads was tested in and is known to work with.....or not. If you encounter any issues running the tool with your version of Nuke or your operating system, feel free to drop me a line. Or file a bug report on the github issue tracker.


Operating systems


Compatible

  • Windows7

Incompatible

Untested

  • Linux
  • MacOS

Nuke versions


Compatible

  • 9.x
  • 8.x

Incompatible

  • 7.x/below: renderthreads needs Python 2.7