Quantcast
Channel: Maya – Arnold Support Corner
Viewing all 53 articles
Browse latest View live

Arnold shaders not showing up in Assign New Material window

$
0
0

If you’re running Maya 2013 and you don’t see the Arnold shaders in the Assign New Materials window, then you need to install the latest Maya 2013 service pack. After that, you’ll be able to right-click an object and then assign an Arnold shader.

AssignNewMaterial



Setting the Arnold log verbosity level

$
0
0

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.

Exporting user data parameters to Arnold from Maya

$
0
0

You can add attributes to shape nodes in Maya, and MTOA will export those extra attributes as user data in Arnold shape nodes. For example, you use this mechanism to add user data to a procedural node.

Add some extra attributes to a shape node, using the naming convention mtoa_constant_parameter-name. That is, the attribute name must always start with “mtoa_constant_”.
AddAttribute

Export to ASS. In the .ass file, your extra attributes will be declared as user parameters:

procedural
{
 name ArnoldStandInShape
 dso "C:/Users/SOLIDANGLE/Dev/MyProcedural.dll"
 min -9.63329697 0 0.861843109
 max -6.73797035 3.62841082 9.87797546
 matrix 
  1 0 0 0
  0 1 0 0
  0 0 1 0
  0 0 0 1 
 declare MyVector constant VECTOR
 MyVector 0 0 0
 declare MyFloat constant FLOAT
 MyFloat 0
 declare MyInteger constant INT
 MyInteger 0
 declare MyBoolean constant BOOL
 MyBoolean off
 declare MyString constant STRING
 MyString ""
}

[MtoA] Editing Arnold attributes on multiple objects

$
0
0

If you need to change the same Arnold attributes on many nodes, use the Attribute Spreadsheet. For example, suppose you wanted to turn off the Opaque attribute on a number of objects in your scene. Here’s how to do it:

  1. Select the objects.
  2. Press the Down arrow (aka Pick Walk) to select the shape nodes.
  3. Open the Attribute Spreadsheet.
  4. Click the All tab, and find the Ai (Arnold) attributes you want to change. Drag across all rows, and then type “off” in the last row.
    AiAttributeEditor

Switching between different versions of MtoA

$
0
0

If you have several versions of MtoA, you can switch between them by editing your Maya.env and mtoa.mtd files before you start Maya. These two files are located under your MAYA_APP_DIR folder.

For example, C:\Users\SOLIDANGLE\Documents\maya\2013-x64\Maya.env.

MAYA_RENDER_DESC_PATH = C:\solidangle\mtoadeploy\2013.0.22.0
PATH = %PATH%;C:\solidangle\mtoadeploy\2013.0.22.0\bin

And C:\Users\SOLIDANGLE\Documents\maya\2013-x64\modules\mtoa.mod:

+ mtoa any C:\solidangle\mtoadeploy\2013.0.22.0

The mtoa.mod file is put there by the MtoA installer.

The MtoA installer always wants to remove any other installed version, so if you want to keep multiple versions around, you can do one of the following:

  • Extract the files yourself (for example, using 7zip)
  • Make copies of each MtoA version before you uninstall them.

For example, if you have MtoA 0.21 installed in

C:\solidangle\mtoadeploy\2013

copy that folder to

C:\solidangle\mtoadeploy\2013-0.21.0

Then install MtoA 0.22 (during the install, you may want to change the default install folder to something like C:\solidangle\mtoadeploy\2013-0.22.0).

After that, you’ll have both MtoA 0.22 and 0.21, and you can switch between them.


[MtoA] Creating color masks with a custom AOV and the Utility shader

$
0
0

In this video, I show how to a color mask AOV using a custom AOV and the Utility shader. Topics covered include:
- Creating a custom AOV
- Setting the default shader for a custom AOV
- Setting up the Utility shader to output a color for each shape
- Understanding the difference between the Color and Color ID color modes


[MtoA] The case of the renderer that failed to register

$
0
0

In this case, a customer running Maya 2013 on Ubuntu reported this error when he tried to load the mtoa plugin:

API error detected in plugins/mtoa/Main.cpp at line 710: (kFailure): Unexpected Internal Failure 
ERROR | Failed to register renderer 'arnold' 

That specific line in plugins/mtoa/Main.cpp runs these two lines of Python:

import mtoa.cmds.registerArnoldRenderer
mtoa.cmds.registerArnoldRenderer.registerArnoldRenderer()

So I asked the customer to run that Python in the Maya script editor, and that gave us this error:

# Error: ImportError: file 
/usr/autodesk/maya2013-x64/lib/python26.zip/hashlib.py line 63: No module 
named _md5 # 

Now we’re cooking with EVIL gas! I’ve seen these kinds of errors before…

