[Arnold] Overriding parameters of nodes created by a standin


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:

override
{
 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).
    trex
  • 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.
    trex_override

 

NOTE
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.

[MtoA] Unable to dynamically load mtoa.mll …The specified procedure could not be found.


If the MtoA plug-in  does not load and you get a “The specified procedure could not be found” error like this:

// Error: line 1: Unable to dynamically load : C:/solidangle/mtoadeploy/2016/plug-ins/mtoa.mll
The specified procedure could not be found.
 // 
// Error: line 1: The specified procedure could not be found.
 (mtoa) //

then there’s a few basic things you need to check first:

  • Does your processor support SSE4.2? As of Arnold 4.2.13.0 (MtoA 1.2.7.0), support for SSE4.2 is required. You won’t be able to load MtoA or use Arnold if your processor doesn’t support SSE4.2.
  • Do you have the right MtoA version for your version of Maya? Major versions of Maya are not binary compatible, so for Maya 2016 you need “MtoA for Maya 2016”.
    And Maya 2016 Extension 2 is not binary compatible with Maya 2016 Extension 1, so if you have Extension 2, you need “MtoA for Maya 2016.5”

If your processor is good and you have the right version of MtoA, then it’s on to basic troubleshooting:

  • Check the environment in Maya. For example, does the PATH include any older versions of MtoA? If you’re on Windows, run the MEL command system(“set”) to get the environment. On OSX or Linux, run system(“printenv”).
  • Check for missing or conflicting libraries. On Windows, you can use Dependency Walker to  check for any conflicts or missing DLLs.

    Download and extract Dependency Walker. Then start it from inside Maya (to inherit the Maya environment). For example, I do something like this:
    system( “start C:/Users/stephen/Downloads//depends22_x64/depends.exe” );

    Then load mtoa.mll.

[Arnold] Setting up the Standard shader to be energy conserving


For energy conservation with Diffuse and SSS, you must have Diffuse + SSS <= 1

With Specular, it depends on whether or not Fresnel is enabled:

  • If Fresnel is off, then you must have SSS + specular + diffuse <= 1
  • If Fresnel is on, then you must only have diffuse + SSS <= 1. The shader will mix specular with diffuse and SSS in a way that’s energy conserving.

Ok, that’s the simple case (without diffuse backlighting and refraction). Now let’s add diffuse backlighting and refraction:

For energy conservation with Diffuse and SSS, you must have Diffuse + SSS + backlighting <= 1

With Specular, it depends on whether or not Fresnel is enabled:

  • If Fresnel is off, then you must have specular + (SSS + diffuse + backlighting) <= 1
  • If Fresnel is on, then you must only have diffuse + SSS + backlighting<= 1. The specular and refraction weights can be anywhere between 0 and 1, and the shader will mix everything in a way that’s energy conserving.

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.