Houdini 20.5 Reference Stand-alone utilities

husk

Command line utility for rendering a USD file using Karma or some other Hydra client.

On this page

husk [options] usd_file [-o image_file]

Tips

  • On Linux and macOS, you can send the husk process a SIGUSR1 signal on the command line (kill -USR1 ‹pid) to force it to write out a snapshot image of the current render.

Options

Information

--help

Show this help.

--version

Print the renderer’s version string.

Karma

--properties

Print the names of all the rendering properties Karma understands, and their defaults.

--property-definition

Print full information about all the rendering properties Karma understands.

--property-definition-file ‹filename

Save the full information about all the rendering properties Karma understands to a file. If the filename is -, writes the information to standard output.

--procedurals

Print all procedural definitions.

--filters

Print information about the filters and oracles Karma understands.

--engine

Override the Karma rendering engine. Options are xpu or cpu.

-p/--pixel-samples ‹samples

Samples per pixel. Default is 128. Specifying this on the command line overrides any render settings in the USD file.

--bucket-size ‹pixels

Size of render buckets, in pixels. Default is 128. Specifying this on the command line overrides any render settings in the USD file.

--bucket-order ‹order

Determines which buckets get rendered first in the image. Options are:

  • middle - Render starting from the middle of the image

  • top - Render buckets starting at the top of the image

  • bottom - Render buckets starting at the bottom of the image

  • left - Render buckets starting at the left side of the image

  • right - Render buckets starting at the right side of the image

--image-mode ‹mode

--progressive-passes ‹count

--disable-lighting

Do not render any lighting (deprecated in favor of --disable-scene-lights).

--ao-samples ‹samples

Ambient occlusion samples (headlight shading). Default is 0.

--ao-distance ‹n

Ambient occlusion distance cutoff. Default is 1.

--lock-random ‹seed

Use ‹seed› as the random number seed instead of the frame number.

--dicingcamera ‹prim_path

Dice using the camera at the given prim path. If this is not specified, Karma uses the render camera for dicing.

--optimize-offline ‹level

This option is currently disabled and has no effect.

--convergence-mode ‹mode

Specify the default convergence mode for Karma CPU if not provided by a render settings primitive. Values are:

  • pathtraced - Maximum of 1 indirect ray per bounce

  • distributed (deprecated) - per-component sampling

  • variance - Number of indirect rays is calculated based on noise estimates

--autoheadlight

If this option is given, and no lights exist in the scene, Karma will add a headlight for rendering.

--baking-info

Instead of rendering an image, print information about baking (list of UDIM tiles or the number of images required for ptex texture generation).

USD

--usd-input ‹filepath

The USD scene file to render.

--resolver-context ‹arg

The file used to initialize the asset resolver context for processing the stage.

--resolver-context-string ‹arg

A string used to initialize the asset resolver context for processing the stage. The option argument should be of the form 'url=string' to configure the resolver responsible for a specific URL prefix, or 'string' to configure the default resolver.

--variant-fallback ‹arg

A default variant selection to use for primitives with a variant set but no explicit variant selection for that set. The option argument should be of the form 'set=value1,value2'.

--list-settings

Prints information about the render settings primitives in the scene.

--list-cameras

Prints information about the cameras in the scene.

--list-renderers

Prints list of all Hydra render delegates available.

--headlight ‹style

When there are no lights found on the stage, husk will add a headlight by calling husd/huskheadlight.py. Possible values are

The default value for this option is specified by the HOUDINI_HUSK_DEFAULT_HEADLIGHT environment variable.

--purpose ‹tokens

Which purpose(s) to render. This can be a comma separated list of purpose tokens. The default is geometry,render.

--complexity ‹token

The geometry complexity to render at. Options are low, medium, high, and veryhigh, or a number between 0 and 8.

--mask ‹arg

Limit stage population to these prims, their descendants and ancestors. To specify multiple paths, use either commas or spaces.

