[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

[Arnold] Tips for reducing noise when rendering interior scenes with indirect lighting


Indirect lighting of interior scenes can be a challenge, but there are some things you can do. In this post, we’ll give you some quick tips, but you can find more detailed information on support.solidangle.com, both for interior lighting and for troubleshooting noise.

Avoid the Skydome and use a Sky background and Quad lights

Instead of using a Skydome light, use a Sky for the background and quad lights for the light coming in through the windows. The quad lights should just barely cover the entire window.

If there’s anything visible outside the window, you may want to put a spot light on them. Just be careful not to let the spot light go into the room.

Use a distant light to simulate beams of light coming into the room

A distant_light is an easy-to-use option that perfectly matches sun light.

Spot lights don’t produce realistic sun beams since the beams look like they’re expanding, which sun beams don’t do. Moving the spot light further back, and also making sure it’s no larger than it needs to be to illuminate the window, will reduce noise and make it look more realistic.

Don’t put lights too close to the windows

If a light is too close to the window, that means the light hitting the window area is significantly more concentrated and so much brighter than the light hitting the far side of the room and so this produces more noticeable noise.

Make sure your materials are physically based

For example, don’t shade the room Standard shaders with a Diffuse weight of 1, and Diffuse color full white (1 1 1). I don’t think there’s any material known to man that is this reflective. Lowering the Diffuse weight to 0.7 will roughly match white paint and it will also get rid of noise. If it’s too dark, then try increasing the intensity of the lights, increase the number of diffuse bounces, or increase the camera’s exposure.

For a richer look, avoid fake lights inside the room

Consider getting rid of any fake lights you may have inside the room, and instead increase the number of diffuse and glossy bounces in order to get an even more realistic look, not to mention make the lighting easier. Doing that does increase render times, unfortunately, but does give a richer look.

hat tip: Thiago

ERROR | [mtoa] [xgenTranslator] Could not find xgen_procedural in search path $ARNOLD_PLUGIN_PATH


This error

ERROR   | [mtoa] [xgenTranslator] Could not find xgen_procedural in search path $ARNOLD_PLUGIN_PATH

happens only when MtoA is first loaded, and it can be safely ignored. It doesn’t cause any problems when you render, and MtoA loads the XGen procedural from the MtoA procedurals folder.

The error is a consequence of how MtoA searches folders when it loads extensions. If you really need to get rid of the error, you can try copying the xgen_procedural library to the MtoA shaders folder.

[C4DtoA] Render failed! Please check the log for more details.


c4dtoa_render_failed

The Arnold log is important, not just for troubleshooting and getting help from us at Solid Angle, but also for understanding what’s going on when Arnold renders your scene.

But, first things first: where’s the log? The Arnold log is output to the Cinema 4D Console:
c4dtoa_console

To open the Console, click Script > Console.
c4dtoa_script_console

You can set the verbosity level in the Render Settings > Diagnostics. By default, the verbosity level is Warnings, but by increasing it to Info, you’ll get the % done log entries. You can also send the log to a file (good for logging support cases!).
c4dtoa_diagnostics

[RLM] The case of the false positive for virtual machine detection


When RLM detects that it’s running on a virtual machine, you’ll see “This server does not run on virtual machines, exiting” and “solidangle initialization error: 5, not restarting” in the RLM debug log:

06/22 11:45 (solidangle) RLM License Server Version 10.1BL2 for ISV "solidangle"
06/22 11:45 (solidangle) Settings from RLM Version 10.1BL2 for ISV "solidangle"
...
06/22 11:45 (solidangle) This server does not run on virtual machines, exiting
06/22 11:45 (rlm) Reread request (for everyone) by webuser@example-pc
06/22 11:45 (rlm) Restarting solidangle on port 55555
06/22 11:45 (rlm) New thread created to watch ISV solidangle
06/22 11:45 (rlm) Starting any new ISV servers...
06/22 11:45 (rlm) 
06/22 11:45 (rlm) solidangle initialization error: 5, not restarting
06/22 11:45 (rlm) 
06/22 11:45 (rlm) The ISV server is running on the wrong host.
06/22 11:45 (rlm) 
06/22 11:45 (rlm) This can happen if:
06/22 11:45 (rlm)  The hostid of this machine doesn't match any license file
06/22 11:45 (rlm)  - or -
06/22 11:45 (rlm)  You are attempting to run the server on a virtual machine

In this case, the machine wasn’t virtual. And both RLM and the solidangle ISV were the same version (10.1BL2), so it wasn’t a case of a newer solidangle.set with an older RLM, which gives you the same log output.

The problem was the older RLM version. The older RLM 10.1BL2 would sometimes issue a false positive for virtual machine detection. The solution is to upgrade to the newer RLM 11.2BL2, which you can get by downloading Arnold 4.2.4.0 or later.

[Arnold] System requirements


In general, Arnold is going to work on pretty much any 64-bit system where Houdini, Maya, Cinema 4D, or Softimage works. However, there are some minimum OS requirements:

  • OSX 8 or later (as of Arnold 4.2.7.0)
  • Windows 7 or later (as of Arnold 4.2.3)
  • Linux with at least glibc 2.12 and libstdc++ 3.4.13 (gcc 4.4.7). This is equivalent to RHEL/CentOS 6 (as of Arnold 4.2.6)
  • CPUs need to support the SSE4.1 instruction set (as of Arnold 4.2.16.2)

Other than that, Arnold works on Intel and AMD processors, and has no graphic card or GPU requirements, since Arnold is a CPU-based renderer.

Last updated: 19 June 2017

[MtoA] Is there an ARNOLD_PROCEDURAL_PATH environment variable?


No, there isn’t. HtoA recently added support for an ARNOLD_PROCEDURAL_PATH environment variable, but neither MtoA or Arnold itself support ARNOLD_PROCEDURAL_PATH.

Here’s a few things you can do:

  • If you’re kicking ASS files, you can set the procedural search path on the kick command line. For example, assuming ARNOLD_PROCEDURAL_PATH is set in your environment, you could do this on Windows:
       kick -set options.procedural_search_path %ARNOLD_PROCEDURAL_PATH%

    Or this on Linux or OSX:

       kick -set options.procedural_search_path $ARNOLD_PROCEDURAL_PATH
  • You could add the procedural search path to the system path (PATH on Windows, LD_LIBRARY_PATH on Linux, DYLD_LIBRARY_PATH on OSX). Arnold will then find the procedural by searching through the system path.
  • Maya, you can put an environment variable in the Procedural Search Path text box. Note that you have to use square brackets, like this: [ARNOLD_PROCEDURAL_PATH].
    procedural_search_path

[HtoA] About instancing


A few quick notes about instancing support in HtoA:

  • For instancing, use the Instance object with fast point instancing. HtoA doesn’t support full point instancing.
  • You can assign material to instances with the shop_materialpath string attribute on the instance points.
  • Fast point instancing supports per-instance user data and instance OBJ property overrides.
  • Light instancing is not supported [yet]. Actually, Arnold itself doesn’t support light instances, but what plugins like MtoA and SItoA do is translate the light instances into duplicates of the light for Arnold.
  • Procedurals (both DSO and ASS) can be instanced.