Collections serve two purposes: you can populate layers with collections; or, you can group nodes into a collection and override an attribute on all of these nodes in one step. You can populate your collection by providing an expression, by selecting nodes from the viewport or Outliner, or by a combination of both.
Collections allow you to easily manage data changes in complex scenes.
Create collections to group nodes based on the attributes you want to override in your scene. Create collections also to group nodes so that you can control their visibility simultaneously.
When you add nodes to a collection using an expression, all nodes with names that match the expression are automatically included. This expression can be reapplied to dynamically adapt to changes in the scene. See Dynamically update your render setup when your scene updates and Create overrides for a collection in your render layer.
You can add objects to a collection, or you can add nodes to your collection; for example, shading nodes, texture nodes, and so forth. For more information regarding node types, see Node types.
You can create one or more collections in a render layer. See Create a render layer.
To control the visibility of collections, you can enable/disable them so that only enabled collections contribute to the scene and are visible. You can also isolate select collections so that only that those collections are visible in the viewport. This feature enables you to control the visibility of multiple objects with a minimal number of steps. See Control visibility of collections and Show an isolated subset of collections in the viewport.
Collections are interpreted top-down. Lower collections have precedence over higher ones, both in terms of visibility and application of overrides. See Control visibility of collections and Order of application of overrides. Collections can be re-ordered in the Render Setup editor by middle-mouse dragging and dropping.
To create a collection, right-click your render layer and select Create Collection.
Select a collection and its attributes appear in the Property Editor. You can add nodes to your collection by doing any of the following:
You can add the same object to more than one collection.
Use a wildcard in your expression to include nodes in your collection; for example, building* to include all nodes with names starting with building. All wildcard characters supported by the ls command can also be used in this expression.
Expressions are case sensitive; for example, *cushion* is not the same as *Cushion*.
In this example, the expression Mesh_K* includes all of Killamari's body, eyes and eyes glass in the collection.
You can use expressions and wildcards to include nodes with namespaces in their names. Use a wildcard for each namespace.
For example:
This expression selects all nodes in the namespace called livingRoom_substances. An example would be: livingRoom_substances:greenapple4.
livingRoom_substances:*
This one also selects nodes in that namespace, but only those whose names begin with a c. An example would be: livingRoom_substances:couchB.
livingRoom_substances:c*
However, it would not match an object such as livingRoom_substances:chairB_v08:chairB. In this case, you must use:
livingRoom_substances:*:c*
This third expression matches nodes with two nested namespaces. The first namespace is livingRoom_substances, the second namespace can be anything, and the node name must begin with a c, for example:
Use | to represent a hierarchy; for example, the following expression means that Mesh_All is the parent of LOD0, which is the parent of the nodes with Mesh_K in their names.
|Mesh_All|LOD0|*Mesh_K*
You can also use a wildcard to represent the hierarchy; for example, this pattern:
aTransform|*|aShape
Will match all of the following:
|aTransform|WildMiddle|aShape |aTransform|Something|aShape |A|Starting|Path|aTransform|SomethingElse|aShape |Another|Path|aTransform|OutOfNameIdeas|aShape
In other words, all aShape nodes that are grandchildren of aTransform are included, regardless of whether aTransform starts at the root.
This expression represents both a hierarchy and a namespace. All nodes with names beginning with a c that belong to the set namespace, and that are children of the parent node in the set namespace are included:
|set:parent|set:c*
You can combine multiple expressions by separating them with a comma, semi-colon, or whitespace. For example, the following expressions combined allow you to include both livingRoom_substances:couchB and livingRoom_substances:chairB_v08:chairB.
livingRoom*:c*; livingRoom*:*:ch*;
To use an expression to exclude nodes, start the expression with a -. Continuing the example above, the following expression subtracts the cushion nodes from the members included in the first two expressions.
livingRoom*:c*; livingRoom*:*:ch*; -livingRoom*:*cushion* -livingRoom*:*:*cushion*
Remember that expressions are case sensitive; therefore, if you do not spell cushions and Cushions consistently in your scene, you may need to use two exclude expressions; for example:
livingRoom*:c*; livingRoom*:*:ch*; -livingRoom*:*cushion* -livingRoom*:*:*cushion* -livingRoom*:*Cushion* -livingRoom*:*:*Cushion*
Order of expressions is important. Expressions are interpreted from left to right, and you can re-add nodes that you have previously subtracted. Continuing the example above, the following expression re-adds the right cushion (and only the right cushion among all cushions) back to the collection:
livingRoom*:c*; livingRoom*:*:ch*; -livingRoom*:*cushion* -livingRoom*:*:*cushion* -livingRoom*:*Cushion* -livingRoom*:*:*Cushion* livingRoom*:*cushion_right*
Exclude using expressions is not supported for nodes within a hierarchy if Include Hierarchy is required to populate a collection.
For example, if you declare myGr* as an expression, then enable Include Hierarchy to add the myGroup node and its children to the collection, and pCylinder1 is a child of myGroup, you cannot use myGr* -pC* to exclude pCube1 from your collection.
Workaround: Add the nodes you want to exclude to a separate collection and create an override to disable the visibility. Note, however, that this may impact performance.
You can add members to your collection statically (by explicitly selecting nodes and adding them) instead of dynamically (using an expression, as described above). To do so, middle-mouse drag and drop nodes from the Outliner to the Property Editor. Alternatively, you can select the nodes in the Outliner and click Add in the Property Editor.
If you have included an expression as well as manually added a list of nodes, your collection will include both the nodes that match your expression and the nodes you list.
If you populate a collection using this method, you should exercise caution when reparenting your nodes. If you add a node to your collection, then later reparent it from one root node to another root node, you may lose this node from the collection. A | is used to denote the hierarchy of each node. For example |group1|group2|group3 denotes that group3 is the child of group2 which is the child of group1. If you add group3 to a collection, then later move group3 to be a child of group4, group3 will no longer remain a member of that collection. See Identify missing members in a collection for information on how to identify missing nodes in a collection.
Enable the Include Hierarchy option to traverse the children of a group or parent node. Add a group or parent node to the collection, and both the parent and its children are added to the collection. Use this feature in combination with the Collection Filters to easily populate the collection with members of your choice. See Add collection members by node type.
This feature is very useful for adding shaders to a collection, and you can simply select a character in the viewport, then click Add in the collection Property Editor to override its shader attributes. See Create a collection of shaders.
If your collection has an override applied, this override will be applied to all child nodes of your parent node that match the filter type.
One easy way to identify the nodes that belong to your collection is to enable the Render Setup Filter in the Outliner (Display > Render Setup Filter), then select from among the available filter options, for example, Inside Selected Layers. Select your collection, and the Outliner is streamlined to display only the collection members.
Declaring an expression at the root level is not recommended when adding your parent node, as it may increase processing time. Precision with declaring your expression (by using a | to denote the hierarchy of the node; for example: |Set|Building|* instead of just |Set|* ) will help to reduce calculation time.
Include Hierarchy is a powerful tool that enables you to easily populate a collection without having to manually select individual nodes. However, because it has the power to traverse nodes, it may also increase processing time and slow down the performance of your scene. If you have a scene with many nodes, and you do not need this option when you are populating your collection, you may want to first disable this option before declaring your expression or statically adding your nodes.
On the other hand, if Include Hierarchy is required to populate your collection, it is recommended that you first complete entering your expression and selecting and adding your nodes before you enable this option.
The Collection Filters functionality in the collection Property Editor can be used to include only specific node types in a collection. For example, you may use the expression apple* to populate your collection, but you only want to include the transform nodes in your collection and exclude all shape nodes and shaders that have the letters apple in their name. See Add collection members by node type for more information.
Verify your collection members by clicking Select in the Property Editor to select the collection members in your scene and in the Outliner. Separate Select buttons exist for members added via expression and members via selecting and adding. See Identify the objects that belong in your collection.
To remove members added via drag and drop, right-click the node (or multiple nodes) in the collection Property Editor and select Remove. You can also select the node and click Remove.
To remove members added via expression, delete the expression.