[SItoA] Getting user parameters in the render tree

Arnold nodes can have user-defined parameters, like MyColor in this ASS snippet:

 name grid3.SItoA.1000
# ...
 declare MyColor constant RGBA
 MyColor 0.703999996 0 0.526000023 1

In Softimage, there are a number of ways you can assign data like MyColor to a polygon mesh. You could use ICE:
Or you could use the Arnold User Options property:
To access MyColor in the render tree, use the Color Attribute shader:
If you used ICE, MyColor will appear automatically in the Attribute list. But if you used the User Options property, you’ll have to use a script one-liner to set the Attribute value. That’s because Softimage doesn’t know about the user parameters on Arnold nodes: those come into existence only when SItoA translates the scene to Arnold.

Application.SetValue("Sources.Materials.DefaultLib.Material.Color_Attribute.attribute", "MyColor", "")

On a related note, the MtoA shader userDataColor does the same thing as the SItoA Color Attribute shader: it uses AiUDataGetRGBA() to get a color from a user parameter on the object being shaded. With SItoA 3.0, the Arnold > DLL Shaders menu makes it pretty easy to use an MtoA shader in Softimage.

One thought on “[SItoA] Getting user parameters in the render tree

  1. Im tying to copy Mtoa shaders to Sitoa Bin to get the Mtoa User Data Color working, but no luck so far. Any advice on that?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s