--disable-scene-materials

Disable all materials in the scene. This option applies to all render delegates.

--disable-scene-lights

Disable all lights in the scene. This option applies to all render delegates.

--disable-motionblur

Overrides the disableMotionBlur render setting, forcing the shutter close time to be equal to the shutter open time. This effectively disables motion blur.

--disable-delegate-products

Most render products have raster files as output. Render delegate products are used to represent non-raster products (deep images, checkpoint files, photon maps etc.). This option will disable delegate render products and only generate raster output.

--disable-dummy-raster-product

When there are no raster products detected, husk will normally create a “dummy” raster product. This may happen when all products are something other than “raster” products. This dummy raster is largely ignored by husk (setting the product name to husk:null_raster), though some delegates may throw errors without any raster products. This option prevents the creation of the dummy raster product if needed for this special case.

-s/--settings ‹prim_path

Render using the RenderSettings at the given primitive path.

--prerender-script ‹python_file

Run the given Python script prior to rendering. You can use the stage variable in the script to reference the USD stage being rendered. This script runs after the USD file is loaded, but before reading the settings primitive or rendering. The python_file argument is parsed into multiple arguments. Care should be taken to properly quote arguments that contain spaces. The hou.frame() function will return the first frame to be rendered. If you need access to the command line, it’s available in the husk_command variable.

Before the render process starts, (i.e. the prerender stage), husk analyzes the render settings primitive and partitions the render products. For example, it’s possible that a single render settings primitive renders two render products that use different cameras. Since the delegate can only render a single camera at a time, husk splits this single render into two separate render tasks (one for each render product). This partitioning is done after the prerender-script.

In contrast to prerender-script, the preframe-script is called before each frame is rendered. However, if the preframe-script tries to change the render camera on a render product, this is impossible since husk has already split the render tasks by the time frames start rendering. Imagine the preframe-script only changed the camera on the second frame in a sequence.

--preframe-script ‹python_file

Run the given Python script prior to each frame being rendered. You can use the stage variable in the script to reference the USD stage being rendered. The settings variable contains a dictionary of render settings. This script runs after the USD file is loaded, but before reading the settings primitive or rendering. The python_file argument is parsed into multiple arguments. Care should be taken to properly quote arguments that contain spaces. The hou.frame() function will return the frame being rendered. The husk command line is accessible using the husk_command variable.

--postframe-script ‹python_file

Run the given Python script after each frame is rendered. The stage, husk_command and settings variables are available and hou.frame() returns the frame that was just rendered.

--postrender-script ‹python_file

Run the given Python script after all frames are rendered. The stage variable is available and hou.frame() returns the last frame rendered.

--allowed-procedurals ‹arg

Control which procedurals should be allowed to contribute to the final USD stage. Valid options are

none: no procedurals basic: graph procedurals that only generate curves and points all: all procedurals (may require Houdini Engine license)

Default is basic.

--capture-procedurals

Save the result of any expanded procedurals

--procedurals-capture-directory ‹path

Directory to store expanded procedurals. Default is $HOUDINI_TEMP_DIR.

--usd-trace ‹method

Enable USD function tracing. The method determines the reporting method: report – Print the time and sample counts for each function.

timing – Print the time spent in each function.

chrome – Generate JSON output suitable for viewing in the Chrome tracing format. This option requires the --usd-chrome-file option to specify the log file output.

Note that enabling this option may have a significant impact on performance.

--usd-chrome-file ‹filename

This option both enables USD function tracing (it implies --usd-trace chrome) and also specifies the filename where the JSON tracing information will be saved.

RenderSettings overrides

Specifying these on the command line overrides any render settings in the USD file.

-c/--camera ‹prim_path

The primitive path of the camera to render from.

-o/--output ‹file_path

Output image file path. This can contain certain local variables:

$F

Current frame number.

$F‹N

