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;"
The Arnold log is important, not just for troubleshooting and getting help from us at Solid Angle, but also for understanding what’s going on when Arnold renders your scene.
To get an Arnold log:
- In Maya, click Render > Render Settings
- In the Render Using list, click Arnold Renderer
- Click the Diagnostics tab.
- Set the Verbosity level to at least Warnings + Info
- Click the File check box to enable file logging (by default, the log file will be saved in the last folder you browsed to with Maya; see Finding your log file).
- If you want to be absolutely sure of where to find the log file, click the folder icon beside the Filename box, and select a location for the Arnold log file.
- Depending on what OS you use, and how you started Maya, the log is also output to the Output Window (Windows) or to the terminal (on OSX and Linux if you started Maya from a terminal)
For batch rendering, Arnold log messages go into mayaRenderLog.
- [Windows] %USERPROFILE%\Documents\maya\mayaRenderLog.txt
- [OSX] ~/Library/Logs/Maya/mayaRender.log
- [Linux] ~/maya/mayaRenderLog.txt
If you have both Renderman and MtoA installed, you may see a warning that says “Arnold for Maya degrades Renderman performance.” Unless you are running a version of MtoA from 20 months ago, this performance warning is false. MtoA does not degrade Renderman performance.
This was fixed in Arnold 22.214.171.124 (fix #4393 main thread was pinned to a single core) back in January 2015.
MtoA 126.96.36.199 ships with Arnold 4.2.13.
If you want to take advantage of the improvements in Arnold 188.8.131.52 (like the increase in the maximum number of threads from 128 to 256), here’s what you need to do:
- Download Arnold 184.108.40.206 and extract the archive
- Replace Arnold (libai.so, ai.dll, libai.dylib), kick, and maketx in the MtoA bin folder with the versions from the Arnold 220.127.116.11 download
- Replace the Arnold Python bindings in the MtoA scripts/arnold folder with the Python bindings from the Arnold python/arnold folder. For example, replace this folder:
with the python\arnold folder from the Arnold 18.104.22.168 download. For example:
You must update the Arnold Python bindings, otherwise MtoA won’t load. That’s because Arnold 22.214.171.124 included a number of API changes, including the removal of some API (like AiLicenseSetServer). The older Python bindings still refer to the removed API, so there will be Python errors that prevent MtoA from loading.
Arnold uses the OpenImageIO texture cache. From the OIIO Programmer Documentation:
In short, if you have an application that will need to read pixels from many large image files, you can rely on ImageCache to manage all the resources for you. It is reasonable to access thousands of image files totalling hundreds of GB of pixels, efficiently and using a memory footprint on the order of 50 MB.
So, if you’re using tx files (tiled and mipmapped textures), then Arnold can read tiles as required, and use the texture cache to keep memory usage under control.
The reason we don’t read all the textures at once is that many of our customers have (literally) 100+GB of textures, so we use a texture cache that constantly loads small bits of texture data as required, and unloads old data.
By default, the size of the texture cache is 2048KB (as of Arnold 126.96.36.199). The size of the texture cache is set in the Arnold Render Settings.
Max Cache Size
The maximum amount of memory to be used for texture caching. Arnold uses a tile-based cache with a LRU (Least Recently Used) type algorithm, where the least recently used tiles are discarded when the texture caches is full.
Note If we get an error reading a texture, we mark that texture as bad and we never try to read it again. This makes the renderer a lot faster when you have a missing texture, since we won’t ask the file server millions of times to read from a nonexistent file. But in a transient network error case, one bad experience and the rest of your render has the texture missing.
If, like me, you need to switch between different versions of MtoA, here’s a recipe for setting that up.
First, you have to install multiple versions. As you probably already know, the MtoA installer always wants to uninstall first. I take care of that by zapping the Uninstall registry entry with this command:
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\MtoA2016" /f
Then I run the MtoA installer and install in a folder with the version name, like this:
I start Maya with a batch file that creates a symbolic link named “C:\solidangle\mtoadeploy\2016” that links to the version of MtoA I want to use:
mklink /D C:\solidangle\mtoadeploy\2016 C:\solidangle\mtoadeploy\2016-188.8.131.52
rem mklink /D C:\solidangle\mtoadeploy\2016 C:\solidangle\mtoadeploy\2016-184.108.40.206
start "" "C:\Program Files\Autodesk\Maya2016\bin\maya.exe" %* -log %TEMP%\maya.log
My batch file also adds the location of my custom mtoa.mod to MAYA_MODULE_PATH. My custom mtoa.mod points to “C:\solidangle\mtoadeploy\2016”, and handles all versions of Maya:
+ MAYAVERSION:2016 mtoa any C:\solidangle\mtoadeploy\2016
PATH +:= bin
+ MAYAVERSION:2015 mtoa any C:\solidangle\mtoadeploy\2015
PATH +:= bin
+ MAYAVERSION:2014 mtoa any C:\solidangle\mtoadeploy\2014
PATH +:= bin
+ MAYAVERSION:2013 mtoa any C:\solidangle\mtoadeploy\2013
PATH +:= bin
A common question is “how can I override the subdivision/displacement of the nodes in a standin?”
The standard answer is: “you can’t”. A standin is an Arnold procedural node, and you can override only the parameters supported by the procedural node, which do not include subdivision or displacement.
But…here’s how to do with the [deprecated] override back door. The override node allows you set a parameter value on a specific node. So if a standin loads an ASS file with a polymesh named “tRexShape”, then you can override tRexShape.subdiv_iterations like this:
tRexShape subdiv_iterations 2
So, in Maya, do this:
- Create a standin that loads an ASS file with the polymesh nodes (in this example, a tRexShape with subdiv_iterations=1).
- Create a second standin that loads an ASS file with the override node. Clear the Defer Standin Load check box for this second standin, and your standin will render with the override value for subdiv_iterations.
override nodes aren’t supported by the Arnold API, and there’s no guarantee that support for override nodes won’t be removed at some point in the future.