Ignoring self-occulsion

Question: how do you set up the Arnold ambient_occlusion shader so that it ignores self-occlusion?

Let’s start with the default ambient occlusion. here’s a sphere and a plane. Each has it’s own Ambient Occlusion shader. For the sphere, Ambient Occlusion.Black is Red.

image (1)

Now, let’s disable Receives Shadows on the sphere.
That means no occlusion based on the plane (shadow rays from the sphere ignore the plane); but there’s still self-occlusion.

image (2)

Next, Cast Shadows disabled. No self-occlusion, but no ambient occlusion on the plane either

image (3)

And finally, Self Shadows disabled. Now, there’s no self-occlusion. The ambient occlusion on the sphere is coming solely from the planeimage (4)

[MtoA] [Arnold] The case of the mesh light and the facing-ratio material

In this case, we have a torus as a mesh light.

The mesh light color is facing-ratio ramp, so that in the Beauty AOV, the polygons facing the incoming camera ray are red, and polygons facing away are green.


The plane below the light has a [slightly non-realistic] combination of diffuse, specular, and reflection (Kd=0.7, Ks=0.5, Kr=0.2).

The question here is: why do we see red in the reflection AOV, but green only in the diffuse and specular AOVs? Why does the facing-ratio ramp return red for reflection rays, but green for diffuse and glossy rays?

The answer is that there are no diffuse or glossy rays in this situation. A mesh light gets a meshLightMaterial shader, which MtoA assigns to the mesh light color (and to the torus shape) when MtoA translates the scene to Arnold.

The meshLightMaterial shader doesn’t handle diffuse, glossy, or shadow rays. The first few lines of the meshLightMaterial shader look like this:

 sg->out.RGBA = AI_RGBA_BLACK; 

Let’s take a look at what’s happening in the different AOVs.


The reflection rays hit the bottom of the torus, go through the facing-ratio ramp, and return red because most of the polygons are facing down towards the plane. In this case, we get the facing ratio of the polygon normals and the reflection ray.



We get the green from the light sampling, where there’s no rays.


Since there’s no rays, we get the dot product of the surface normal and  0 0 0, which is 0. And that returns green from the ramp:



The diffuse rays don’t make a contribution (because the meshLightMaterial doesn’t handle them) so we get green from the light sampling (just like for specular).


Indirect Specular

This would be black, since the meshLightMaterial doesn’t handle glossy rays, so the mesh light makes no contribution to the glossy reflections.

[Arnold] ndoteye shade mode

The Utility shader has a super-fast ndoteye shading mode. This shading mode doesn’t trace any rays: it simply shades based on the angle between camera (eye vector) and  the surface normal (ndoteye = dot product of the Normal and Eye vectors).

Here’s an example of the Utility shader. The middle mesh has the ndoteye shade mode (the left mesh has plastic, and right ambocc).


Note that with ndoteye you get just black in the glossy reflection. That’s because in ndoteye shade mode, the Utility shader handles camera rays only. No secondary rays like glossy or refraction.

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.
  2. In the Animation sequence, manually enter the start and end frames in the Movie Start Frame and Movie End Frame text boxes
  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.


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.