Current frame number with fixed number of digits, specified by a digit after the F. For example, $F4 expands to the current frame number as four digits (for example, 0001).

$FF

Floating point frame. This may be different from $F for expressions that are evaluated between frames (motion blur, simulations).

$N

The “ordinal” number of the frame currently being rendered (for example, for the first frame rendered, $N will always be 1, for the second frame rendered, $N will always be 2, and so on, even if, given the frame range, the first frame is frame 40).

<F>, <FF>, <F4>

Same as $F, $FF, $F4.

%d, %g, %04d

Same as $F, $FF, $F4.

A comma separated list of filenames can be used to override images when there are multiple render products.

-r/--res ‹width› ‹height

Rendered image width and height, in pixels (e.g. --res 1280 720)

-S/--res-scale ‹percent

Scale the output image by the given percentage. For example, --res-scale 25 renders the image at 1/4 size, and --res-scale 250 scales the image 2.5× larger.

--pixel-aspect ‹float

Pixel aspect ratio (pixel width as fraction of pixel height). Default is 1 (square pixels).

--make-output-path

Create any parent directories of the output image if they doesn’t already exist.

-f/--frame ‹n

Start frame number. Default is 1.

-n/--frame-count ‹n

Number of frames to render, including the start frame. Default is 1.

-i/--frame-inc ‹n

Frame increment. Default is 1.

--fps ‹n

Override the frames-per-second defined on the stage. This value is passed to render delegates as the houdini:fps render setting and can optionally be used when computing velocity motion blur.

--frame-list ‹frames

Specify a space-separated list of frames to render. This option overrides the other frame options (-n/--frame, -n/--frame-count and -i/--frame-inc). Parsing of this option relies on some heuristics and assumptions. It’s, for example, not possible to define negative frames, because they start with a hyphen (-). This character can be misinterpreted as a command.

Rendering

-R/--renderer ‹token

Render using an alternate Hydra client.

--delegate-options ‹string

A list of options that are specific to the render delegate chosen.

-j/--threads ‹n

Number of threads. 0 means use all processors. -1 uses all processors except one.

--fast-exit ‹0|1

Setting this to 0 does a full tear-down of the USD scene and Hydra interface.

--restart-delegaten

Normally, husk uses USD delta operations to make multiple frame rendering more efficient. The delegate is only told about scene data that changes frame-to-frame so it can share work between frames. Using this option will cause the render delegate to be restarted every n frames. For example specifying 1 will cause the render delegate to be restarted every frame. Specifying 3 will use USD deltas for 3 frames, then restart the delegate before rendering the 4th frame. A value of 0 (the default) will never restart the delegate. Since restarting the delegate will cause the scene to be rebuilt, using this option can have significant performance impact and should only be used if truly required.

--snapshot ‹sec

Save a snapshot of the current state of the rendered image every ‹sec› seconds. -1 means no snapshots. Default is -1.

--snapshot-path ‹path

Overrides the path where the snapshot image should be saved.

--snapshot-suffix ‹suffix

Specifies the suffix that’s added to the image filename when saving snapshot images. This defaults to _part. Setting it to an empty string will cause husk to use the final output image name as the snapshot image.

--snapshot-save-mode ‹mode

Normally, snapshots are used to show rendering progress and are deleted when the render completes. This option allows you to control this behavior. The possible values are: off

Delete snapshot partial images when image is finished rendering.

number

Save each snapshot as a numbered sequence of files. This allows you to see the progression of snapshots over the render.

--slap-comp ‹slapcomp

Apex COP network to run on the image. This option can occur multiple times and each operation is run in sequence. The slapcomp string specifies a path to the Apex graph, but can also have encoded options. Options are encoded using: path_to_graph?option=value&option2=value2.

Possible options are: name

Provide an identifier for this slap-comp operation

mapinput

Maps an AOV (RenderVar) name to the corresponding Apex graph input name. This option may be specified multiple times.

mapoutput

