[MtoA] Adding user data to standin instances


The standard way to add user data to an Arnold node is to add an mtoa_constant attribute to the shape node in Maya. MtoA translates the mtoa_constant attributes to user data, so you can use shaders like AiUserDataColor.

Instances in Maya, however, don’t have their own shape node: they all share the shape node of the original object. So you can’t use an mtoa_constant attribute on the shape to get different user data for each instance.

But you can use override sets to get user data on instances. Put the instances in a set, and then add the mtoa_constant as an override attribute.

set_overrides

Then each instance in the set will get that user data.

Another way to add user data to instances is with the particle instancer: you can add per-particle attributes, and then list them in the Arnold > Export Attributes text box. MtoA translates all those attributes to user data on the particle instances.

[HtoA] About instancing


A few quick notes about instancing support in HtoA:

  • For instancing, use the Instance object with fast point instancing. HtoA doesn’t support full point instancing.
  • You can assign material to instances with the shop_materialpath string attribute on the instance points.
  • Fast point instancing supports per-instance user data and instance OBJ property overrides.
  • Light instancing is not supported [yet]. Actually, Arnold itself doesn’t support light instances, but what plugins like MtoA and SItoA do is translate the light instances into duplicates of the light for Arnold.
  • Procedurals (both DSO and ASS) can be instanced.

[MtoA] Instancing lights


If you want to instance lights in Maya, use Duplicate Special. MtoA will correctly translate those instances to Arnold (as copies, not instances, because Arnold itself doesn’t support light instances).

MtoA doesn’t support the particle instancer for lights.

PS I don’t think Maya supports instancing lights with the particle instancer. The Maya docs say “Do not instance lights; they’ll have no effect in rendering.”, and that’s the behavior I’ve observed with mental ray and the Maya Software renderer. Also, if I leave the viewport set to Viewport 2.0, Maya crashes when I try to use the particle instancer with point or spot lights (and that’s without MtoA loaded).