- Create a custom RGB AOV.
- Use aiWriteColor to write the object mask to the custom AOV. The Input color of the aiWriteColor is the mask color, and you have to enable Blend to get the opacity blended into the Input.
- Connect the Out Color of the aiWriteColor to the Color of a Standard shader. That sends the aiWriteColor beauty to the Standard.
- Make sure Enable AOV Composition is turned on in the Render Settings.
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.
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
+ 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 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:
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”.
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.