Quantcast
Channel: ArnoldRenderer – Arnold Support Corner
Viewing all 140 articles
Browse latest View live

[RLM] Checking for license denials by the license server

$
0
0

If you’re seeing watermarks on some machines but not on others, there’s usually a simple explanation: those machines cannot connect to the license server. The first thing you should do is check the RLM diagnostics on the license server. In particular, look for the solidangle Statistics, which will show you whether or not licenses are being denied. For example:

solidangle Statistics --- Since Start --- Since Midnight --- Recent ---
    Start time          03/29 18:40:20    04/01 00:00:24   04/01 12:41:30
    Messages:        39398 (   0/sec)   7755 (   0/sec)    20 (   0/sec)
    Connections:      4874 (   0/sec)   1073 (   0/sec)     4 (   0/sec)
    Checkouts:        4844 (   0/sec)   1050 (   0/sec)     3 (   0/sec)
    Denials:             0 (   0/sec)      0 (   0/sec)     0 (   0/sec)
    License removals:    0 (   0/sec)      0 (   0/sec)     0 (   0/sec)

More here…


[SItoA] Understanding the Object color mode of the Utility shader

$
0
0

The Utility shader has an Object color mode that assigns colors to objects based on names. Each shape (for example, a polymesh shape or a curves shape or a box shape) gets a unique color, because each shape has a unique name.

If you’re working with SItoA, you may have noticed that the object color changes with each frame:
utility_color_mode

That’s because SItoA gives shapes names like Elephant.Elephant_Mesh.SItoA.4000, which change with every frame.

MtoA doesn’t use the current frame in shape node names, and neither does HtoA (by default). However, HtoA does provide an option for adding a suffix, like the frame number, to the shape node name.

Adding Arnold licenses to an existing RLM license server

$
0
0

If you’ve already have an RLM license server up and running, it’s easy to add your Arnold license to that server. Just download the Solid Angle RLM package, extract the solidangle.set and solidangle.opt files from the download, and copy them to your RLM folder. Then do a reread/restart of the server to pick up the Arnold licenses.

Just make sure you’re not running an older version of RLM. The Solid Angle license server (solidangle.set) requires RLM v10.1BL2 or later.

RLM is backwards compatible, which means you can always use a newer version of RLM with an older solidangle.set.

But RLM is not forwards compatible. You cannot use an older RLM with a newer solidangle.set. For example, you cannot use the current solidangle.set ISV server with RLM v9.4BL2.

If you use a newer solidangle.set with an older RLM, you’ll see something like this in the RLM log:

08/22 14:23 (rlm) RLM License Server Version 9.4BL2

        Copyright (C) 2006-2012, Reprise Software, Inc. All rights reserved.

08/22 14:23 (rlm) License server started on SOLIDANGLE-PC
08/22 14:23 (rlm) Server architecture: x86_w1
08/22 14:23 (rlm) License files:
08/22 14:23 (rlm)     arnold.lic
08/22 14:23 (rlm)
08/22 14:23 (rlm) Web server starting on port 5054
08/22 14:23 (rlm) Using TCP/IP port 5053
08/22 14:23 (rlm) Starting ISV servers:
08/22 14:23 (rlm)     ... solidangle on port 60008
08/22 14:23 (rlm) New thread created to watch ISV solidangle
(solidangle) Server settings (version 10) incompatible with RLM v9 software
(solidangle) This settings file must be used with RLM v10 (or later) software
08/22 14:23 (rlm)
08/22 14:23 (rlm) solidangle initialization error: 1, not restarting
08/22 14:23 (rlm)
08/22 14:23 (rlm) Server initialization error.
08/22 14:23 (rlm)
08/22 14:23 (rlm) This indicates either:
08/22 14:23 (rlm)  A settings file incompatible with this RLM version
08/22 14:23 (rlm)  - or -
08/22 14:23 (rlm)  The ISV server is built with an incorrect RLM license
08/22 14:23 (rlm)  - or -
08/22 14:23 (rlm)  The ISV server encountered an error processing its options fi
le.
08/22 14:23 (rlm)