Maps an AOV (RenderVar) name to the corresponding Apex graph output name. This option may be specified multiple times.

For example, if there’s an AOV “C” being rendered, but the Apex Graph has an input “Cin” and an output “Cout”, the argument might look like: --slap-comp path_to_cop.geo?mapinput=Cin:C&mapoutput=Cout=C.

--exrmode ‹mode

-1

Use HOUDINI_OIIO_EXR variable.

0

Use classic driver.

1

Use improved driver.

--ocio ‹arg

Use OCIO to transform color when saving images. The values are 1 or 0. When using OCIO, the file rules and RenderVar properties will be used to determine the color space. When OCIO is disabled, this will fallback to Houdini’s intrinsic assumptions about image format color spaces.

--autocrop ‹pattern

Some image formats (OpenEXR) support a data window which only stores pixel data for a part of the overall size of the image. This option lets you automatically trim the data window to only the rectangle in which an AOV (or any of a list of AOVs) has non-zero values.

For example, husk --autocrop C,A will trim to the smallest rectangle containing any non-zero pixels in either the C (color) or A (alpha) AOVs. The default is an empty string, meaning do not autocrop.

You can specify * to mean all AOVs. On the Mac and Linux command line you will probably need to quote the asterisk to prevent the shell from expanding it: husk --autocrop "*".

Note that any pixel data outside the data window is not saved to the image (The data window is an actual cropping of the data, not a display setting).

Because this option only works with “zero” vs “non-zero”, it isn’t useful for values where “clear” is not represented by 0. For example, trimming by color only works with a black background. As another example, it might be useful to crop out “farthest” Z-depth values, but those values are set to the far clipping plane depth, not 0.

This is similar to running iautocrop on the image as a post process.

--mplay-monitor ‹aovs

Automatically start up an mplay monitor of this render. The monitor can be used to observe progress as the image is rendered. The ‹aovs› specifies a comma separated list of AOVs to be displayed in mplay. For example --mplay-monitor C will only display the color plane (even if the image being written to disk has multiple AOVs). The option --mplay-monitor C,N,diffuse will send the C, N and diffuse planes to mplay for inspection. The selected AOVs must be present in the image being saved to disk to be displayed in the monitor.

If a single hyphen is given for the ‹aovs› (e.g. --mplay-monitor -), then all AOVs will be send to the monitor.

Warning: Closing the monitor will terminate the render.

--mplay-scale ‹scale

Specify an scale for any renders to mplay. This includes the monitor or any mplay render products. The value for the ‹scale› argument is currently limited to 10 to 100 percent of the image being rendered to disk. The mplay image will be point-filtered, meaning there will be no blurring of the source pixels. The default is 100.

--no-mplay

Disable any rendering to mplay. This option is useful when rendering on headless machines (on a farm).

--mplay-update ‹seconds

The number of seconds between updates of the mplay image.

--mplay-session ‹label

Send mplay renderings to the session specified by the ‹label›.

--mplay-bgimage ‹image

Specify an image to display in the background of mplay.

--mplay-remotehost ‹hostname:port

Specify a remote host and socket port to connect to for the mplay monitor.

--mplay-gamma ‹gamma

If the ‹gamma› value is greater than 0, set the display gamma in mplay.

--mplay-lut ‹lut

Specify a display LUT for mplay.

--tile-count ‹xcount› ‹ycount

Husk can render a large image in multiple tiles. This option specifies the number of tiles in the x and y directions. It should be used in conjunction with the --tile-index option.

--tile-index ‹index

When rendering a single image in tiles, this option specifies the index of the tile to be rendered. The index starts at 0. The number of tiles is determined by the --tile-count option.

--tile-suffix ‹suffix

When rendering a single image in tiles, this option specifies a suffix added to the image filename, expanded using the --tile-index. This option uses the same rules as the -o option (for example _tile%02d). In expansion of the tile index, the F variable represents the tile index, while the N variable is the one-based tile index (starting at 1 instead of 0).

