[SItoA] Stopping procedural textures from swimming

The Noise shader can access the Pref coordinates to prevent swimming. But for other procedural textures, you’ll have to take a different approach (unless you whip up [a relatively simple] shader to get the Pref coordinates). Here’s one way, using ICE to store UVWs in a CAV, and then a Vertex Color node in the render tree.

First, create a Spatial projection and a Color at Vertices (CAV) property on your mesh.

Then build an ICE tree that gets the projection UVWs and stores them in the CAV.

In the render tree, use a Vertex Color to get the UVW information from the CAV, and feed that into the texture coordinates of the procedural texture.

Switching between different versions of MtoA

If you have several versions of MtoA, you can switch between them by editing your Maya.env and mtoa.mtd files before you start Maya. These two files are located under your MAYA_APP_DIR folder.

For example, C:\Users\SOLIDANGLE\Documents\maya\2013-x64\Maya.env.

MAYA_RENDER_DESC_PATH = C:\solidangle\mtoadeploy\2013.0.22.0
PATH = %PATH%;C:\solidangle\mtoadeploy\2013.0.22.0\bin

And C:\Users\SOLIDANGLE\Documents\maya\2013-x64\modules\mtoa.mod:

+ mtoa any C:\solidangle\mtoadeploy\2013.0.22.0

The mtoa.mod file is put there by the MtoA installer.

The MtoA installer always wants to remove any other installed version, so if you want to keep multiple versions around, you can do one of the following:

  • Extract the files yourself (for example, using 7zip)
  • Make copies of each MtoA version before you uninstall them.

For example, if you have MtoA 0.21 installed in


copy that folder to


Then install MtoA 0.22 (during the install, you may want to change the default install folder to something like C:\solidangle\mtoadeploy\2013-0.22.0).

After that, you’ll have both MtoA 0.22 and 0.21, and you can switch between them.

AOV Composition and opacity

AOV Composition allows opacity and transparency to carry forward into AOVs. It works only for RGB AOVs, so you won’t see it in the render region (because the xsi display driver always outputs RGBA AOVs).

For example, suppose you have a textured grid with an opacity map:
In the render region, the Main AOV is fine, but the Arnold Direct Diffuse doesn’t have the opacity, even if you enable AOV Composition:
However, if you render out the image (with AOV Composition enabled and the Direct Diffuse format set to RGB), you’ll get what you expected:

Pref coordinates and bind poses

The Noise shader can use different coordinate systems when it evaluates the noise.

  • Object space, where points are expressed relative to the local origin (center) of the object.
  • World space, where points are relative to the global origin of the scene.
  • Pref, which isn’t really a space, but rather a reference to a bind pose, which in Softimage is the top of the Modeling region. Pref is really a point in object space, but it’s a reference to the geometry at the top of the Modeling region. In constrast, if you use Object space, you’re getting point position coordinates from the very top of the whole operator stack.


The name “Pref” is easier to understand if you think of it like a variable name. So, when it comes to noise, P is a point in world space, Po is in object space, and Pref is in “reference space” aka the “bind pose”.

For the Noise shader, the advantage of using Pref is that it prevents the noise from swimming over the surface of the object as the object deforms (as long as the deforms are above the Modeling stack). As the object deforms, Po is a point on that deformed geometry, so Po is constantly changing. In contrast, Pref is a point on the geometry that came out of the Modeling stack. So the noise sticks to the “bind pose”.

Note the difference between Pref and the two other coordinate systems (World and Object).

Noise, world coordinates, and offsets

If you’re using world coordinates for your noise, then obviously as an object moves in global space, the noise will change. Here I’ve extracted a polygon and moved it: same shader tree that uses noise, but different noise because I’m using world coordinates.

You could keep the same noise by applying an offset equal to the translation:
Note that I’ve assumed that there’s no scaling of the noise. If there was, I’d have to multiply my offset by the same scaling.

Missing shaders in images rendered with kick


I was tempted to title this post something like “why is my ass pink when I kick it???” 🙂

The color magenta (often reported as “pink” or even “purple” sometimes) is the color of missing shaders. If Arnold cannot find a shader, it returns the color magenta (RGB = 1, 0, 1). This is a pretty common result when people export an ASS file from Maya for the very first time. Unlike SItoA, which helpfully fills in the Shader Search Path for you, MtoA leaves the search paths empty (unless you fill them in yourself).

There’s several ways you can tell kick where to find the shaders:

  • Use the kick -l flag to specify the location of the shaders. For example:
    kick -l C:\solidangle\mtoadeploy\2013\shaders
  • Set the ARNOLD_PLUGIN_PATH environment variable to the location of the shaders.
  • In Maya, enter the shader search path in the Render Settings before you export the ass file.

I thought you might also be able to use -set options.shader_searchpath on the kick command line, but that didn’t work for me.

kick -i "elephant.ass" -set options.shader_searchpath "C:\solidangle\mtoadeploy\2013\shaders"

Using the attr token in the texture file name attribute of a File node

In this blog post, I’ll quickly step through an example of how to use the <attr> token in the Maya File node.

Add a "mtoa_constant_" attribute to the shape node.

Put the name of the texture file in the extra attribute:

Use the token in the Image Name. Note that I have a relative path, so I have to make sure that I’ve set a project.

Now I’ve got something that will render in Maya. If I want to export this to an ASS file and render it with kick, I need to add a Texture Search Path (and optionally, a shader search path if I don’t want to use kick -l).

Here’s the texture-related parts of the exported ASS file:

 texture_searchpath "[MY_PROJECT_PATH]"

 name pPlaneShape1
 declare myFileName constant STRING
 myFileName "noicon.png"

 name aiStandard1
 Kd_color file1

 name file1
 filename "/sourceimages/<attr:myFileName>"

Notice how MtoA exported a relative path instead of an absolute. This happens only if you have a token in the filename; otherwise, you always get an absolute path.

And here’s a screenshot to show all this working, both in Maya and in Arnold: