|On this page|
The Material node assigns a material to a list or group of primitives (faces) or points.
This node lets you override individual parameters on the material, allowing you to apply per-primitive customizations of a base material (see the help for the Local parameters option below).
Under the hood, the node either creates attributes named
shop_materialpath (setting it to the pathname of the material) and
material_override (if any Local overrides are set), or a
material_stylesheet attribute if Create style sheet attribute is enabled. Mantra uses all of these attributes, but the scene viewer only supports
The level at which to assign the materials. You should usually leave this set to Primitive attributes.
Assign the material at the point level instead of the primitive (face) level. This is only useful for point instancing. The objects instanced to the points will pick up the material assigned to the point.
Assign the material at the primitive (face) level. This is the default and the normal setting.
Assign the material at the detail (entire geometry) level. Unless you are creating a material style sheet attribute, this is not normally useful and you should not use this setting unless you're doing something custom and weird. When used with the creation of a material style sheet attribute, this option causes all the material assignments and overrides in this SOP to be combined into a single style sheet stored in a detail attribute. The Group fields are stored directly into the style sheet targeting information to be evaluated by mantra at render time.
Create style sheet attribute
material_stylesheet attribute instead of
material_override attributes. The style sheet attribute will contain a material style sheet that describes the requested shading to be applied to the points, primitives, or the whole detail.
Number of materials
The number of materials to assign. This is useful for assigning materials to various groups of primitives. You cannot layer materials – if you assign multiple materials to the same primitive, the last material will override the previous ones.
The node creates tabs for the Number of materials you set. To insert an additional material, click the Add button. To remove a material, click its tab, then click the Delete button.
A list of primitives (or points, if Attributes is set to Point attributes), or the name of a group, to assign the material to.
The path of the material to assign. Click the chooser icon to choose the material from a list.
Overrides use local variables
Turn this on if:
You are using local parameters (such as
$PT) to override parameters on the material (see below).
You need to use local variables in the values of the local parameter overrides.
Controls the number of local overrides of parameters on the material. This lets you make local changes to the parameters of the material that only apply to the selected primitives.
To set up an override:
Click the Add button next to the Local parameters number to add overrides.
If you already have an override, you can also click the Add button next to it.
Use the Choose parameter menu to choose which parameter on the material you want to override.
Use the Integer, Float, String, Color, or Vector fields (depending on the type of parameter you're overriding) to set the value of the overridden parameter.
To remove an override, click the Delete button next to it.
The following examples include this node.