error: (44) Product key not found


If you get this error, it means that Arnold is not registered in the Autodesk product information file.

With Arnold 5.3 and later, you use the AdskLicensingInstHelper tool (all Autodesk software now uses AdskLicensingInstHelper). The pitreg utility was removed in Arnold 5.3

Note AdskLicensingInstHelper requires that the Autodesk Licensing Service is installed and running on the machine.

For example:

sudo /opt/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk C0PL1 --pv 2020.0.0.F --lm NETWORK -cf /opt/Autodesk/arnold/maya2019-4.2.0/license/ArnoldConfig.pit

or

"C:\Program Files (x86)\Common Files\Autodesk Shared\AdskLicensing\Current\helper\AdskLicensingInstHelper.exe" register --pk C0PN1 --pv 2022.0.0.F --lm NETWORK --cf "C:\Program Files\Autodesk\Arnold\maya2022-5.0.0.2\license\ArnoldConfig.pit"

In addition to registering Arnold in the global ProductInformation.pit file used by all Autodesk products, AdskLicensingInstHelper also registers Arnold with the Autodesk licensing service (that’s for single-user licensing).

The ProductInformation.pit file is located here:

  • /var/opt/Autodesk/Adlm/.config/ProductInformation.pit
  • C:\ProgramData\Autodesk\Adlm\ProductInformation.pit
  • /Library/Application Support/Autodesk/Adlm/.config/ProductInformation.pit

Here’s the help for the register command:

C:\Users\blairs>"C:\Program Files (x86)\Common Files\Autodesk Shared\AdskLicensing\Current\helper\AdskLicensingInstHelper.exe" -help register
NAME:
   AdskLicensingInstHelper - Manage products registration with Autodesk Licensing

USAGE:
   AdskLicensingInstHelper.exe [global options] command [command options] [arguments...]

VERSION:
   2.11.0.666

COMMANDS:
     register    Register product with the licensing components. Requires admin rights
     deregister  Deregister product from the licensing components. Requires admin rights
     list        List all products registered with licensing components
     change      Change registered product
     help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --verbose, -d  [O] Output verbose log
   --help, -h     show help
   --version, -v  print the version

[MtoA] Denoising AOVs with the Arnold Denoiser


To denoise AOVs, you need to add variance AOVs:

  1. Enable Output Denoising AOVs
  2. Add a new output driver to the AOVs, and set the filter to variance
  3. Tell noice to denoise the AOVs: enter the AOV names in the Light Group AOVs text box (or, if you’re using the command-line, add -l flags for each AOV)

When you denoise the AOVs, you’ll see something like this in the Arnold Denoiser log:

C:\Program Files\Autodesk\Arnold\maya2020\bin\noice -i C:/project/images/denoiser_test.0002.exr -o C:/project/images/denoiser_test.0002_denoised.exr -ef 0 -sr 9 -pr 3 -v 0.5 -l diffuse -l direct -l indirect -l specular 

Denoising image C:/project/images/denoiser_test.0002.exr 
------------------------ (1/1)
noice 6.2.0.1 [903992ac] - the Arnold denoiser
Using 48 threads.
Loading images...
Loading file "C:/project/images/denoiser_test.0002.exr".
Using feature AOV 'diffuse_albedo' with filter 'gaussian_filter'
Using feature AOV 'N' with filter 'gaussian_filter'
Using feature AOV 'Z' with filter 'gaussian_filter'
Working with 1 frame at 960x540
Will denoise AOV "RGBA", using associated variance
   Output file will be "C:/project/images/denoiser_test.0002_denoised.exr"
Will denoise AOV "diffuse", using associated variance
   Output file will be "C:/project/images/denoiser_test.0002_denoised.exr"
Will denoise AOV "direct", using associated variance
   Output file will be "C:/project/images/denoiser_test.0002_denoised.exr"
Will denoise AOV "indirect", using associated variance
   Output file will be "C:/project/images/denoiser_test.0002_denoised.exr"
