For the render -rt 1 command, you can specify the output ASS name in
the defaultArnoldRenderOptions.output_ass_filename attribute. For example:
set PRE_RENDER_MEL="setAttr -type \"string\"
render -s 6 -e 8 -r arnold -rt 1 -preRender %PRE_RENDER_MEL%
The scene should have the Frame/Animation ext set to something like
“name.#.ext”. Otherwise, if it is “name.ext” you’ll get filenames like
output_ass_filename can have environment variables, but you have to be
careful to use forward slashes. For example:
set PRE_RENDER_MEL="setAttr -type \"string\" defaultArnoldRenderOptions.output_ass_filename \"%OUTPUT_ASS_FILENAME%\";"
render -s 6 -e 8 -r arnold -rt 1 -preRender %PRE_RENDER_MEL% C:\projects\Support\scenes\_2016\XSI_deformed_logo.mb
There’s also the arnoldExportASS command, if you want to script the export.
maya -batch -file scene.mb -command "arnoldExportAss
-f "/home/blairs/Desktop/example.ass" -mask 255 -lightLinks 1 -compressed
-shadowLinks 2 -cam sideShape;"
If you’re using the Arnold API to update ASS files (for example, to change paths), you need to load all the plugins (aka shaders) that are referenced by the ASS file. Otherwise, the unknown nodes are skipped on load, and therefore won’t be in any ASS file you write.
For example, if you set ARNOLD_PLUGIN_PATH to point to the locations of the MtoA shaders and any custom shaders you use, then you could do something like this:
from arnold import *
AiLoadPlugins( os.getenv( 'ARNOLD_PLUGIN_PATH' ) )
# Do your edits here
AiASSWrite("edited.1001.ass", AI_NODE_ALL, False)
Arnold 4.1.x has plenty of new features and improvements, and you can read about those in the release notes.
Here’s a few other little things to know about Arnold 4.1.x:
- All shaders, procedurals, and plug-ins like SItoA and MtoA need to be recompiled to work with Arnold 4.1.x.
- You need a new license to render with Arnold 4.1.x. An Arnold 400 license won’t work with Arnold 4.1.x.
- Ass files written by Arnold 4.1.x cannot be loaded by older versions of Arnold.
Cross posted here
With Arnold there are two things in an ASS file that specify the location of a texture file:
The texture filename, which can be an absolute or relative path.
The texture_searchpath in the render options. The texture_searchpath is used only if the texture filename is a relative path (for example: “sourceimages/example.tiff”.
For example, if the texture filename was a relative path, you might have something like this in an ASS file: