[OSX] Getting Arnold logs for batch renders


You can get individual log files for each frame:

  1. In the Arnold Render Settings, go to the Diagnostics tab.
  2. In the Verbosity Level list, click Warnings + Info.
  3. Click the File check box.
  4. Click the folder icon and choose a folder for the Arnold log files.

mtoa_render_settings_log

Or you can check the MayaRender log, which will be one log file, with the log messages for every frame.

On OSX, open the Console and look for ~/Library/Logs/Maya/mayaRender.log
mayaRenderlog

kicking a cputime heat map


cputime-heatmap.png

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 [ and ] keys.

To get the cputime heat map, you have to run kick interactive (eg with the -ipr flag):

kick -ipr example.ass

How to check what mip levels are used


You can use the Arnold log to check what mip levels are used. In the Image file statistics, there’ll be a MIP-COUNT for every texture

00:00:02 124MB | Image file statistics:
00:00:02 124MB |       opens tiles MB read --redundant-- I/O time res             File
00:00:02 124MB |     1   1   538   12.6                  2.2s     8192x8192x3.f16 debug.tx MIP-COUNT[0,13,314,147,40,15,4,1,1,1,1,0,0,1]
00:00:02 124MB |

For example, with my debug texture, I see

MIP-COUNT[0,13,314,147,40,15,4,1,1,1,1,0,0,1]

in the Arnold log for this render:

 

[mtoa] The case of the layeredTexture and Arnold 5 closures


In this case, the question was “why doesn’t layeredTexture work in Arnold 5?”

layeredTexture

This is a common question/problem with Arnold 5: shaders plugged into color slots.

In Arnold 5, shaders like Standard Surface (and Lambert too) don’t return colors. So in general, you can’t plug them into color parameters. And Blinns are translated into Standard Shaders by MtoA, so you can’t plug a Blinn into a color either.

Instead of a layeredTexture, you can use a layeredShader. It knows how to handle shaders that don’t return colors. Or you could use the Arnold aiMix shader.

layeredShader

So, if these shaders don’t return colors, what do they return?

Closures. They return closures.

closure is not a color, it’s a bundle of data that tells Arnold how the surface (or volume) scatters light. Arnold takes care of all the ray tracing and light sampling, and then uses the closure to figure out the surface color.

 

From Master Zap:

“The addition of “closures” is a complete godsend. This relegates the work of rendering to the renderer, as it should be. No longer are material shaders little dumb raytracers that count lights and shoot reflection rays. A material shader returns mix of BxDF closures, and the renderer itself takes care of doing “the right thing” with them”.

From the Arnold 5 release notes:

Closures: a new closure parameter type has been added, which shaders can output instead of final colors. There are BSDF, BSSRDF, emission, matte, transparency and volume closures. See the API documentation and examples for more details on how to use these. Linking a color to a closure parameter will automatically create an emission closure with that color. A closure parameter however can’t be linked or converted to a color, as the integrator only computes lighting after shader evaluation.

 

[mtoa] Running a silent install


On Windows, run the MtoA installer with the flags /S /FORCE_UNINSTALL=1

MtoA-2.0.2.2-2018.exe /S /FORCE_UNINSTALL=1

You can use /D to specify a different install location.

On Linux, use the – – silent command line flags. Note the space between “- -” and “silent”.

sudo sh MtoA-2.0.1.1-linux-2017.run -- silent

The Linux installer will put MtoA in /opt/solidangle/mtoa/<maya version>. If you want to install in a different location, you can extract MtoA, and then set up your own script for installing MtoA.

On OSX, use the installer command:

sudo installer -pkg "MtoA-2.0.2.4-darwin-2017.pgk" -target /

Note that -target is a volume, not a folder.

WARNING | unable to load dynamic library .\ai_renderview.dll: The specified module could not be found.


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:

cd C:\solidangle\mtoadeploy\2017\bin
kick -nodes

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.

 

[MtoA] Getting the MtoA build ID


When you contact support or log bugs, it’s nice to provide the version number and build ID of the MtoA version that you’re using.

This information is displayed in the Arnold > About box.

mtoa_buildid

But the build id (circled in the screenshot) is kinda a pain to type out. Fortunately, you can get the build ID with the arnoldPlugins command:

arnoldPlugins -gbi;
// Result: 261bd4ca (master) //

You can get both the MtoA version and the MtoA build ID like this:

print( "MtoA " + `pluginInfo -v -q "mtoa.mll"` + " - " + `arnoldPlugins -gbi`);

In Python:

print( "MtoA {} - {}".format( cmds.pluginInfo( 'mtoa', query=True, version=True), cmds.arnoldPlugins(getBuildID=True) ) )
# MtoA 1.4.2.2 - 261bd4ca (master)