Will denoise AOV "specular", using associated variance
   Output file will be "C:/project/images/denoiser_test.0002_denoised.exr"
Start denoising (patch radius 3, search radius 9, variance 0.5)
Denoising RGBA
Denoising diffuse
Denoising direct
Denoising indirect
Denoising specular
Finished denoising
Saving image C:/project/images/denoiser_test.0002_denoised.exr (960 x 540 x 16)

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.

[mtoa] Getting a Process Monitor log to troubleshoot problems loading mtoa


If a clean install of MtoA doesn’t work (and the computer does support SSE4.1), then “The specified module could not be found.” usually means there’s a missing dependency. Dependency Walker is a decent, if aging, tool for checking out dependencies, but for leaving no stone unturned, I prefer Process Monitor.

The MtoA plugin (mtoa.mll) depends on a handful of files only. Here’s the log of loaded DLLs for a working MtoA:

process_monitor_mtoa

Here’s a quick walkthrough (no audio) of how to get a Process Monitor log:

[mtoa] Using dirmap to update paths


How can you update the paths used to load textures, standins, or volumes? Use dirmap.

You can use dirmap to update the paths for the following nodes:

  • aiImage (Image Name)
  • aiStandin (Path)
  • aiVolume (Filename)
  • MayaFile (Image Name)

For example, if I have a scene file that uses Linux paths like /server/assets/textures/noicon.tx, I can do this:

dirmap -en true;
dirmap -m "/server/assets" "D:/Assets/";

After I run that, when I load a scene Maya will replace “/server/assets” with “D:/Assets” in all file paths.

You can test your directory mapping (dirmap) like this:

dirmap -cd "/server/assets/textures/noicon.tx";
// Result: D:/Assets/textures/noicon.tx //

So:

  • Enable dirmap with dirmap -en, and then create a directory mapping with dirmap -m
  • Load a scene and the dirmap is applied.

TIP For batch rendering, you can use a pre-render script to apply dirmap.

BONUS TIP: dirmap does not update a path if the path is valid. dirmap replaces paths that cannot be resolved.

[MAXtoA] Rendering XGen in 3ds Max


 

You can export an ASS file from Maya (with the XGen primitives) and then use an Arnold Procedural to load the ASS file into 3ds Max.

You need to add these two folders to the system environment variable Path:
  • C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\bin
  • C:\Program Files\Autodesk\Maya2018\bin

For example, you can copy this:

C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\bin;C:\Program Files\Autodesk\Maya2018\bin;

and paste it at the beginning of the current Path:

windows_sys_env_var

Restart 3ds Max after you do this.

Then add the MtoA procedurals folder to the Plugin Search Path:

maxtoa_plugin_search_path

 

[MtoA] Error: defaultArnold Driver can’t create file


You’ll get an error like this if your project path has characters like é or ü or Ô in it.

// Error: [driver_exr] defaultArnoldDriver@driver_exr.RGBA: can't create file ".exr": OpenEXR exception: Permission denied. //

// Error: [driver_jpeg] defaultArnoldDriver@driver_jpeg.RGBA: can't create file ".jpg": Unable to open file ".jpg”

// Error: [driver_png] defaultArnoldDriver@driver_png.RGBA: can't create file ".png": Could not open file ".png"

Arnold can’t create the output file, because the special characters mess up the resolution of the output path, which ends up as an empty string.

So with no path provided, the ouput driver tries to write “.jpg” in the current working directory, which is probably something like C:\Program Files\Autodesk\Maya2018.

Use plain text characters for your project folders.

 

[mtoa] Register failed for arnoldAOVChildSelector


If you see this error in the script editor

# Error: Register failed for arnoldAOVChildSelector #

that means your preferred render layer setup is Legacy Render Layers (so MtoA fails to register something that’s used for the new Render Setup).

If you’re not using Render Setup, then you can safely ignore this error.