You can’t. The background object isn’t visible in refractions. Or reflections, or anything but camera rays.
Here’s an example: a refractive sphere in front of a torus, in front of the background checkerboard object. The black areas are where the background object isn’t visible to refraction rays.
The “background object” is actually a shader plugged into the Arnold background slot.
You won’t see it in Cinema 4D, but when C4DtoA translates the scene to Arnold, the background object is translated as a shader plugged into the options.background parameter (in Cinema 4D, this is the Environment > Background parameter in the Render Settings).
In an ASS file, it looks like this:
The image_plane node is a shader, and if you were to check its code, you’d see that it handles camera rays only; for any other ray type (like refraction), the image_plane shader returns black.
if (!(sg->Rt & AI_RAY_CAMERA))
sg->out.RGBA = AI_RGBA_BLACK;
This blog post is for Google search to find; I’ve already blogged about the SSE4.2 requirement elsewhere.
If your processor does not support SSE4.2, the Arnold won’t run on your computer. MtoA will either fail to load, or you’ll get a crash whenever you try to render.
To check whether an older machine supports SSE4.2, here’s a few suggestions:
- Google your processor and “SSE”
cpu-world is pretty reliable, but I have seen one or two cases where the info was wrong, and SSE4.2 wasn’t really supported by a processor.
- Windows: Download and run coreinfo -f
- OSX: Run sysctl -a | grep machdep.cpu
- Linux: Check /proc/cpuinfo
A note about coreinfo:
PyMEL is great. But…if pymel.log can’t be accessed, any plugin that uses PyMEL will fail to load.
And MtoA uses PyMEL, so every now and again I see a case where MtoA doesn’t load, and you get something like this in the script history:
// Successfully imported python module 'arnold'
// Successfully imported python module 'mtoa'
# Error: line 1: IOError: file C:\Program Files\Autodesk\Maya2016\bin\python27.zip\logging\__init__.py line 926: 13 #
// Error: Failed to register renderer 'arnold' //
// Error: line 1: initializePlugin function failed (mtoa) //
The important bit is this error:
# Error: line 1: IOError: file C:\Program Files\Autodesk\Maya2016\bin\python27.zip\logging\__init__.py
That error means that PyMELcannot create a log file in your user folder.
By default, the PyMEL log file is created in your Documents folder. For example, if your Windows user account name is Stephen, then this would be the log file:
You need to check the permissions on that log file, or delete it so that PyMel can create a new log file.
Note that the pymel.log file may be a hidden file.
Here’s a good example of why you might use the User Options, and how it lets you set Arnold parameters that aren’t exposed by MtoA in Maya.
If you set the verbosity level to Warnings + Info, you’ll get some detailed image statistics in the Arnold log:
But what if you’ve got thousands of image files (eg udims)? You might not want all that in your log. There used to be a check box in the Arnold Render Settings that allowed you to turn off the detailed image file statistics, but we removed that a few years ago.
But the Arnold options.texture_per_file_stats parameter is still there, so you can use the User Options field to set that parameter to false. Just enter the parameter name “texture_per_file_stats” and the parameter value, like this:
You may have noticed the Force Translate Shading Engine option in the export dialog (or in the Feature Overrides section of the Render Settings).
Force Translate Shading Engines forces MtoA to export shape nodes with a shader link, like this:
declare mtoa_shading_groups constant ARRAY NODE
where “aiStandard1SG” is the name of a MayaShadingEngine shader node.
This allows you to keep your shapes and shaders in separate ASS files. For example, you could have one standin that loads the shapes, and a second standin that loads the shaders. As long as the shape nodes include links to the shaders, Arnold will resolve the links and render the shapes with the right shaders.
For the render -rt 1 command, you can specify the output ASS name in
the defaultArnoldRenderOptions.output_ass_filename attribute. For example:
set PRE_RENDER_MEL="setAttr -type \"string\"
render -s 6 -e 8 -r arnold -rt 1 -preRender %PRE_RENDER_MEL%
The scene should have the Frame/Animation ext set to something like
“name.#.ext”. Otherwise, if it is “name.ext” you’ll get filenames like
output_ass_filename can have environment variables, but you have to be
careful to use forward slashes. For example:
set PRE_RENDER_MEL="setAttr -type \"string\" defaultArnoldRenderOptions.output_ass_filename \"%OUTPUT_ASS_FILENAME%\";"
render -s 6 -e 8 -r arnold -rt 1 -preRender %PRE_RENDER_MEL% C:\projects\Support\scenes\_2016\XSI_deformed_logo.mb
There’s also the arnoldExportASS command, if you want to script the export.
maya -batch -file scene.mb -command "arnoldExportAss
-f "/home/blairs/Desktop/example.ass" -mask 255 -lightLinks 1 -compressed
-shadowLinks 2 -cam sideShape;"
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.
To get an Arnold log:
- In Maya, click Render > Render Settings
- In the Render Using list, click Arnold Renderer
- Click the Diagnostics tab.
- Set the Verbosity level to at least Warnings + Info
- Click the File check box to enable file logging (by default, the log file will be saved in the last folder you browsed to with Maya; see Finding your log file).
- If you want to be absolutely sure of where to find the log file, click the folder icon beside the Filename box, and select a location for the Arnold log file.
- Depending on what OS you use, and how you started Maya, the log is also output to the Output Window (Windows) or to the terminal (on OSX and Linux if you started Maya from a terminal)
For batch rendering, Arnold log messages go into mayaRenderLog.
- [Windows] %USERPROFILE%\Documents\maya\mayaRenderLog.txt
- [OSX] ~/Library/Logs/Maya/mayaRender.log
- [Linux] ~/maya/mayaRenderLog.txt