[MtoA] MayaFile node uses a default color for missing textures


Here’s something important to remember when you’re debugging a scene…

By default, the MayaFile node uses a default color if a texture is missing.

MayaFile_Use_Default_Color

This means the render won’t abort because of missing textures, and you won’t see ERRORs like these in the Arnold log for missing texture files:

ERROR   |   [texturesys] OpenImageIO could not open "sourceimages/noicon.tx" as tx: Could not open file "sourceimages/noicon.tx"
ERROR   |   [texturesys] Invalid image file "sourceimages/noicon.tx"

So missing textures can easily go unnoticed.

If you need to disable Use Default Color for testing, an easy way is to export an ASS file and then render it with kick -set MayaFile.useDefaultColor false.

I suppose you could also modify the Maya scene file directly:

import maya.cmds as cmds
import os

def set_useDefaultColor(b):
    filenodes=cmds.ls(type="file")
    for item in filenodes:
        cmds.setAttr( "%s.aiUseDefaultColor" % item, b )

set_useDefaultColor( False )

And finally, you can change the default value of the Use Default Color parameter by adding this to shaders/mtoa_shaders.mtd:

[node MayaFile]
	[attr useDefaultColor]
		default		BOOL	false

[Arnold] Rolling shutter in a nutshell


What’s rolling shutter? It’s an effect, or artifact, that looks like like this:
3192314056_fa8b5160d2_o

Rolling shutter means that the image isn’t captured all at once, but one scanline at a time:

Lee posted a video walk through of how to get the rolling shutter effect with Arnold. He used C4DtoA, but it’s basically the same recipe in any of the Arnold plugins:

  • Your geometry has to be spinning fast (like a propeller 😉
  • Select your camera, and enable Rolling Shutter. Leave the duration at 0.
  • In the Render Settings, enable motion blur (you don’t need deformation blur, or camera blur).
  • Adjust the number of motion keys, and the shutter length, to taste. As you increase the shutter length to exaggerate the effect, you’ll need more motion keys.

Update: And here’s some more interesting experiments with the rolling shutter effect