This appears to be general problem with Maya 2013 and pymel (I found a few different posts about this via Google search). For example, this thread from the pymel project, or the Troubleshooting section on this page.

In brief: you need to create some symlinks to the right versions of the libssl.


[MtoA] Using standins to load animation sequences

$
0
0

To load an animated sequence into a standin:

  • In the Attribute editor for the StandInShape, under File/Frame, your Path should be something like example.####.ass (you must use four # symbols for the frame number pattern)
  • Enable Use Frame Extension
  • In the Frame box, type “= frame” without the quotation marks, and press ENTER. That creates an expression that uses the current frame number to specify which ASS file to load.


[MtoA] Relative paths for standins

$
0
0

You can use relative paths in Maya (like “/Dog.ass” in the Path box of the StandinShape attributes). It can be relative to the project, or relative to the Procedural Search Path.

standin_relative_path

An exported ASS file, on the other hand, always has the full absolute path.


[arnold] Getting RLM diagnostics from Arnold

$
0
0

If you want to double-check what license servers Arnold is trying to connect with, set the log verbosity level to the maximum, and you’ll get something like this:

' INFO : [arnold] 00:00:00  438mb   [rlm] checking connection to license servers ...
' INFO : [arnold] 00:00:05  438mb   [rlm]  5053@STEPHEN-PC ... DOWN
' INFO : [arnold] 00:00:05  438mb   [rlm]  5053@SOLIDANGLE-PC ... UP
' INFO : [arnold] 00:00:05  438mb   [rlm] found 1 license servers
' INFO : [arnold] 00:00:15  438mb   [rlm] checkout of arnold (version 400) from SOLIDANGLE-PC OK
' INFO : [arnold] 00:00:15  438mb   [rlm] expiration date: 31-dec-2013 (190 days left)
  • In Softimage, set the Verbosity to Debug.
  • In Maya, set the Verbosity Level to 6.
  • On the kick command line, specify -v 6.

Creating object mask AOVs that include opacity

$
0
0
  • Create a custom RGB AOV.
  • Use aiWriteColor to write the object mask to the custom AOV. The Input color of the aiWriteColor is the mask color, and you have to enable Blend to get the opacity blended into the Input.
    mask_opacity_aiWriteColor
  • Connect the Out Color of the aiWriteColor to the Color of a Standard shader. That sends the aiWriteColor beauty to the Standard.
    mask_opacity_Nodes
  • Make sure Enable AOV Composition is turned on in the Render Settings.
    EnableAOVComposition

I don’t think this set up works if you plug a Standard into the beauty of the aiWriteColor (eg Standard > aiWriteColor > Standard). With that set of connections, I could never get the opacity right in both the Beauty and the Mask AOVs.


[MacOSX] Setting solidangle_LICENSE

$
0
0

There are several ways you can do it.

  • You can use Maya.env to set the solidangle_LICENSE environment variable.

    In your Maya.env file, add this line:

    solidangle_LICENSE=XXXX@SERVER
    

    where XXXX is the port number, and SERVER is the name or IP address of the computer.

    Maya.env is located in your user Library. For example: /Users/steve/Library/Preferences/Autodesk/maya/2014.

    By default, the Library folder is a hidden folder, so you may need to un-hide the Library folder.

  • You can set solidangle_LICENSE as a system environment variable.
    1. Log in with an Administrator account and run this command to open a text editor.
      sudo nano /etc/launchd.conf
      
    2. Add this line to /etc/launchd.conf:
      setenv solidangle_LICENSE XXXX@SERVER
      
    3. Save the file and exit.
    4. Restart the Mac.

If you don’t want to restart your Mac just yet, you can try setting the environment variable like this (it will last until you restart your machine):

launchctl setenv solidangle_LICENSE XXXX@SERVER

[MtoA] Installing MtoA on Mac OS X

Setting up an ambient occlusion AOV with bump mapping

[Maya] Socket error creating command port

$
0
0

NOTE: This is a Maya issue that can happen with any renderer, including mental ray.

Like many other Maya users, I started getting this error when I tried to batch render:

// Error: line 1: Socket error creating command port SOLIDANGLE-PC:7835 (10048).

I checked the port 7835 with netstat, and that gave me a PID (process ID) of 109736

C:\Program Files\Autodesk\Maya2014\bin>netstat -ano | find "7835"
  TCP    XXX.XXX.XXX.XXX:7835   0.0.0.0:0              LISTENING       109736

But unfortunately, there didn’t seem to be any process with that PID, so I couldn’t kill it to free up the port. tasklist | find “109736″ came up empty; there was no such PID in the Task Manager or Process Explorer; and TCP View said that PID was non-existent.
tcpview_nonexistent
I was resigned to having to reboot my machine until I saw this. Then I used Process Explorer to find the process that was referencing the “non-existent” PID, and when I killed that process, I could batch render again from Maya.
process_explorer_search


