[kick] [ass] reading from stdin


Some customers have reported a problem using a render manager (Muster, Tractor, Deadline) to render jobs with kick, typically via a wrapper script. The problem is that kick tries to read from STDIN instead of loading the specified ASS file. In the log, you’d see this:

00:00:00     0MB         | [ass] reading from stdin ...

A workaround is to add the -nstdin flag (Ignore input from stdin) to the kick command line.

[Arnold] [MtoA] Disabling Skip License Check


watermark
If you render a scene that has Skip License Check enabled, you’ll get the Arnold watermark. One way to make sure this doesn’t happen is to turn off Skip License Check from the command line:

render -r arnold -ai:slc off some_scene.mb
kick -set options.skip_license_check off -dp -dw some.ass

You might also want to enable Abort on License Fail (-ai:alf for render, -set options.abort_on_license_fail for kick).

[kick] Combining ASS files on the command line


One way to avoid exporting the same static geometry for every frame is to export it just once, and then export the rest of the scene (the cameras, lights, and any animated objects) as a regular sequence. kick can combine multiple ASS files and then render the result. For example:

kick environment.ass lights.ass character.0001.ass camera.0001.ass -o scene.0001.exr
  • environment.ass is all the static geometry and the applied shaders.
  • camera.####.ass is the camera, driver, filter, and options.
  • character.####.ass is an animated character with its shaders.

Just for kicks: Printing out shading trees


kick -tree prints the shading network for a shader node. For example, given this:

polymesh
{
 ...
 shader "Sources.Materials.DefaultLib.Material.standard.SItoA.41000.1" 
 ...
}

standard
{
 name Sources.Materials.DefaultLib.Material.standard.SItoA.41000.1
 
}

You can print out the shader tree for the standard shader like this:

set ASS_FILE=//Projects/Support/Arnold_Scenes/example.ass
set NODE=Sources.Materials.DefaultLib.Material.standard.SItoA.41000.1
set SHADER_PATH=%SITOA_BIN%
%KICK_PATH%\kick.exe -tree %NODE%  -i %ASS_FILE% -l %SHADER_PATH%

For a [simple] shading tree that looks like this:
SimpleTree
You would get this:

standard:Sources.Materials.DefaultLib.Material.standard.SItoA.41000.1
  |
  +-Kd_color = txt2d_image_explicit:Sources.Materials.DefaultLib.Material.Image.SItoA.41000.2
  |   |
  |   +-tex = sib_image_clip:Sources.Materials.DefaultLib.Material.noIcon_pic.SItoA.41000.3
  |
  +-opacity = txt2d_image_explicit:Sources.Materials.DefaultLib.Material.Image.SItoA.41000.2
      |
      +-tex = sib_image_clip:Sources.Materials.DefaultLib.Material.noIcon_pic.SItoA.41000.3

max depth:       2
total shaders:   5
cycles detected: 0

shader counts:
  2 txt2d_image_explicit
  2 sib_image_clip
  1 standard

one-to-many connections:
  2 txt2d_image_explicit:Sources.Materials.DefaultLib.Material.Image.SItoA.41000.2
  2 sib_image_clip:Sources.Materials.DefaultLib.Material.noIcon_pic.SItoA.41000.3

Notice that txt2d_image_explicit and sib_image_clip are counted twice, because those branches are plugged into two different ports on the standard shader.

[SItoA] Doing a license check in Softimage


Setting up the environment right is what often goes wrong. Running kick -licensecheck from inside Softimage is a quick way to check that you set up the environment variables correctly.

Here’s two lines of Python that will open a command prompt and run kick -licensecheck (on Windows).

#Python
from subprocess import Popen
Popen(["cmd", "/K", XSIUtils.BuildPath( Application.Plugins('Arnold Render').OriginPath, 'kick.exe' ), "-licensecheck"])

Here’s the same thing, but broken down a bit for legibility:

#Python
si = Application

p = si.Plugins('Arnold Render')
sKick = XSIUtils.BuildPath( p.OriginPath, 'kick.exe' )

from subprocess import Popen
Popen(["cmd", "/K", sKick, "-licensecheck"])

