Rayswitching shadow rays

The ray_switch node lets you evaluate different shading trees for different ray types. In general, it’s used to provide a simpler shading tree for secondary rays, such as diffuse, glossy, or shadow rays. So when a camera ray hits the object, you can do one thing, but when a secondary ray hits the object, you can do another, simpler thing 🙂

For shadow rays, it’s not the color that matters, but whether the object blocks the shadow ray from a light. For example, if an object is opaque, then it doesn’t matter whether ray_switch returns red or blue or green or yellow for the shadow rays: the object is still opaque and blocking the light. So, you could use a ray_switch.shadow to plug in a simple standard shader that provides just the opacity mask.


[Maya] Socket error creating command port

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              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.
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.

Texture search paths

With Arnold there are two things in an ASS file that specify the location of a texture file:

  • The texture filename, which can be an absolute or relative path.
  • The texture_searchpath in the render options. The texture_searchpath is used only if the texture filename is a relative path (for example: “sourceimages/example.tiff”.
  • For example, if the texture filename was a relative path, you might have something like this in an ASS file:

     texture_searchpath "//server/projects/test"
     filename "sourceimages/noicon.png"

    Using gobos instead of IES lighting profiles

    Arnold 4.0.16 added photometric lights, which can use IES light profiles.

    Arnold does not support IES lighting profiles [generally, IES profiles are not used a lot in film/VFX work]. Most of the time, you can do what an IES light does by using an appropriate gobo (aka a slide projector). For example, SHED used gobo lighting in place of IES on their recent IGA Aide Gourmet spot.

    SHED created their own gobo filters to create a similar look to IES lights

    [MtoA] Using standins to load animation sequences

    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.

    Day 2 at FMX: The allure of Arnold

    fxguide quick takes

    It was only in a small-ish room but the hustle and bustle outside the Solid Angle Arnold workshop showed just how much buzz this renderer has. In the session, Solid Angle founder Marcos Fajardo detailed the growth of his company (now more than 20 people) and promised a new website (traditionally a rendering formula) and that they would be ‘more open’.

    More at fxguide

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

    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

    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.

    [SItoA] Unlimited batch rendering with xsibatch -processing

    Hat tip: Andy Jones on the Softimage mailing list

    You can use xsibatch -processing to render scenes with Arnold. With -processing, xsibatch uses a Processing token instead of a Batch license, so you’re not limited by the number of Batch licenses you happen to have. Back in the days before third-party renderers, -processing for was for non-rendering tasks. Now it’s for non-mental ray tasks!

    I was sure I tested this long ago, but obviously I must have made a mistake on my command line.

     xsibatch -processing -render //server/project/Scenes/example.scn
     Autodesk Softimage
    License information: using [Processing]
    # INFO : [sitoa] SItoA 2.7.1 win loaded.
    # INFO : [sitoa] Arnold detected.

    Here’s actual proof in the form of a screenshot 🙂