Entry point not found

$
0
0

An Entry Point Not Found error message might look rather weird (because you’re looking at the decorated name of a function).
mayabatch_Entry_Point_Not_Found
but usually such an error just means that the wrong version of a DLL (in this case, OpenImageIO.dll) is being loaded by the main program (mayabatch in this case). The problem could be as simple as your PATH pointing to another application that ships a different version of the DLL.

Using Dependency Walker, you can check a DLL to see the decorated names of the functions it exports. But usually you don’t have to dig down to that level a detail. Dependency Walker will show you what version of the DLL is being loaded, and that’s usually enough.
depends_openimageio.dll

[MtoA] Installing MtoA 1.0.0 on Linux

$
0
0

A few notes:

  • You need root permissions to do the automatic installation.
  • Use sudo, not su. You want to install MtoA under your user account, not the root user account. sudo will let you install MtoA with root permissions, but under your own user account.
  • If you install as root, the MtoA installer copies mtoa.mod to /root/maya/2014-x64/modules. Unless you’re running Maya as root, that’s no good. You want the mtoa.mod file in your home directory (for example, /home/stephen/maya/2014-x64/modules). That way, when you run Maya it will load mtoa.mod and find the MtoA plugin.
  • The automatic installation also copies arnoldRenderer.xml to /usr/autodesk/maya2014-x64/bin/rendererDesc. That allows you to batch render with Arnold from Maya, without having to set MAYA_RENDER_DESC_PATH.

[Maya] The case of Xgen and [Error 6] The handle is invalid

$
0
0

This post is about a Maya issue on Window. It’s not an MtoA or Arnold issue.

Whenever I tried to export the selection as an XGen archive, I’d get [Error 6] The handle is invalid.

[Error 6] The handle is invalid
xgmArchiveExportBatchUI.py except block
xgmArchiveExportBatchUI.py call subprocess.Popen
mayapy "C:/Program Files/Autodesk/Maya2014/plug-ins/xgen/scripts/xgenm/xmaya/xgmArchiveExportBatch.py" 0 0 0 1.0 1.0 -destName ["'DragonArchive'"] -destDir ["'C:/Users/SOLIDANGLE/Documents/maya/projects/Support/xgen/archives/'"] -sourceFiles ["'C:/Users/SOLIDANGLE/Documents/maya/projects/Support/scenes/Dragon1.mb'"] -scriptPaths ["'C:/Program Files/Autodesk/Maya2014\\plug-ins\\xgen\\scripts'"] -loadPlugins ["'AbcExport'", "'Mayatomr'", "'xgenMR.py'"]
xgmArchiveExportBatchUI logging to C:/Users/SOLIDANGLE/Documents/maya/projects/Support/xgen/archives/DragonArchive.log

Googling [Error 6] The handle is invalid subprocess.Popen led me to the problem: I was starting Maya from the command line. When I started Maya from the Start menu, then the XGen Export Selection worked.

The reason I start Maya from the command line is because that’s the only way I can get the MtoA diagnostics in the Output Window. So something seems a little weird about how Maya handles STDOUT and STDERR ;)

Installing MtoA on Mac OS X

$
0
0

A quick walk through of how to run the MtoA installer on Mac OS X.

Object color mode

$
0
0

The Arnold Utility shader has an Object color mode, which assigns colors based on shape names. When we say “shapes”, we don’t mean Maya shape nodes; we mean the Arnold shapes.

C:\solidangle\mtoadeploy\2014\bin>kick -nodes | find "shape"
 box                              shape
 cone                             shape
 curves                           shape
 cylinder                         shape
 disk                             shape
 ginstance                        shape
 implicit                         shape
 nurbs                            shape
 plane                            shape
 points                           shape
 polymesh                         shape
 procedural                       shape
 sphere                           shape

All these nodes have a name parameter (for example, polymesh.name) that is a unique string identifier in the Arnold universe. So when you use the Object color mode, you get a unique color for each node.

If you’re using Softimage, note that SItoA puts the frame number into polymesh.name, so you’ll get a different color on each frame if you use the Object color mode. For example, on frame 5 a polymesh might be named “Dog_Mesh.SItoA.5000″, and on frame 6, “Dog_Mesh.SItoA.6000″.

In this render region comparison, you have frame 5 on the left, and frame 6 on the right:
dog_color_mode

In a case like this, you would use the Object ID color mode instead. SItoA automatically assigns unique IDs to the shape nodes (MtoA doesn’t).

Viewing all 53 articles
Browse latest View live