[MtoA] Doing a license check in Maya


If you’re doing technical support like me, you gotta love things like kick -licensecheck. I wish we’d had something like this at Softimage. This license check will tell you:

  • Whether you can connect to a license server
  • What licenses are available
  • What are the licensing environment variable settings

licensecheck

In this example, I’m running Maya and the license server on the same computer. That’s why none of the environment variables are set, but the licensecheck still shows that there’s a license available. By default, Arnold will connect to 5053@localhost to get a license.

Exporting ASS files from Softimage with xsibatch


You cannot use xsibatch -export to export ASS files (because of the way sitoa implements ASS exporting). But it’s not too hard to do the same thing with SITOA_ExportScene and xsibatch -script.

This is what the xsibatch command line would look like (on Windows). For readability, I used the EXPORT_SCRIPT and SCENE variables to reduce the length of the xsibatch command line.

set EXPORT_SCRIPT = batch_export_scene.pys
set SCENE = \\server\project\scenes\elephant_herd.scn
xsibatch -processing -script %EXPORT_SCRIPT% -args -start 5 -end 20 -step 1 -scene %SCENE%

And here’s the batch export script.

I expose the basic parameters only, and I use the ASS Archive output path from the Arnold Render options, the scene name, and the [Frame] token to compose the output file name.

def main( start, end, step, scene ):
	Application.OpenScene(scene, "", "")
	x = Application.Dictionary.GetObject( "Passes.Arnold_Render_Options" )
	dir = XSIUtils.ResolveTokenString( x.output_file_tagdir_ass.Value, 0, False, None, None )

	scn = Application.ActiveProject.ActiveScene.Parameters("Name").Value	
	output = XSIUtils.BuildPath( dir, '%s.[Frame].ass' % scn )

	Application.SITOA_ExportScene( start, end, step, False, False, output )

Just for kicks: listing the available shaders


Want to know what shaders come with SItoA?

Use kick -nodes with the -l flag to get a list of all nodes. For example:

kick -nodes -l %SITOA_BINDIR%\sitoa_shaders.dll | find "shader"

where SITOA_BINDIR is just shorthand for the Application\bin\nt-x86-64 folder of your SItoA addon install. On my machine, that’s here:

C:\Users\SOLIDANGLE\Documents\Workgroups\sitoa-2.6.0-2013\Addons\SItoA\Application\bin\nt-x86-64

The output will list the builtin Arnold shaders first (such as ambient_occlusion, standard, and wireframe), and then the SItoA shaders (which start with the two BA_ shaders).

In general, you wouldn’t include a filename in the -l path. I included sitoa_shaders.dll so kick wouldn’t try to load sitoa_curves_proc.dll and then pop up a “sicppsdk.dll is missing” error because I’m not running kick in a Softimage command prompt (where all the Softimage environment variables are set for me).

So, a more general example would look like this:

kick -nodes t -l %SITOA_BINDIR%

-nodes t will sort the list of nodes by type.

Missing shaders in images rendered with kick


pink_elephant

I was tempted to title this post something like “why is my ass pink when I kick it???” 🙂

The color magenta (often reported as “pink” or even “purple” sometimes) is the color of missing shaders. If Arnold cannot find a shader, it returns the color magenta (RGB = 1, 0, 1). This is a pretty common result when people export an ASS file from Maya for the very first time. Unlike SItoA, which helpfully fills in the Shader Search Path for you, MtoA leaves the search paths empty (unless you fill them in yourself).

There’s several ways you can tell kick where to find the shaders:

  • Use the kick -l flag to specify the location of the shaders. For example:
    kick -l C:\solidangle\mtoadeploy\2013\shaders
  • Set the ARNOLD_PLUGIN_PATH environment variable to the location of the shaders.
  • In Maya, enter the shader search path in the Render Settings before you export the ass file.

I thought you might also be able to use -set options.shader_searchpath on the kick command line, but that didn’t work for me.

kick -i "elephant.ass" -set options.shader_searchpath "C:\solidangle\mtoadeploy\2013\shaders"