[MtoA] Renderman performance warning


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 4.2.3.1 (fix #4393 main thread was pinned to a single core) back in January 2015.

Setting the procedural’s load_at_init parameter to true would also fix this.


There’s an Arnold error that recommends setting the load_at_init parameter, but people don’t always know where to find that in their favorite Arnold plugin.

ERROR| [proc] c4d|Arnold_Procedural: bounds supplied to procedural node are not large enough to contain the actual underlying geometry.
Replace given bounds: (-1, -1, -1) X (1, 1, 1), with: (-9.4028616, -9.43616867, -9.21633244) X (9.3304739, 9.43616867, 9.21633244).
Setting the procedural's load_at_init parameter to true would also fix this.

The load_at_init parameter controls whether the procedural (standin) is loaded during scene intialization (before rendering starts), or during rendering (when a ray hits the procedural bounding box).

By default, load_at_init is false, which means that procedural loading is deferred until render time.

And so, in MtoA, C4DtoA, and SItoA, the load_at_init parameter is exposed as Defer Standin Load, which is enabled by default. In HtoA, you have a Load At Init parameter on for the Arnold Procedural node.

[C4DtoA] Installing C4DtoA in a custom location


The C4DtoA installer puts the C4DtoA plugin in the default location: the plugins folder of the Cinema 4D install.

If you want to put C4DtoA somewhere else, like a shared network location, you can use the C4D_PLUGINS_DIR environment variable to point to your custom plugin location.

For example, on Windows I moved C4DtoA to a different drive and then set my environment like this:

set C4D_PLUGINS_DIR=F:\plugins
set PATH=F:/plugins/C4DtoA/arnold/bin;%PATH%

Note that I had to set PATH so C4D could find ai.dll, and that I had to use forward slashes (on Windows, C4D doesn’t like backslashes in the PATH and drops them).

On Windows, the C4DtoA installer puts a second copy of ai.dll in the C:\Program Files\MAXON\CINEMA 4D R17, so you’ll have to remove that ai.dll, and use PATH to point to the ai.dll in the C4DtoA arnold/bin folder.

Portable ASS files with relative paths and the Texture Search Path


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.

For example

kick -set options.texture_searchpath //server/project/ -dp -dw example.ass

Or if the texture search path is set to an environment variable

export ARNOLD_TEXTURE_PATH=//server/project
./kick example.ass

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:

"[ARNOLD_TEXTURE_PATH]:C:/Assets/IES/;C:/maya/projects/Support/sourceimages"

Forward slashes work on all platforms.

MtoA appends the current project’s sourceimages folder to the texture search path.

Why can’t I use kick -set options.shader_searchpath ?


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:

  1. kick loads all plugins specified by -l or by ARNOLD_PLUGIN_PATH before it loads the ASS file
  2. 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.
  3. 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.

 

[MtoA] Per-light AOVs for volumes


 

Arnold 4.2.12.2 added support for per-light AOVs for volumetrics.

Here’s how to set up per-light AOVs in MtoA 1.2.6.0:

  1. In the light Attribute Editor, enter a name for the light group.
  2. 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”.

aov_light_group