[OSX] Getting Arnold logs for batch renders


You can get individual log files for each frame:

  1. In the Arnold Render Settings, go to the Diagnostics tab.
  2. In the Verbosity Level list, click Warnings + Info.
  3. Click the File check box.
  4. Click the folder icon and choose a folder for the Arnold log files.

mtoa_render_settings_log

Or you can check the MayaRender log, which will be one log file, with the log messages for every frame.

On OSX, open the Console and look for ~/Library/Logs/Maya/mayaRender.log
mayaRenderlog

[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

Getting an Arnold log from Royal Render


I’ve had a few cases where people weren’t sure how to get the Arnold log from Royal Render. The Arnold log is pretty important, at least for me, so here’s how to get it.

First, when you submit the job, set the log verbosity in rrSubmitter. You can do that in the Override section, but note that the verbosity levels in the Verbose list don’t match up with the newer MtoA verbosity levels. To get a Debug log, you’ll have to set the Verbose to Progress.
rrSubmitter_w_spotlight

rrSubmitter_Override

You can view the log in rrControl:
rrControl_Log_Files

[rlm] The curious case of the missing log entries


In this case, I got a debug log from a customer, but there weren’t any rlm entries in the log. As I’ve mentioned before, the Arnold log can include entries for licensing. At the Warning + Info level, you’ll get [rlm] log entries like these, if something goes wrong:

00:00:10   444MB WARNING | [rlm] could not connect to any license server

or

00:00:00   444MB WARNING | [rlm] wrong license version for arnold 20140305, found licenses for:
00:00:00   444MB WARNING | [rlm] arnold 20140206 (20 licenses)
00:00:00   444MB WARNING | [rlm] arnold 20140206 (20 licenses)
00:00:00   444MB WARNING | [rlm] please contact licensing@solidangle.com

or

00:00:03   749MB WARNING | [rlm] error checking out license for arnold (version 20140113):
00:00:03   749MB WARNING | [rlm]  * Communications error with license server (-17)
00:00:03   749MB WARNING | [rlm]  * Connection refused at server (-111)

And if you move the verbosity level up to Debug, then you’ll get some information about where Arnold is trying to get a license:

00:00:00   444MB         | [rlm] checking connection to license servers ...
00:00:05   444MB         | [rlm]  5055@LICSERVER1 ... DOWN
00:00:10   444MB         | [rlm]  5053@localhost ... DOWN

So why didn’t the customer’s log show any rlm entries? He was getting watermarks, so something must be wrong, right? Well, something was wrong: Skip License Check was enabled in the Render Settings.

No rlm log entries = Skip License Check

Setting the Arnold log verbosity level


RenderSettings-Log

Here’s what you’ll get in Maya for the different verbosity levels.
In general, the higher the verbosity, the more diagnostic log information you get.
Each verbose level includes everything in the lower levels.

In brief, here’s how the verbosity levels work in MTOA 0.21:

  • verbosity=0 is silent mode.
  • At verbosity=1, you get ERRORS and WARNINGS.
  • At verbosity=2, you get ERRORS and WARNINGS and INFORMATION.
  • At verbosity=3, you get ERRORS and WARNINGS and INFORMATION and PROGRESS.

Here’s a bit more detail on the verbosity levels in MTOA 0.21.

0 Absolute silence. Nothing will be logged, no matter what happens.
1 ERRORS, WARNINGS, and, in the case of a crash or other “abnormal program termination”, the backtrace (stack contents).
2 Basic information
3 Progress messages.
4 Render statistics, and plugin loading information.
5 Everything except diagnosics. Verbosity levels 4 and 5 are pretty much the same, except that level 5 adds:

  • WARNINGS for NAN pixels
  • messages about sub-surface scattering pointclouds
  • .ass-file parsing details
6 Everything, including diagnostics.

In MTOA 0.20 and earlier, the verbosity levels were different:

0 Absolute silence. Nothing will be logged, no matter what happens.
1 ERRORS and, in the case of a crash or other “abnormal program termination”, the backtrace (stack contents).
2 WARNINGS
3 Basic information.
4 Progress messages, render statistics, and plugin loading information.
5 Everything except diagnosics. Verbosity levels 4 and 5 are pretty much the same, except that level 5 adds:

  • WARNINGS for NAN pixels
  • messages about sub-surface scattering pointclouds
  • .ass-file parsing details
6 Everything, including diagnostics.

Here’s some samples of the different types of log output:

WARNINGS, ERRORS, and information

00:00:00   516MB         | log started Thu Dec 13 10:27:49 2012
00:00:00   516MB         | Arnold 4.0.10.2 windows icc110 oiio1012 rlm932 (build date: Oct 30 2012 15:25:33)
00:00:00   516MB         | running on SOLIDANGLE-PC
00:00:00   516MB         |  1 x Intel(R) Xeon(R) CPU E3-1240 V2 @ 3.40GHz (4 cores, 8 logical) with 16334MB
00:00:00   516MB         |  Windows 7 Professional Service Pack 1 (version 6.1, build 7601)
00:00:00   516MB         |  
00:00:05   516MB WARNING | [rlm] could not connect to license server on 5053@localhost
00:00:05   516MB         |  
00:00:05   516MB         | there are 0 lights and 1 object:
00:00:05   516MB         |  1 polymesh
00:00:05   516MB         |  
00:00:05   516MB         | rendering image at 640 x 480, 3 AA samples, 2 GI samples, 1 GI bounces
00:00:05   516MB         |  active camera: 'perspShape'
00:00:05   516MB         |  initializing 11 nodes ...
00:00:05   516MB         |  node initialization done in 0:00.00
00:00:05   519MB         |  creating root object list ...
00:00:05   519MB         |   scene bounds: (-6.33536005 -4.01219463 -10.337409) -> (6.23116827 6.43629837 13.2852964)
00:00:05   519MB         |  updating 11 nodes ...
00:00:05   519MB         |  node update done in 0:00.00
00:00:05   519MB WARNING |  [aov] driver "defaultArnoldDriver@driver_exr.RGB" does not support POINT2 pixels
00:00:05   519MB WARNING |  [aov] driver "defaultArnoldDisplayDriver@renderview_display" does not support POINT2 pixels
00:00:05   519MB WARNING |  [aov] driver "defaultArnoldDriver@driver_exr.RGB" does not support POINT2 pixels
00:00:05   519MB ERROR   |  [aov] no valid outputs - can't continue
00:00:05   519MB         |   
00:00:05   519MB         |  releasing resources
00:00:05   516MB   

Progress messages (at 5% increments during rendering)

00:00:05   492MB         |  starting 8 bucket workers of size 64x64 ...
00:00:05   503MB         |     0% done - 27 rays/pixel
00:00:05   504MB         |     5% done - 108 rays/pixel
00:00:06   505MB         |    10% done - 101 rays/pixel
...
00:00:07   500MB         |   100% done - 33 rays/pixel
00:00:07   499MB         |  bucket workers done

Render statistics
which includes things like scene creation time, render time, memory consumed, ray counts, lighting calculations, shader calls, geometry stats, and tesselation.

00:00:07   499MB         | -----------------------------------------------------------------------------------------
00:00:07   499MB         | ray counts:                           (/pixel , /sample) (% total) (avg. hits) (max hits)
00:00:07   499MB         |  camera                       2946240 (   9.00,    1.00) ( 31.80%) (     0.24) (       1)
00:00:07   499MB         |  shadow                       1303706 (   3.98,    0.44) ( 14.07%) (     0.00) (       0)
00:00:07   499MB         |  diffuse                      3339596 (  10.20,    1.13) ( 36.05%) (     0.29) (       1)
00:00:07   499MB         |  glossy                       1675254 (   5.12,    0.57) ( 18.08%) (     0.31) (       1)
00:00:07   499MB         |  total                        9264796 (  28.30,    3.14) (100.00%) (     0.25) (       1)
00:00:07   499MB         |  max depth                          2

Diagnostics includes messages from the mtoa plugin, information about the bvh acceleration structures, and plugin loading/unloading info.

00:00:00   493MB         | [mtoa.session] Setting export camera to "persp"
00:00:00   493MB         | [mtoa] Exporting scene
00:00:00   493MB         | [mtoa.extensions]  aiOptions Using translator , provided by ().
00:00:00   493MB         | [mtoa.translator]  defaultArnoldRenderOptions     | : Exporting Arnold options(options): 000000002B36F2E0
00:00:00   493MB         | [mtoa] [aov beauty] Setting AOV output: filter and driver.