Deborah R. Fowler
Command Line Rendering in Houdini with Karma
Posted on Aug 21 2018Updated June 24 2024 and Oct 4 2024 video
In Windows
also on https://youtu.be/jmOyAcHTFC0
Easiest way to get a terminal window with the Houdini environment set up is to use the Houdini Launcher and under Launch select Command Line Tools
(This is just a shortcut to the hcmd command in the bin)
The method we will use differs from the one used for Redshift and Mantra. We were able to use the hipnc directly. Now with command line you will be using a usd file. For those of you familiar with other rendering engines, this would be similar to Renderman: prman file.rib or Arnold: kick file.ass or for that matter if we had written ifd files with Mantra. One of the reasons for moving to Karma was to use USD file format.
USD - no, not US dollar, but "Universal Scene Description" developed by Pixar. For more on USD see my section on Houdini and USD
USD is a toolset for reading, writing, editing and previewing 3D data. It is "stackable" in non-destructive layers (think Photoshop).
Hydra is an API for generating an image from a USD scene. USD consists of C++ libraries with Python bindings for scripting.
Using karma in a lop network (either solaris or in sop/lopnet1) tab and select karma. You will see the karma rendersettingsnode and a usdrender_rop1. The usdrender_rop will render from gui. What you need is a usd_rop to write your usd file. In addition, your geo must be written out to avoid specific path references.
Example files here (these files have been tested on the renderfarm as well for 19.5.640 - once the image is in place and the version of 20 is determined those will be tested as well. Both versions have been tested locally on my desktop).
- command line rendering works on your usd scene file. With the above example file do the following:
- run Command Line Tools and cd to the directory where your
usd file is located
- husk scene.usd (in Houdini Indie, if on apprentice it will tag it with usdnc)
- (husk or husk.exe -f 3 scene.usd would render frame 3 for
example)
- this command will produce your render in exr format - in the
example file I have set it to not go to a folder since karma
will not automatically create a render folder and that folder
would have an absolute path which we want to avoid
In the example files I also included a usda file to look at to
aid understanding.
- if you are using a usd file (will not work on usdnc files) you can examine the ascii version of your file by converting it using usdcat file.usd --out file.usda
In Linux
In linux, the instructions are the same, however the
regular terminal window is already ready for you.