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:
Arnold 220.127.116.11 added support for per-light AOVs for volumetrics.
Here’s how to set up per-light AOVs in MtoA 18.104.22.168:
- In the light Attribute Editor, enter a name for the light group.
- Create a custom AOV for the light group. Give the AOV a name that starts with “volume_”. For example, if the light group name is “red”, then the AOV name is “volume_red”.