[MtoA] Installing the BA shaders in Maya

$
0
0

You can use the BA shaders in Maya with MtoA. The BA shaders are Arnold shaders, so you can use them anywhere that you use Arnold.

Here’s how:

  • Download the Maya mental ray package of the BA shaders. For example, for Maya 2014, the most recent version is
    >>>v25.01.09 Maya 2014 mentalRay
  • Extract the archive. For example, you could extract the archive to a C:\solidangle\BA folder.
  • Set MAYA_SCRIPT_PATH to point to the scripts\AEtemplates folder. For example:
    set MAYA_SCRIPT_PATH=C:\solidangle\BA\140219__baEssential_25.01.09___Maya_2014_MRay\scripts\AETemplates
  • Download the Arnold shaders. For example, for Maya 2014, the most recent version is >>>v25.01.09 Arnold 4.1 (mentalRay addon required for UI)
  • Extract the archive, and set ARNOLD_PLUGIN_PATH to point to the Arnold\win64 folder. For example:
    set ARNOLD_PLUGIN_PATH=C:\solidangle\BA\140219__baEssential_25.01.09___All_Arnold_4_1_3\Arnold\win64
  • Start Maya. The BA shaders should be available, and the AE should look “nice” for the BA shaders.

[RLM] [Windows] Putting the SolidAngle debug log into append mode

$
0
0

I like the log to be in append mode so it isn’t overwritten every time the license server restarts. This is especially handy for troubleshooting license server problems (otherwise, you lose information that might explain the problem when you restart the server).

You’ll need to Run as administrator when you open a command prompt for this.

First, add a plus sign (+) to the log file name (you can use sc qc to query the config and get the current binPath, or you could just look it up in the Services console).

sc config "RLM SolidAngle" binPath= "C:\Program Files\RLM\rlm.exe -dlog \"+C:\Program Files\RLM\solidangle.log\" -service"
[SC] ChangeServiceConfig SUCCESS

Then restart the service. You could also do this in the Services console.

C:\Windows\system32>sc stop "RLM SolidAngle"

SERVICE_NAME: RLM SolidAngle
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 1  STOPPED
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

C:\Windows\system32>sc start "RLM SolidAngle"