--timelimit ‹sec

Cancel the render if it takes more than ‹sec› seconds. The default -1 is no time limit.

--timelimit-image

--timelimit-nosave-partial

If the render hits the time limit, don’t save a partial image.

--stdout ‹filename

Send standard output to the given file.

On Windows, you can use consolewait or consolenowait instead of a file name. consolewait opens a console window for the output, and you must close the window before the next frame will render. It lets you read fast-moving output but requires you to babysit the window. consolenowait opens a console window and closes it as soon as the frame is done. For slow renders you might still be able to read the output, and it doesn’t require you to click to close the window at every frame.

--stderr ‹filename:

Send standard error to the given file. This file may be the same as the file specified by --stdout.

--append-stdout ‹filename

Send standard output to the given file, appending to the file rather than replacing.

--append-stderr ‹filename

Send stander error to the given file, appending to the file rather than replacing.

--windows-console ‹mode

On windows, this option will override the redirection options and open a console to display output. The mode should either be wait or nowait.

-V/--verbose ‹level

Print more or less information while rendering. Default is 2.

0-9

Verbosity of rendering statistics. Note that verbose levels of 8 and greater may affect rendering performance and should only be used for debugging problem scenes.

p

Enable VEX profiling (impacts performance)

P

Enable VEX profiling and NAN checks (severe impact on performance)

a/A

Turn on/off Alfred style progress

e/E

Turn on/off message elapsed time

t/T

Turn on/off message time stamps

--verbose-callback ‹script

Each render delegate can specify a Python script used for verbose feedback in the UsdRenderers.json file. This option allows you to override that script on the command line.

--verbose-callback-interval ‹seconds

Each render delegate specifies the frequency the verbose callback Python script is invoked. This option allows you to override that interval on the command line.

Licensing

These options are only available when using the new licensing system. For more details on the new system see this page.

--check-licenses ‹license(s)

The licenses that should be enabled when checking for a license for husk. The internal name for the license should be used. Add a , between each license listed.

--skip-licenses ‹licene(s)

The licenses that should be disabled when checking for a license for husk. The internal name for the license should be used. Add a , between each license listed.

--list-license-checks

List the licenses that are available to be checked by husk and the licenses that will be checked by husk.

--skip-license-modes ‹mode(s)

The license modes that should be skipped when checking for a license for husk. Add , between each mode listed.

--check-license-modes ‹mode(s)

The license modes that should be included when checking for a license for husk. Add , between each mode listed.

--license-release-delay

Use this option to add a delay to when hserver will release the license once the application is no longer using the license.

--license-max-seat-hold

Use this option to specify the maximum time this application should hold a license seat for. A new license seat is retrieved when the max seat hold occurs. This is a handy option when you want to ensure artists don’t use a given license for longer then they should.

--apprentice

Force an apprentice session.

--indie

Force an indie session.

--core

Force an core session.

--allow-license-retries

Allow the app to continue retrying for a license using an exponential backoff. The app will wait indefinitely for a license and therefore can significantly increase the load on the license server. Use very carefully.

