WARNING mtoa_shading_groups: unresolved reference


Any time you see “node … is not installed” and “unresolved reference” warnings when you try to kick an ASS file exported from Maya, the problem is missing MtoA shaders.


00:00:00 18MB WARNING | [ass] line 259: node "MayaFile" is not installed
00:00:00 18MB WARNING | [ass] line 288: node "MayaShadingEngine" is not installed

00:00:03 23MB WARNING | [ass] line 238: pSphereShape1.mtoa_shading_groups: unresolved reference to 'aiStandard2SG'
00:00:03 23MB WARNING | [ass] line 137: aiSkyDomeLightShape1.color: unresolved reference to 'file1'
00:00:03 23MB WARNING | [ass] line 188: pPlaneShape1.shader: unresolved reference to 'aiStandard1SG'
00:00:03 23MB WARNING | [ass] line 197: pPlaneShape1.mtoa_shading_groups: unresolved reference to 'aiStandard1SG'
00:00:03 23MB WARNING | [ass] line 229: pSphereShape1.shader: unresolved reference to 'aiStandard2SG'

When you render with kick, you need to specify the location of the MtoA shaders. You can do this several ways:

  • Set the ARNOLD_PLUGIN_PATH environment variable. For example:
    export ARNOLD_PLUGIN_PATH=/home/render/solidangle/mtoa/2016/shaders
    set ARNOLD_PLUGIN_PATH=C:\solidangle\mtoadeploy\2016\shaders
  • Use the kick -l flag to specify the MtoA shader location.
  • In Maya, set the Shader Search Path in the Arnold Render Settings, then export the ASS file.

[C4DtoA] Using the Bitmap Shader for image sequences


Arnold doesn’t support .mov files for textures, but with C4DtoA you can use the Bitmap shader to load image sequences like seq_0000.tx, seq_0000.tx, seq_0000.tx, …

  1. In the Bitmap Shader > Shader properties, select one of the files in the image sequence.
    c4dtoa_bitmap_shader_file
  2. In the Animation sequence, manually enter the start and end frames in the Movie Start Frame and Movie End Frame text boxes
    c4dtoa_bitmap_shader_movie
  3. Click Calculate

Under the covers, C4DtoA doesn’t actually implement the Bitmap Shader. Instead, C4DtoA translates the Bitmap Shader to an Arnold Image shader

[MtoA] Installing the BA shaders in Maya


You can use the BA shaders in Maya with MtoA. The BA shaders are Arnold shaders, so you can use them anywhere that you use Arnold.

Here’s how:

  • Download the Maya mental ray package of the BA shaders. For example, for Maya 2014, the most recent version is
    >>>v25.01.09 Maya 2014 mentalRay
  • Extract the archive. For example, you could extract the archive to a C:\solidangle\BA folder.
  • Set MAYA_SCRIPT_PATH to point to the scripts\AEtemplates folder. For example:
    set MAYA_SCRIPT_PATH=C:\solidangle\BA\140219__baEssential_25.01.09___Maya_2014_MRay\scripts\AETemplates
  • Download the Arnold shaders. For example, for Maya 2014, the most recent version is >>>v25.01.09 Arnold 4.1 (mentalRay addon required for UI)
  • Extract the archive, and set ARNOLD_PLUGIN_PATH to point to the Arnold\win64 folder. For example:
    set ARNOLD_PLUGIN_PATH=C:\solidangle\BA\140219__baEssential_25.01.09___All_Arnold_4_1_3\Arnold\win64
  • Start Maya. The BA shaders should be available, and the AE should look “nice” for the BA shaders.

[MtoA] [SItoA] Distance between shading with Vector State


SItoA includes Arnold versions of the Softimage Vector State and Vector Scalar shaders, which you can use to do build a “distance between” shading network.

Vector State can get you the origin point of a ray and its intersection point, and Vector Scalar can get the distance between those two points.

vector_state_sitoa

You can even use these shaders in Maya (since they are just Arnold shaders). Just put sitoa_shaders somewhere in the ARNOLD_PLUGIN_PATH, and MtoA will load them. The shader UI in the Attribute Editor will be very basic (for example, integer input fields instead of drop-down lists), but you can use the shaders.

vector_state_mtoa

[SItoA] Understanding the Object color mode of the Utility shader


The Utility shader has an Object color mode that assigns colors to objects based on names. Each shape (for example, a polymesh shape or a curves shape or a box shape) gets a unique color, because each shape has a unique name.

If you’re working with SItoA, you may have noticed that the object color changes with each frame:
utility_color_mode

That’s because SItoA gives shapes names like Elephant.Elephant_Mesh.SItoA.4000, which change with every frame.

MtoA doesn’t use the current frame in shape node names, and neither does HtoA (by default). However, HtoA does provide an option for adding a suffix, like the frame number, to the shape node name.

[SItoA] Getting user parameters in the render tree


Arnold nodes can have user-defined parameters, like MyColor in this ASS snippet:

polymesh
{
 name grid3.SItoA.1000
#
# ...
#
 declare MyColor constant RGBA
 MyColor 0.703999996 0 0.526000023 1
}

In Softimage, there are a number of ways you can assign data like MyColor to a polygon mesh. You could use ICE:
userparam_ice_attribute
Or you could use the Arnold User Options property:
userparam_user_options
To access MyColor in the render tree, use the Color Attribute shader:
MyColor_render_tree
If you used ICE, MyColor will appear automatically in the Attribute list. But if you used the User Options property, you’ll have to use a script one-liner to set the Attribute value. That’s because Softimage doesn’t know about the user parameters on Arnold nodes: those come into existence only when SItoA translates the scene to Arnold.

Application.SetValue("Sources.Materials.DefaultLib.Material.Color_Attribute.attribute", "MyColor", "")

On a related note, the MtoA shader userDataColor does the same thing as the SItoA Color Attribute shader: it uses AiUDataGetRGBA() to get a color from a user parameter on the object being shaded. With SItoA 3.0, the Arnold > DLL Shaders menu makes it pretty easy to use an MtoA shader in Softimage.
mtoa_userDataColor

[MtoA] Installing custom shaders


So, you’ve downloaded some custom shaders and you want to get them into Maya? Here’s how:

  • Set ARNOLD_PLUGIN_PATH to point to the location of the shader DLL/SO and MTD files.
  • Set MTOA_TEMPLATES_PATH to point to the location of the shader template .PY files.

That’s it. MtoA uses those environment variables to find the shaders (the .DLL or .SO files), the shader metadata files (.MTD), and the shader templates (.PY).

A metadata file tells Maya how to handle the shader (for example, where to show it in the Assign New Materials window).
A shader template defines the UI for the shader in the Attribute Editor.