SERVICE_NAME: RLM SolidAngle
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 2  START_PENDING
                                (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x1388
        PID                : 9008
        FLAGS              :

And finally, check that it really started:

C:\Windows\system32>sc query “RLM SolidAngle”

SERVICE_NAME: RLM SolidAngle
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

[MtoA] One mtoa.mod to rule them all

$
0
0

After a few tries, I got one mtoa.mod file that works for multiple Maya versions:

+ MAYAVERSION:2015 mtoa any C:\solidangle\mtoadeploy\2015
PATH +:= bin
+ MAYAVERSION:2014 mtoa any C:\solidangle\mtoadeploy\2014
PATH +:= bin
+ MAYAVERSION:2013 mtoa any C:\solidangle\mtoadeploy\2013
PATH +:= bin

I had to repeat the PATH line for each module, otherwise the bin folder wasn’t added to the PATH.

I just had to set MAYA_MODULE_PATH to point to this mtoa.mod file, and then I could load MtoA in Maya 2013, 2014, and 2015.

This could be useful if you have multiple users sharing a single machine, because with this mtoa.mod, you don’t have to worry about putting version-specific mtoa.mod files in every user’s Maya folder (by default, the MtoA installer puts mtoa.mod in the user’s $MAYA_APP_DIR\\modules\\<version> folders).

Another way to do it would to be put the mtoa.mod files in the default shared modules folders. For example, on Windows:

C:\Program Files\Common Files\Autodesk Shared\Modules\Maya\2013
C:\Program Files\Common Files\Autodesk Shared\Modules\Maya\2014
C:\Program Files\Common Files\Autodesk Shared\Modules\Maya\2015

On Linux:

/usr/autodesk/modules/maya/<version>

On Mac OS X:

/Users/Shared/Autodesk/maya/<version> for MacOS

[MtoA] [MacOSX] Rendering a sequence

$
0
0

Here’s a question submitted through solidangle.com: how do I render a sequence of frames with Maya on Mac OS X?

The answer is: the same way you would a sequence of frames with mental ray in Maya.

In Maya:

From the command line:

  • Open a Maya Terminal, either through Spotlight or in Finder (/Applications/Autodesk/maya2015/Maya Terminal.term)

    Using a Maya Terminal means that the PATH already includes the location of the Maya command-line renderer.

  • In the terminal, use the Render command to render the sequence. For example:
    Render -r arnold -s 1 -e 10 -proj /Users/stephen/MyProject /Users/stephen/MyProject/scenes/arnold.mb
    

If Arnold is the renderer specified in the saved scene file, you can omit -r arnold from the Render command.

Run the command Render -help -r arnold to print the help for the Arnold-specific render flags.

[MtoA] The case of the scene that crashed Maya

$
0
0

In this case, Maya crashed as soon as you loaded a certain scene.

What was the problem? Yeti couldn’t get a license, and then when MtoA loaded the Yeti procedural, that was it: crash.

We found the problem by checking the Maya log that we got with the -log command-line flag:

maya.exe -log %TEMP%\maya.log

The solution was to set RLM_LICENSE so Yeti could get its license (or unset MTOA_EXTENSIONS_PATH so that the Yeti extension wasn’t loaded, or move the Yeti module file so Maya wouldn’t find it).

This is what we saw in the log:

[Wed Nov 05 18:08:13 2014] Yeti 1.3.14: Yeti v1.3.14, built on Oct 10 2014 at 20:52:13
[Wed Nov 05 18:08:13 2014] Yeti 1.3.14: (c) 2010-Present Peregrine Labs a division of Peregrine Visual Storytelling Ltd. All rights reserved.
[Wed Nov 05 18:08:13 2014] Yeti 1.3.14: ERROR pgLicenseCheck - License system could not get a valid server handle, error: Can't read license data (-102)
No such process (errno: 3)
00:00:00 WARNING | [mtoa] Extension pgYetiArnoldMtoa(C:/solidangle/yeti/Yeti-v1.3.14_Maya2014-windows64/plug-ins/pgYetiArnoldMtoa.dll) requires Maya plugin pgYetiMaya, registering will be deferred until plugin is loaded.
the data object was unable to read its value : (0) no error
the data object was unable to read its value : (0) no error

****
* Arnold 4.2.2.0 windows icc-14.0.2 oiio-1.4.14 rlm-11.1.2 2014/11/03 15:27:54
* CRASHED in QResource::locale 
* signal caught: error C0000005 -- access violation
*
* backtrace:
*  0 0x000000002c8b7a20 [ai            ] AiArray                                           
*  1 0x000000002c8b9f80 [ai            ] AiArray                                           
*  2 0x000000007722b940 [kernel32      ] UnhandledExceptionFilter                          
*  3 0x0000000077343398 [ntdll         ] MD5Final                                          
*  4 0x00000000772c85c8 [ntdll         ] _C_specific_handler                               
*  5 0x00000000772d9d2d [ntdll         ] RtlDecodePointer                                  
*  6 0x00000000772c91cf [ntdll         ] RtlUnwindEx                                       
*  7 0x0000000077301248 [ntdll         ] KiUserExceptionDispatcher                         
>> 8 0x0000000067840147 [QtCore4       ] QResource::locale    
...
...and so on and so on...

[MtoA] Using set overrides to assign Arnold IDs to groups of mesh shapes

$
0
0

Arnold shapes have an id parameter that you can use to set up custom ID AOVs.

kick -info polymesh.id
node: polymesh
param: id
type: INT
default: 0

For example, you can Object ID color mode of the Utility shader to generate an ID AOV.

MtoA doesn’t automatically generate IDs, so you need to use the User Options parameter on the shapes to assign IDs.

If you want to give a group of polygon meshes the same ID, so that they all get the same Object ID color, then you can use override sets.
override_sets

Example: Three sets, each set with an override of User Options that sets the polymesh.id parameter
override_sets_example

In Softimage, SItoA does generate IDs, and you can override them using groups and a branch-applied Arnold User Options property.
sitoa_override_sets

[RLM] [Arnold] Troubleshooting watermarks and license problems

$
0
0

If a workstation or render node can’t get a license, you can use the Arnold log to find out what’s happening. If you set the log verbosity to debug, you can see where Arnold is trying to find a license server, whether or not Arnold can connect, and whether Arnold is being refused a license.

First, let’s look at what success looks like:

00:00:00   703MB         | [rlm] checking connection to license servers ...
00:00:00   703MB         | [rlm]  5053@StephenBlair-PC ... UP
00:00:00   703MB         | [rlm] checkout of "arnold 20140917" from StephenBlair-PC in 0:00.01
00:00:00   703MB         | [rlm] expiration date: 31-dec-2016 (768 days left)

These log entries tell me that solidangle_LICENSE (or RLM_LICENSE) is set to “5053@StephenBlair-PC” and that Arnold was able to get a license. I know that solidangle_LICENSE is set because the log entry says “license servers” (plural). If solidangle_LICENSE isn’t set, there’s just one license server to check: the default 5053@localhost.

For example, if you’re running on the same machine as the license server, you might see something like this:

00:00:00    11MB         | [rlm] checking connection to license server on 5053@localhost ...
00:00:00    13MB         | [rlm] checkout of "arnold 20141103" from localhost in 0:00.02
00:00:00    13MB         | [rlm] expiration date: 31-dec-2016 (761 days left)

So, if solidangle_LICENSE isn’t set, then on a workstation or render node you’d see this in the log:

00:00:00   784MB         | [rlm] checking connection to license server on 5053@localhost ...
00:00:05   784MB WARNING | [rlm] could not connect to license server on 5053@localhost

Note the Arnold checks just one license server: 5053@localhost. If solidangle_LICENSE is set, Arnold will check at least two license servers.

If solidangle_LICENSE is set, but Arnold cannot reach the specified server, you’d see this:

00:00:00   751MB         | [rlm] checking connection to license servers ...
00:00:05   751MB         | [rlm]  5053@null ... DOWN
00:00:10   751MB         | [rlm]  5053@localhost ... DOWN
00:00:10   751MB WARNING | [rlm] could not connect to any license server

If the RLM server is up and reachable, but the solidangle ISV server is down, then you’d see this:

00:00:00   745MB         | [rlm] checking connection to license servers ...
00:00:00   745MB         | [rlm]  5053@StephenBlair-PC ... UP
00:00:03   745MB WARNING | [rlm] error checking out license for arnold (version 20140917):
00:00:03   745MB WARNING | [rlm]  * Communications error with license server (-17)
00:00:03   745MB WARNING | [rlm]  * Connection refused at server (-111

The RLM server is the main RLM service that manages all the ISV servers. The ISV servers serve licenses for specific software packages, like solidangle, foundry, or exocortex.

If there are no licenses available:

00:00:00   745MB         | [rlm] checking connection to license servers ...
00:00:00   745MB         | [rlm]  5053@StephenBlair-PC ... UP
00:00:00   745MB WARNING | [rlm] error checking out license for arnold (version 20141103):
00:00:00   745MB WARNING | [rlm]  * All licenses in use (-22)

If the licenses don’t support the newer version of Arnold you’re trying to use:

00:00:00    11MB         | [rlm] checking connection to license server on 5053@localhost ...
00:00:00    13MB WARNING | [rlm] wrong license version for "arnold 20141103", found 1 license for "arnold 20140701"
00:00:00    13MB WARNING | [rlm] your maintenance expired on 2014/07/01, please contact licensing@solidangle.com

If the licenses are expired:

00:00:00   745MB         | [rlm] checking connection to license servers ...
00:00:00   745MB         | [rlm]  5053@StephenBlair-PC ... UP
00:00:00   745MB WARNING | [rlm] could not find any license for "arnold 20141103", the license may be expired

[Arnold] [Python] Changing Arnold options in Python

$
0
0

The global render settings are stored in the options node, which you can get with AiUniverseGetOptions(). If the universe isn’t active (you are not inside an AiBegin() / AiEnd() block so the scene doesn’t exist yet), AiUniverseGetOptions() returns None.

Once you have the options node, you can load options from an ASS file, or you can update it with the node parameter setters such as AiNodeSetInt(). The way kick, and pykick, work is that they load the ASS file first, with its options, and then update the options node with the values from the command line.

from arnold import *
import os

AiBegin()

AiMsgSetConsoleFlags(AI_LOG_ALL)

# Get the default options
options = AiUniverseGetOptions()

AiLoadPlugins( os.getenv( 'ARNOLD_PLUGIN_PATH' ) )

AiASSLoad("C:/Users/Support/project/scenes/test_640x480.ass", AI_NODE_ALL)

# Render using options loaded from the ASS file
AiRender()

# Change options and render with the changes
AiNodeSetInt(options, 'xres', 320)
AiRender()

# Load options and use them to render
AiASSLoad("C:/Users/Support/project/scenes/test_960x540.ass.gz", AI_NODE_OPTIONS)
AiRender()

AiEnd()

[MtoA] [SItoA] Setting multiple Arnold parameters with a User Options string

$
0
0

mtoa_user_options
If you want to set multiple Arnold parameters in a User Options string, you can use any whitespace (spaces, tabs, newlines eg \n) that you would use in an actual ASS file.

For example, this:

enable_procedural_cache off error_color_bad_pixel 1 .25 1 declare test constant FLOAT test 2

would add these lines to your options node:

options
{
 error_color_bad_pixel 1 0.25 1

 enable_procedural_cache off

 declare test constant FLOAT
 test 2

Note: Plugins like MtoA and SItoA use AiNodeSetAttributes to set the user options.

The User Options string is a way to set parameters that are not exposed by the plugins. MtoA provides a User Options string for the render options and for shapes. SItoA also has User Options strings for render options and shapes.

Getting an Arnold log from Royal Render

$
0
0

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

[MtoA] Mapping textures to Yeti hair

$
0
0

Like MtoA, Yeti exports UV coordinates in the uparamcoord and vparamcoord parameters, and you use these to map textures in the aiHair shader with the Uparam and Vparam extra attributes.
yet_uv_3

For example, if you plug a texture into the Rootcolor and tipcolor
yet_uv_2
then you can use uparamcoord and vparamcoord to map that texture onto the hair:
yet_uv_1

Tip If you enable Expand Procedurals and export an ASS file, you can see what parametes Yeti exports:

### created by pgYetiMayaShape
curves
{
 name pgYetiMayaShape_|pgYetiMaya|pgYetiMayaShape|scatter01_pSphereShape1_grow01
 num_points 621 1 b85UINT
# ...
 points 4347 1 b85POINT
# ...
 basis "catmull-rom"
 mode "ribbon"
 min_pixel_width 0
 visibility 255
 self_shadows on
 matrix
 1 0 0 0
 0 1 0 0
 0 0 1 0
 0 0 0 1
 shader "initialShadingGroup"
 opaque on
 id -1230660816
 declare curve_id uniform UINT
 curve_id 621 1 b85UINT
# ...
 declare uparamcoord uniform FLOAT
 uparamcoord 621 1 b85FLOAT
# ...
 declare vparamcoord uniform FLOAT
 vparamcoord 621 1 b85FLOAT
# ...
 declare surf_s uniform FLOAT
 surf_s 621 1 b85FLOAT
# ...
 declare surf_t uniform FLOAT
 surf_t 621 1 b85FLOAT
# ...
 declare length uniform FLOAT
 length 621 1 b85FLOAT
# ...
 declare fur_id uniform FLOAT
 fur_id 621 1 b85FLOAT
# ...
 declare surf_n uniform VECTOR
 surf_n 621 1 b85VECTOR
# ...
 declare filename constant STRING
 filename "C:/Users/StephenBlair/Documents/maya/projects/Support//yeti/tmp/yeti_combExample_pgYetiMayaShape_1886244453_1.fur"
 declare mtoa_shading_groups constant ARRAY NODE
 mtoa_shading_groups "initialShadingGroup"
 declare frame constant INT
 frame 1
 declare verbosity constant INT
 verbosity 1
 declare density constant FLOAT
 density 10
 declare width constant FLOAT
 width 1
 declare threads constant INT
 threads 0
 declare min_pixel_width constant FLOAT
 min_pixel_width 0
 declare mode constant INT
 mode 0
 declare imageSearchPath constant STRING
 imageSearchPath ""
 declare samples constant ARRAY FLOAT
 samples 1
}

[MtoA] Getting Deadline to pick up environment variable changes

$
0
0

Here’s why new environment variable settings (like, say, a new solidangle_LICENSE setting) are not always picked up by Deadline:

procmon_deadline_child_processes

Deadline Slave and MayaBatch are child processes of Deadline Launcher, and so they inherit their environment from their parent process (deadlinelauncherservice). If you don’t restart the Launcher, it won’t have the new environment, and neither will child processes like the Monitor or MayaBatch. Restarting the service will restart the child processes too.

deadlinelauncherservice_restart

However, if you didn’t install the Launcher as a service, it is slightly more complicated. When you exit and restart the Launcher, the child processes may end up as “orphans” with the same old environment, and you’ll have to restart them too. In the screenshot below, Deadline Monitor and Deadline Slave were child processes of Launcher, but when I exited Launcher they kept running.

procmon_orphans


[Arnold] [kick] Changing output paths for AOVs

$
0
0

The -o flag changes the output path for the beauty AOV only. For other AOVs, kick still uses the output paths specified in the ASS file (the AOV output paths are specified by the filename parameter of the driver nodes in an ASS file).

driver_exr
{
 name defaultArnoldDriver@driver_exr.RGBA.direct_diffuse
 filename "C:/Users/StephenBlair/Documents/maya/projects/Support/images/direct_diffuse/Natural_Museum.exr"
 compression "zip"
 half_precision off
 tiled off
 preserve_layer_name off
 autocrop off
 append off
}

It is possible, however, to use kick -set to change the output path and file name of specific AOVs, but you’d have to know the AOV names in advance. For example:

kick -set defaultArnoldDriver@driver_exr.RGBA.direct_diffuse.filename "C:/temp/direct_diffuse.exr" -i example.ass

[MtoA] The case of the instant crash when I load MtoA

$
0
0

In this case, Maya 2015 (Windows) disappeared a few seconds after I clicked the MtoA Loaded check box in the Plug-in Manager. Eventually I tracked it down to this line in my pluginPrefs.mel:

evalDeferred("autoLoadPlugin(\"\", \"PolyTools\", \"PolyTools\")");

Darn you PolyTools, I forgot about you ;) There’s some kind of conflict between PolyTools (from the Maya BonusTools) and MtoA.

I tracked this down the hard way, by renaming my 2015 MAYA_APP_DIR to 2015-x64.bak and starting over with the default preferences, and then comparing the two.

An easier way (on Windows) would have been to use MTOA_STARTUP_LOG_VERBOSITY along with the -log command-line flag (for example, maya -log %TEMP%\mayastartup.log), which would have given me this:

****
* Arnold 4.2.4.0.wip windows icc-13.1.3 oiio-1.4.14 rlm-11.1.2 2015/01/23 16:50:01
* CRASHED in Tstring::formatToWidth at 00:00:00, pixel (0, 0)
* signal caught: error C0000005 -- access violation
*
* backtrace:
*  0 0x0000000045476700 [ai            ] AiArray                                                                                                                                                                               
*  1 0x0000000045477eff [ai            ] AiArray                                                                                                                                                                               
*  2 0x00000000773cb940 [kernel32      ] UnhandledExceptionFilter                                                                                                                                                              
*  3 0x00000000774e3398 [ntdll         ] MD5Final                                                                                                                                                                              
*  4 0x00000000774685c8 [ntdll         ] _C_specific_handler                                                                                                                                                                   
*  5 0x0000000077479d2d [ntdll         ] RtlDecodePointer                                                                                                                                                                      
*  6 0x00000000774691cf [ntdll         ] RtlUnwindEx                                                                                                                                                                           
*  7 0x00000000774a1248 [ntdll         ] KiUserExceptionDispatcher                                                                                                                                                             
>> 8 0x000007fee46eeb05 [FOUNDATION    ] Tstring::formatToWidth                                                                                                                                                                
*  9 0x000007fee46efff5 [FOUNDATION    ] Tstring::set                                                                                                                                                                          
* 10 0x000007febe593e9c [PolyTools     ] uninitializePlugin                                                                                                                                                                    
* 11 0x000007febe593feb [PolyTools     ] uninitializePlugin                   
...

Running multiple Arnold instances on the same computer

$
0
0

Arnold licenses are shared by host. That means all Arnold instances running on the same computer share the same license.

For example, you can have multiple copies of Houdini running on your computer, all doing render regions with HtoA, and you’ll be taking just a single Arnold license. Same thing with Softimage and Maya.

License sharing is defined by your license. The share=h in your license means that all processes (aka instances) running on the same host (aka computer) can share a single license.
license_file_share

Even when licenses are shared, you will still see multiple checkouts in your license usage. For example, here’s my license usage when I have an IPR going in Maya, and render regions in Softimage and Houdini:
share_license_usage
The debug log would show something similar:
share_debug_log
It might look like there are three licenses checked out, but it’s not. It’s just one license, checked out three times (aka shared three times).

If I check my license pool status, I can see that one license is in use:
share_license_pool_status

And if you have reporting enabled, you can check the report and see that all three licenses have the same share handle (which means that the license is being shared):
share_report_log

The case of the missing PyMel debug log file

$
0
0

In several recent cases, I had to figure out why MtoA wouldn’t load on a render farm. The root cause turned out to be the PyMel debug log: ~/pymel.log

If PyMel cannot find or open ~/pymel.log, that stops PyMel and anything that uses PyMel (like MtoA).

On a render farm, this can happen if the render manager user account doesn’t have a home folder, ~/pymel.log doesn’t expand to a valid location, or if user doesn’t have read-write permissions on pymel.log.

For example, here’s the Process Monitor log when ~ cannot be resolved:
pymel.log.2
And here’s the log when the user doesn’t have read-write permissions:
pymel.log
The location of pymel.log is specified by the pymel.conf configuration file, like this:

os.path.expanduser('~/pymel.log')

When there’s a problem with the PyMel debug log, it can be hard to tell from the MtoA errors. You may see API errors like this (but the line numbers all point to unrelated bits of source code). However, if you see these line numbers with the MtoA 1.x, it’s probably a pymel.log problem.

API error detected in plugins\mtoa\Main.cpp at line 794
: (kFailure): Unexpected Internal Failure
00:00:00   514MB ERROR   | Failed to register renderer 'arnold'

API error detected in plugins\mtoa\Main.cpp at line 716
: (kFailure): Unexpected Internal Failure
00:00:00   514MB ERROR   | Failed to register Arnold swatch renderer

API error detected in plugins\mtoa\Main.cpp at line 716
: (kFailure): Unexpected Internal Failure
00:00:00   515MB ERROR   | Failed to register Arnold swatch renderer

You might also see errors like this:

API error detected in plugins/mtoa/Main.cpp at line 794
: (kFailure): Unexpected Internal Failure
Error: line 1: IOError: file /Applications/Autodesk/maya2015/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.7/logging/__init__.py line 916: 13
Error: line 1: Failed to register renderer 'arnold'
Error: line 1: initializePlugin function failed (mtoa)

The case of the “cannot remove alias” RuntimeError

$
0
0

In this case, mayabatch reported some runtime errors when loading a certain scene:

# Traceback (most recent call last):
#   File "C:\solidangle\mtoadeploy\2015\scripts\mtoa\callbacks.py", line 415, in deferredCallback
#     func(*args, **kwargs)
#   File "C:\solidangle\mtoadeploy\2015\scripts\mtoa\aovs.py", line 471, in createAliases
#     pm.aliasAttr(sg + '.ai_aov_' + name, remove=True)
#   File "C:\Program Files\Autodesk\maya2015\Python\lib\site-packages\pymel\internal\pmcmds.py", line 134, in wrappedCmd
#     res = new_cmd(*new_args, **new_kwargs)
# # RuntimeError: 'aiStandardSG.ai_aov_direct_specular' is not a unique name.  Cannot remove alias.

Now, even though I have the advantage of access to the MtoA source code, the problem remained: how do I fix the scene and stop these errors? To find a solution (and understand the problem) I had to resort to examining the Maya ASCII version of the scene.

The “fix” was to clear the AOV names on the shadingEngine node:

setAttr "aiStandardSG.aovs[0].aov_name" -type "string" ""; 
setAttr "aiStandardSG.aovs[1].aov_name" -type "string" ""; 
setAttr "aiStandardSG.aovs[2].aov_name" -type "string" ""; 

The problem is that the shadingEngine node has some named custom AOVs, but no corresponding “attribute alias” list. So the AOV name couldn’t be found in the alias list, which in the error message came out as “not a unique name”.

In the Maya ASCII version of the problem scene, I saw this:

createNode shadingEngine -n "aiStandardSG"; 
	addAttr -ci true -h true -sn "aal" -ln "attributeAliasList" -dt "attributeAlias"; 
	setAttr -s 4 ".aovs"; 
	setAttr ".aovs[0].aov_name" -type "string" "direct_diffuse";
	setAttr ".aovs[1].aov_name" -type "string" "direct_specular";
	setAttr ".aovs[2].aov_name" -type "string" "indirect_diffuse";
	setAttr ".aovs[3].aov_name" -type "string" "indirect_specular";

instead of this:

createNode shadingEngine -n "aiStandard1SG";
	addAttr -ci true -h true -sn "aal" -ln "attributeAliasList" -dt "attributeAlias";
	setAttr ".ihi" 0;
	setAttr ".ro" yes;
	setAttr -s 4 ".aovs";
	setAttr ".aovs[0].aov_name" -type "string" "direct_diffuse";
	setAttr ".aovs[1].aov_name" -type "string" "direct_specular";
	setAttr ".aovs[2].aov_name" -type "string" "indirect_diffuse";
	setAttr ".aovs[3].aov_name" -type "string" "indirect_specular";
	setAttr ".aal" -type "attributeAlias" {"ai_aov_direct_diffuse","aiCustomAOVs[0]",
			"ai_aov_direct_specular","aiCustomAOVs[1]",
			"ai_aov_indirect_diffuse","aiCustomAOVs[2]",
			"ai_aov_indirect_specular","aiCustomAOVs[3]"} ;

I don’t know how the user managed to get the scene into that state ;)

Viewing all 140 articles
Browse latest View live