Stand-alone utilities

  • abcconvert

    Convert between Alembic formats.

  • abcecho

    Print information about an Alembic file.

  • abcinfo

    Print information about an Alembic file.

  • chchan

    Copies channel collection to/from action channel format.

  • chcp

    Copies channel collection file to another format.

  • chinfo

    Prints information about a channel collection file.

  • claudio

    Copies CHOP data (clip) to/from audio formats.

  • clchan

    Copies CHOP data (clip) to/from action channel format.

  • clchn

    Copies CHOP data (clip) to/from channel collection format.

  • clcp

    Copies CHOP data (clip) to another format.

  • clinfo

    Prints information about a CHOP data (clip) file.

  • dsmconvert

  • dsmmerge

  • dsparse

    Parses and displays dialog scripts.

  • gabc

    Convert between Alembic and Houdini geometry.

  • gconvert

    Convert between Houdini polygon formats.

  • gdxf

    Converts DXF polygons to/from Houdini format.

  • geodiff

    Display Geometry Differences.

  • geps

    Converts EPS files to Houdini polygon format.

  • giges

  • ginfo

    Prints polygon file statistics.

  • glightwave

    Converts LightWave files to/from Houdini format.

  • gpdb

    Converts .pdb files to/from Houdini format.

  • gplay

    Geometry viewer.

  • gply

    Converts .ply files to/from Houdini format.

  • gptex

    Makes a ptexture image file from a geometry file.

  • greduce

    Reduces polygons in a file.

  • gwavefront

    Converts .obj files to/from Houdini format.

  • hcollapse

    Collapses a directory structure.

  • hcpio

  • hexpand

    Expands hip files into a directory structure.

  • hkey / License Administrator

    Opens a graphical user interface for viewing and managing licenses and license server options.

  • hoiiotool

    Swiss-army knife of image operation tools.

  • hotl utility

    Command line utility to work with .hda/.otl files.

  • hrender

  • hsc

  • hscript

    Command line HScript interpreter.

  • hserver

    Houdini communicates through this proxy server to the sesinetd licensing daemon.

  • htexcache

    Query or modify the disk texture cache.

  • husk

    Command line utility for rendering a USD file using Karma or some other Hydra client.

  • i3dconvert

  • iautocrop

    Crops images based on pixel values.

  • icineon

    Convert images from 10-bit Cineon format to an 8 bit format.

  • icomposite

  • iconvert

    Converts an image of one type to another type.

  • icp

    Isolate a region of an image in a new image.

  • idenoise

    Removes noise from an image file.

  • idiff

    Display Image Differences.

  • iflip - Flip Image

  • iinfo

    Outputs information about an image.

  • ilut

    Generates a lookup table (LUT) from standard channel formats or another LUT.

  • ilutcomp

    Generates a single lookup table (LUT) from from two LUTs.

  • ilutinfo

    Prints information about a lookup table (LUT) file.

  • imaketx

    Creates mipmapped .exr or .rat textures from image files.

  • imdisplay

    Sends an image to an mdisplay window.

  • iprint

    Prints the RGBA values for an image as text.

  • iquantize

    Reduces the number of colors in an image.

  • isixpack

    Generates an environment/reflection map from six images representing the six sides of a cube, or a cross image.

  • itilestitch

    Assemble a series of image files with crop windows into a single image.

  • izg

    Converts Z-depth images to 8-bit grayscale images.

  • Launcher

    The Houdini Launcher downloads, installs, upgrades, and uninstall Houdini and its components.

  • mcacclaim

    Converts an Acclaim motion file to a Houdini script and channel file(s).

  • mcbiovision

    Converts a BioVision motion file to a Houdini script and channel file(s).

  • mcmotanal

    Converts a Motion Analysis TRC motion file to a Houdini script and channel file(s).

  • mcp

    Convert an image sequence to a movie file.

  • minfo

    Prints information about movie files.

  • mqserver

    Message Queue Server for PDG/TOPs

  • py23convert

    Convert Python 2 expressions in HDAs to Python 2/3.

  • renderstatsoverlay

    Generates a (possibly scaled down) version of a rendered image with render statistics baked in.

  • renderstatsreport

    Generates an HTML page containing render statistics from an EXR image.

  • sesictrl

    Sets Houdini license server options from the command line.

  • sesinetd

    The Houdini license server. This program runs in the background managing Houdini licenses.

  • siminfo

    Prints simulation cache file statistics.

  • spiff

    Display Text Differences.

  • spy

    Shell utility for navigating the UNIX filesystem.

  • usdview

    Command line utility for viewing and inspecting USD scenes.

  • vexcache

    Query or modify the VEX compile cache.

  • vexexec

    Execute a cvex shader.