Contact Support

Batch Mode

Batch mode is used to start render farm rendering. Batch mode requires the --batch flag, and at least three arguments; --katana-file, --render-node, and -t flags. These arguments give - respectively - the Katana scene to render, the Render node to render from, and the frame range to render.

Article:  How to render an image in multiple tiles in Batch Mode.

For example, to start rendering a Katana scene called yourScene.katana, at Render node renderHere, from frame 1 to frame 1000:

1.   Open a terminal.
2.   Navigate to the directory where you installed Katana.
3.   Enter:

./katana --batch --katana-file=/yourDirectory/yourScene.katana --render-node=renderHere -t 1-1000

The following options apply to Batch mode:

Option

Usage

--katana-file

Specifies the Katana recipe to load.

Syntax:

--katana-file=<filename>

Example:

./katana --batch --katana-file=/tmp/test.katana --t=1

--render-node=beauty

--asset

Specifies the asset ID to resolve.

Syntax:

--asset=<asset ID>

Example:

./katana --asset=mock:///show/shot/name/version

-t or --t

Specifies the frame range to render.

Syntax:

-t <frame range>

OR

--t=<frame range>

Where <frame range> can take the form of a range (such as 1-5) or a comma separated list (such as 1,2,3,4,5). These can be combined, for instance: 1-3,5. The previous example would render frames 1, 2, 3, and 5.

Example:

./katana --batch --katana-file=/tmp/test.katana

--t=1-5,8 --render-node=beauty

--var

Sets the value of an existing Graph State Variable.

Syntax:

--var <GSV name>=<GSV value>

Example:

./katana --batch --katana-file=/tmp/test.katana --t=1 --var Shot=Sh1 --render-node=beauty

--threads2d

Specifies the number of additional processors within the application. An additional processor is also used for Katana's main thread.

This means that Katana uses 3 processors when --threads2d=2.

Syntax:

--threads2d=<num threads>

Example:

./katana --batch --katana-file=/tmp/test.katana

--t=1 --threads2d=2 --render-node=beauty

--threads3d

Specifies the number of simultaneous threads the renderer uses.

Syntax:

--threads3d=<num threads>

Example:

./katana --batch --katana-file=/tmp/test.katana

--t=1 --threads3d=8 --render-node=beauty

--render-node

Specifies the Render node from which to render the recipe.

Syntax:

--render-node=<node name>

Example:

./katana --batch --katana-file=/tmp/test.katana

--t=1 --render-node=beauty

--render-internal-dependencies

Allows any render nodes that don't produce asset outputs to be rendered within a single katana --batch process. Asset outputs are determined by asking the current asset plug-in if the output location is an assetId, using isAssetId(). The default file asset plug-in that ships with Katana classes everything as an asset. So at present it is not possible to render any dependencies within one katana --batch command without customizing the asset plug-in.

--crop-rect

Specifies which part of an image to crop. The same cropping area is used for all renders.

Syntax:

--crop-rect="(<left>,<bottom>,<width>,<height>)"

Example:

./katana --batch --katana-file=/tmp/test.katana --t=1

--render-node=beauty --crop-rect="(0,0,256,256)"

--setDisplayWindowToCropRect

Sets the display image to the same size as the crop rectangle set by --crop-rect.

--tile-render

Used to render one tile of an image divided horizontally and vertically into tiles. For instance, using
--tile-render=1,1,3,3 splits the image into 9 smaller images (or tiles) in a 3x3 square and then renders the middle tile as the index for tile renders starts at the bottom-left corner with 0,0. In the case of 3x3 tiles, the indices are:

0,2 1,2 2,2

0,1 1,1 2,1

0,0 1,0 2,0

The results are saved in the same location as specified by the RenderOutputDefine node but with a tile suffix. For instance: tile_1_1.beauty.001.exr

Syntax:

--tile-render=<left_tile_index>, <bottom_tile_index>, <total_tiles_width>, <total_tiles_height>

Example:

./katana --batch --katana-file=/tmp/test.katana --t=1

--render-node=beauty --tile-render=0,0,2,2

./katana --batch --katana-file=/tmp/test.katana --t=1

--render-node=beauty --tile-render=0,1,2,2

./katana --batch --katana-file=/tmp/test.katana --t=1

--render-node=beauty --tile-render=1,0,2,2

./katana --batch --katana-file=/tmp/test.katana --t=1

--render-node=beauty --tile-render=1,1,2,2

--tile-stitch

Used to assemble tiles rendered with the --tile-render flag into a complete image.

When stitching, you must still pass the --tile-render argument, with the number of x and y tiles, so that the stitch knows how many tiles to expect, and their configuration.

Syntax:

--tile-render=<left_tile_index>, <bottom_tile_index>, <total_tiles_width>, <total_tiles_height> --tile-stitch

Example:

./katana --batch --katana-file=/tmp/test.katana --t=1 --render-node=beauty --tile-render=0,0,2,2 --tile-stitch

--tile-cleanup

Used to clean up transient tile images. Can be used in conjunction with --tile-stitch to assemble a complete image, and remove transient tiles in a single operation.

When using --tile-cleanup you must still pass the --tile-render argument with the number of x and y tiles, so that cleanup knows how many tiles to remove.

Syntax:

--tile-render=0,0,<total_tiles_width>,<total_tiles_height> --tile-clean

Example:

./katana --batch --katana-file=/tmp/test.katana --t=1 --render-node=beauty --tile-render=0,0,2,2 --tile-stitch --tile-clean

--prerender-publish

In Batch mode, it executes the Pre-Render Publish Asset action on the outputs but doesn't render images.

The value specifies the filename for dumping render pass information.

Note:  This can be used together with --versionup.

Syntax:

--prerender-publish=<pass info>

Example:

./katana --batch --katana-file=/tmp/test.katana --t=1 --render-node=beauty --prerender-publish=/tmp/pass_info.xml

--make-lookfilebake-scripts

Used to write out a number of Python files that can be executed in Batch mode to write look files.

Syntax:

--make-lookfilebake-scripts=<script directory>

Example:

./katana --batch --katana-file=/tmp/bake.katana --t=1

--make-lookfilebake-scripts=/tmp/bake_scripts

./katana --script /tmp/bake_scripts/preprocess.py

./katana --script /tmp/bake_scripts/lf_bake_default.py

./katana --script /tmp/bake_scripts/postprocess.py

--postrender-publish

In Batch mode, it executes the Post-Render Publish Asset action on the outputs but doesn't render images.

The value specifies the filename for dumping render pass information.

Note:  This can be used together with --versionup.

Syntax:

--postrender-publish=<pass info>

Example:

./katana --batch --katana-file=/tmp/test.katana --t=1 --render-node=beauty --postrender-publish=/tmp/pass_info.xml

--versionup

Used to specify that you want to version up assets when publishing to the asset management system.

Syntax:

--versionup

Example:

./katana --batch --katana-file=/tmp/test.katana --t=1 --render-node=beauty --versionup

Note:  Setting threads3d or threads2d through Batch mode launch arguments takes precedence over the interactiveRenderThreads3D, and interactiveRenderThreads2D settings in Katana's Edit > Preferences > application menu.