Updating texture paths with the string_replace operator

Arnold 6.0.2 includes a new string_replace that lets you do find and replace on string parameters.

For example, I got an ass procedural file from a user, but I didn’t get the textures. Normally I would just enable ignore textures, but this time I used string_replace to replace all textures with my trusty-old-Softimage noicon pic.

string_replace operator in MtoA (Maya)
  • Selection selects all Arnold image nodes. So this string replace operation applies to all string parameters of the image node (which includes name, uvset, color_space as well as filename).
  • Match is a regular expression that matches anything that looks like C:/project/sourceimages/example.tx or X:/temp/test/example.tx
    • [A-Z] matches any drive letter from A to Z
    • .* matches any string of characters
    • Note that match is a regular expression, so you cannot use glob wildcards like this: C:\sourceimages\*.tx (because * is not any string of characters, it is zero or more occurrences of the previous character)
    • \.tx matches a period followed by “tx”. The period has to be escaped with a backslash because ‘.’ matches any single character
    • Note that this match expression won’t handle something like example.txtra.tx
  • Replace is the string that replaces anything matched by the Match expression.

How to use wireframe shader for alpha

You can use the wireframe shader to drive the opacity of a standard_surface.

The wireframe shader itself doesn’t support opacity, and neither do the flat, utility, and ambient_occlusion shaders. They are all color shaders (RGB). In Arnold, only shaders that return closures can support opacity.

In the more general case, where the opacity isn’t coming from the same shader, you can use the emission for the color:

Couldn’t register Arnold renderer in Maya PIT file (error while parsing .pit file)

For Arnold itself, you can ignore that message. Unless you have an Arnold license.

Couldn't register Arnold renderer in Maya PIT file (error while parsing
.pit file). Please contact support@solidangle.com.

For Maya, that message is a symptom of a problem with your Maya install: the Maya installation is not creating all the required files on your system.

If you finish the install (you can install without MtoA if you want), and then try to start Maya and nothing happens, then the ProductInformation.pit file is missing or corrupt.

The Maya install should create this file:


If there is any problem with that file, Maya (and any other Autodesk software) will not start.
Arnold will still render, but it won’t be able to use any Arnold license.

If that file does exist on your system, delete it.
Then remove all Autodesk software, and install Maya again (without MtoA)

You can install MtoA later (go to arnoldrenderer.com/arnold/download to get the latest MtoA).

If you still have problems with the Maya installation, log on to your Autodesk account to contact the Autodesk support team, or go to the Install and Licensing Autodesk forum at https://forums.autodesk.com/t5/installation-licensing/bd-p/24

The case of Maya and the missing ProductInformation.pit file

One of the strange thing about supporting Arnold at Autodesk is that you have to be a guru-level licensing expert on Autodesk licensing (not RLM, but Autodesk licensing).

In this case, Maya 2019 would silently fail at startup. Sometimes you’d see the splash screen, but then that would just disappear.

  • There was nothing in the Adlm.log
  • No MayaAdlm log was created
  • The MayaCLM log had only this:
    ERROR: checkoutLicense: Failed to authorize license
  • The clm log did have this:
    JsProductLicenseFact.loadSelectedProductInfoKey - Unable to get selected product key due to unknown problem.

TIP All these log files are in the Temp folder.

  • On Windows, look in %LOCALAPPDATA%\Autodesk\Logs
  • On OSX, look in $TMPDIR
  • On Linux, look in /var/tmp

Process Monitor confirmed that the ProductInformation.pit file was missing:

ProductInformation.pit is an all-important file used by the licensing infrastructure. Every Autodesk product must be registered in that pit file.

If ProductInformation.pit is missing, or corrupted, then everything stops working.

[macOS] Rendering xgen procedurals in another app

Or: how to fix the node xgen_procedural” is not installed problem.

For example, suppose you want to render XGen hair in CINEMA 4D on macOS.

  • From MtoA, export your XGen hair to an ass file.
  • Set DYLD_LIBRARY_PATH before you start your application (for example, open a Terminal, set DYLD_LIBRARY_PATH there, and start CINEMA 4D the command line)
    export DYLD_LIBRARY_PATH=/Applications/Autodesk/maya2018/plug-ins/xgen/lib:/Applications/Autodesk/maya2018/Maya.app/Contents/MacOS
  • Load the ass file into CINEMA 4D with an Arnold Procedural.
  • Set the Plugin Search Path to the MtoA procedurals folder

ShadingGroup has no surfaceShader input

If you see this warning when you render

Warning: [mtoa] [translator polymesh] ShadingGroup exampleSG has no surfaceShader input

it’s because a shadingEngine node either has nothing connected to the surfaceShader port, or (more likely) it has an unknown node plugged into surfaceShader.

For example, if you load a scene that was set up with a different renderer, and that renderer is not loaded, then you’ll get some “ShadingGroup has no surfaceShader input” warnings.

ERROR | [aov] more than one output statement was associated with single layer driver: defaultArnoldDriver@driver_png.RGBA

This error means that you are trying to render multiple AOVs into a single file, and the file format (PNG in this example) does not support that.

JPEG, PNG, and TIFF cannot have multiple AOVs in a single file. The AOVs have to be rendered in separate files.

If you get this error, check the Common tab. If you don’t see the <RenderPass> token, then you’re going to get the “more than one output statement was associated with single layer driver” error.

For JPEG, PNG, and TIFF, you need the <RenderPass> token:

Normally, MtoA will automatically add the <RenderPass> token for you. But sometimes Merge AOVs gets enabled for EXRs, and then the Image format is changed to another format, like PNG.

So just switch back to EXR and disable Merge AOVs. Then switch back to the other image format.