[FAQ] Can I transfer Arnold shaders to another app?


For example, can I transfer Arnold shaders from 3ds Max to Maya? Or from Houdini to Maya?

The answer is no. The Arnold plugins don’t include code for reading shader nodes from an ASS file and creating shader trees inside the host¬†application (eg Maya, Houdini, or Cinema 4D).

You can use ASS files to take shapes and shaders from one app and render them in another app, but those shapes and shaders are never created inside the other app.

An MtoA Standin (aka an Arnold Procedural in HtoA and C4DtoA) references an ASS file, and passes that on to Arnold at render time.

standins

The ASS file contains Arnold nodes (shapes and shaders). Those Arnold nodes are not created inside the 3D application.

Instead, the standin node is translated to an Arnold procedural node, and at render time, that procedural node is expanded, and all the Arnold shapes and shaders are created inside the Arnold scene.

[MtoA] Scripting Standin paths


standin_path

To set a standin path, use the aiStandin.dso attribute:

import maya.cmds as cmds
cmds.setAttr( 'ArnoldStandInShape.dso','C:/Users/SOLIDANGLE/Documents/BlueDog.ass',  type='string' )
print cmds.getAttr( 'ArnoldStandInShape.dso' )

Here’s one way to list some of the attributes on a standin shape node, and find out what attribute to set:

import maya.cmds as cmds
ntype = cmds.nodeType( "ArnoldStandInShape" )
print cmds.attributeInfo( inherited=False, t=ntype )

for x in cmds.attributeInfo( inherited=False, t=ntype ):
    print "%s = %s" % (x, cmds.getAttr( "ArnoldStandInShape.%s" % x ))

[MtoA] Using standins to load animation sequences


To load an animated sequence into a standin:

  • In the Attribute editor for the StandInShape, under File/Frame, your Path should be something like example.####.ass (you must use four # symbols for the frame number pattern)
  • Enable Use Frame Extension
  • In the Frame box, type “= frame” without the quotation marks, and press ENTER. That creates an expression that uses the current frame number to specify which ASS file to load.

[SItoA] Expressions for standins of animated sequences


A standin can load an animation sequence, such as circling_cubes.[1..25].ass.
For example, if you open an Arnold_Standin property, click Browse, and select a sequence, Softimage automatically inserts a [Frame] token into the file name:

standin-path

By default, that [Frame] token resolved to the current frame, but you can override that and use an expression to drive the sequence.

For example, if you have a 25-frame sequence of ASS files, you may want to play the 25 frames and then stop. To do that, you could use this expression:

 
MIN(Fc,25)
 

If you wanted to continuously loop the 25 frame sequence, you could use an fmod (modulo) expression like this:

 
cond( fmod( Fc, 25 ) == 0, 25, fmod(Fc,25) )
 

And if you wanted to show just frames 10 to 25, you could use this expression:

 
cond( Fc<10 , 10 , MIN(Fc,25) )
 

If you’re not sure about these expressions, try playing with them in the Expression Editor. As you move through the timeline, watch the Current Value update in the Expression Editor.
fmod_expression

[SItoA] Applying materials to standins


In Softimage, a standin object is the polygon mesh, hair, or point cloud with the Arnold_Standin property.

If you apply a material to a standin, that material will override any materials specified in the ASS file referenced by the standin. If you don’t want that to happen, give your material a name that starts with “Scene_Material” or “Standin_Material” (it doesn’t matter if you use uppercase or lowercase for the names).

If you do that, the standin object will use that material, but the objects in the ASS file will use the materials saved in the ASS file.

Here’s what you get in an exported ASS file. If SItoA finds a standin with a material name that starts with “scene_material” or “standin_material”, it exports a procedural node with no material.

procedural
{
 name standin-cube.SItoA.41000
 dso "\\server\project\Arnold_Scenes\XSI_Man.ass"
 min -4 0 -4
 max 4 0 4
 matrix 
  1 0 0 0
  0 1 0 0
  0 0 1 0
  0 0 0 1 
}

Otherwise, if you name the standin material something else, the procedural node will include a shader node for that material:

procedural
{
 name standin-cube.SItoA.41000
 dso "\\server\project\Arnold_Scenes\XSI_Man.ass"
 min -4 0 -4
 max 4 0 4
 matrix 
  1 0 0 0
  0 1 0 0
  0 0 1 0
  0 0 0 1 
 shader "Sources.Materials.DefaultLib.Test.standard.SItoA.40000.1" 
 declare procedural_shader constant ARRAY NODE
 procedural_shader "Sources.Materials.DefaultLib.Test.standard.SItoA.40000.1" 
}