You can use kick to render with debug shading. Here’s the flags to use:
- -is to ignore the shaders assigned to the shapes
When you ignore shaders, a default utility shader is used to render the scene.
- -sm sets the shade mode ( ndoteye lambert flat ambocc plastic metal)
- -cm sets the color mode (color ng ns n bary uv u v dpdu dpdv p prims uniformid wire polywire obj edgelength floatgrid reflectline bad_uvs nlights id bumpdiff pixelerror)
Here’s some examples that show how to kick with different types of debug shading (I’ve used the Arnold Render View debug shading modes for these examples)
|Basic: disable all shaders in the scene, switching to a gray ‘ndoteye’ shader; a very fast shading mode.
kick -is -sm notdoteye
|Lighting: renders the scene with a white lambert shader
kick -is -sm lambert
|Occlusion: use ambient occlusion shading
kick -is -sm ambocc
|Wireframe: displays geometry as a wireframe
kick -is -cm polywire
kick -is -sm ndoteye -cm polywire
|Normal: visualizes the normal vector (between 0 and 1, in tangent space)
kick -is -sm flat -cm n
|UV: displays the coordinates of the primary UV set (red=U, green=V)
kick -is -sm flat -cm uv
|Primitive ID: displays random colors based on the per-primitive (triangle, curve) index
kick -is -sm flat -cm prims
|Barycentric: displays intra-primitive parametric coordinates (barycentric for triangles, parametric length, and width for curve segments)
kick -is -sm flat -cm bary
|Object: displays random colors based on the per-object ID
kick -is -sm flat -cm obj
New in Arnold 5.0.2! You can press T to get a cputime heat map. From the Arnold release notes:
- Added cputime heatmap view to
kick: When using
kick you can now toggle between viewing kicks default output and a cputime heatmap with the
T key. The mapping of the heat map can be scaled with the
To get the cputime heat map, you have to run kick interactive (eg with the -ipr flag):
kick -ipr example.ass
kick checks the current working directory for plugins (shaders and procedurals). That means kick tries to load all .dll/.so/.dylib files in the current directory.
So if you do this:
Then you’ll get a warning like this (plus a pop-up System Error dialog that says “Qt5Core.dll is missing from your computer”).
loading plugins from .
WARNING | unable to load dynamic library .\ai_renderview.dll: The specified module could not be found.
On OSX, the warning would say ./libai_renderview.so, and on Linux, ./libai.so
Notice the “loading plugins from .” The single period, or dot, represents the current directory.
The solution? Don’t run kick in the MtoA bin folder. Don’t run kick in an any folder where there are non-plugin libraries.
Suppose you have a load of ASS files that were exported with the Tiled option disabled. How could you re-enable the Tiled option without re-exporting the ASS files?
With the kick -set flag, that’s how:
kick -set display_exr.tiled on
That will set the tiled parameter for all EXR driver nodes in the ASS file.
If you want to set the flag for a specific driver node, you need to know the driver node name.
kick -set defaultArnoldDriver@driver_exr.RGBA.tiled on
That sets tiled for the driver_exr node named defaultArnoldDriver@driver_exr.RGBA.
You can make your ASS files portable across different platforms by using relative paths and the texture search path. For example, if all textures are specified by relative paths like “textures/noicon.tx”, then you just have to set options.texture_searchpath to specify the location of the textures folder.
kick -set options.texture_searchpath //server/project/ -dp -dw example.ass
Or if the texture search path is set to an environment variable
To use relative paths for texture file names in nodes like MayaFile, aiImage, aiPhotometricLight, and aiSkydomeLight, you just need to do the following:
- Put a relative path in the file name box (for example, in Photometry File box of an aiPhotometricLight node, or the Image Name box of an aiImage node)
- Set the Texture Search Path (Render Settings > System > Search Paths)
- Clear the Absolute Texture Paths check box
You can put multiple locations, using either : or ; to separate the paths (Arnold supports both separators on all platforms: OSX, Linux, and Windows)
You can use environment variables by putting the environment variable name in square brackets. For example:
Forward slashes work on all platforms.
MtoA appends the current project’s sourceimages folder to the texture search path.
You may wonder: why can’t I use kick -set options.shader_searchpath to tell Arnold where to find shaders?
Well, it’s because kick loads the ASS file first, then applies the kick -set parameter overrides. And also, Arnold when loads an ASS file, Arnold automatically loads shaders from the shader_searchpath as soon as Arnold loads the options node.
Here’s the sequence of events:
- kick loads all plugins specified by -l or by ARNOLD_PLUGIN_PATH before it loads the ASS file
- kick loads the ASS file. When Arnold loads the options node, Arnold automatically loads all plugins specified by options.shader_searchpath.That’s why the options node is at the top of an ASS file: so Arnold can load any required shaders before loading the shader nodes. It you move the options to bottom of the ASS file, the shader nodes in the ASS file won’t be loaded.
- Finally, after all the nodes are loaded, the -set parameter overrides are applied. At this point, it’s too late for any shaders from the -set options.shader_searchpath loacation. The corresponding nodes were already discarded during the loading of the ASS file.
Any time you see “node … is not installed” and “unresolved reference” warnings when you try to kick an ASS file exported from Maya, the problem is missing MtoA shaders.
00:00:00 18MB WARNING | [ass] line 259: node "MayaFile" is not installed
00:00:00 18MB WARNING | [ass] line 288: node "MayaShadingEngine" is not installed
00:00:03 23MB WARNING | [ass] line 238: pSphereShape1.mtoa_shading_groups: unresolved reference to 'aiStandard2SG'
00:00:03 23MB WARNING | [ass] line 137: aiSkyDomeLightShape1.color: unresolved reference to 'file1'
00:00:03 23MB WARNING | [ass] line 188: pPlaneShape1.shader: unresolved reference to 'aiStandard1SG'
00:00:03 23MB WARNING | [ass] line 197: pPlaneShape1.mtoa_shading_groups: unresolved reference to 'aiStandard1SG'
00:00:03 23MB WARNING | [ass] line 229: pSphereShape1.shader: unresolved reference to 'aiStandard2SG'
When you render with kick, you need to specify the location of the MtoA shaders. You can do this several ways: