.. |material_editor| image:: ../../images/tools/material_editor/material_editor.png .. |material_editor_tab| image:: ../../images/tools/material_editor/material_editor_tab.gif .. |open_material_network| image:: ../../images/tools/material_editor/open_material_network.png .. |nodegraph_connect| image:: ../../images/tools/material_editor/nodegraph_connect.gif .. |node_connect| image:: ../../images/tools/material_editor/node_connect.gif .. |palette| image:: ../../images/tools/material_editor/palette.png .. |node_color| image:: ../../images/tools/material_editor/node_color.png .. |sync_selection| image:: ../../images/tools/material_editor/switch_material.gif .. |help_messages| image:: ../../images/tools/material_editor/help_messages.png .. |assign_material| image:: ../../images/tools/material_editor/assign_material.gif .. |graph_layout| image:: ../../images/tools/material_editor/graph_layout.gif .. |attribute_groups| image:: ../../images/tools/material_editor/attribute_groups.gif .. |node_over_connect| image:: ../../images/tools/material_editor/node_over_connection.gif Material Editor =============== The Material Editor panel is a node-based graph interface that allows creating and editing materials. Materials define the appearance and surface properties of the objects in the scene. The Material Editor contains a graph of all material expressions that belong to the material. The nodes have a series of inputs, each associated with a different aspect of the material that other material nodes can be connected to. This allows creating complex materials with a variety of effects. |material_editor| On opening the Material Editor panel from the menu the user has options to either create a new material network or open the selected network. The material network can be selected in the Outliner panel. |open_material_network| Material Editor Topbar ---------------------- The material editor has the following menus in the topbar: * **New**: - **Backdrop** node. - **Nodegraph** node. * **Edit** - **Layout All** - layout all nodes of the currently opened material. - **Layout Selected** - layout currently selected nodes. * **View** - allows to control the visibility of the elements and configure auxiliary options: - **Show External Nodes** - toggles visibility of objects that are connected and placed outside the graph. - **Switch to Assigned Material** - allows to associate the prim with the material assigned to it. - **Sync material on selection** - allows to change opened network depending on the selection. |sync_selection| - **Show Help Messages** - whether to show help messages at the bottom and over the attributes on pointing to them. |help_messages| - **Show Grid** - allows to select the grid display mode. - **Snap To Visible Nodes** - whether to align nodes while dragging. Connecting the nodes --------------------- Each node has a series of inputs and outputs for passing the attribute data. In order to improve UI usability, each type of input/output is marked with a color: |node_connect| Placing a node over the connection of other nodes inserts the node in between them. It allows user connecting and integrating additional nodes into the network: |node_over_connect| Backdrop Node ------------- **Backdrop Node** is a useful tool for keeping the material network organized and easy to navigate. The Backdrop area can be freely scaled and customized. All the nodes within the area will maintain their position relatively to each other. The node can be customized by modifying its attributes. This allows user to modify the following parameters: - Change the title in the status bar or using the node heading in the graph. - **description** to add descriptions. - **fontScale** to change the description font scale. - **showDescription** and **showTitle** to change the visibility of these attributes. Nodegraph --------- **Nodegraph** node is the implementation of the `UsdShade `_, which provides schemas and behaviors for creating and binding materials encapsulating shading networks. The node has one input and one output by default, nevertheless, on establishing the connection the new input/output will be created using the selected attribute. |nodegraph_connect| The nested nodes can be opened by double clicking the node with **LMB** or using the navigation buttons and the **Path Bar** in the top of the panel. |palette| Coloring the Nodes ---------------------------- For making the graph more comprehensive, the user can change the node color. It can be done editing the ``displayColor`` attribute or using the |palette| Color Palette interface accessible from the Material Editor's topbar. Clicking the |palette| Color Palette icon will display a widget that allows user to change node colors from a set of predefined options. To apply a color, select the desired node(s) and click on the chosen color within the widget. |node_color| Assigning a Material -------------------- The network can be assigned by selecting a prim to which the material should be assigned. Use **RMB** to access the context menu within the Material Editor panel. From there, opt for one of the following choices: assign as Full material, Preview material, or both. |assign_material| Hotkeys ------- Panning across the grid is accessible by holding **MMB** and dragging. The nodes can be added using **Tab** hotkey having the mouse pointer in the working area |material_editor_tab| Press **L** to automatically layout the nodes existing of the currently opened material: |graph_layout| Input Groups ------------ Material Attribute are optimized by attribute grouping. Instead of lengthy lists, attributes are organized into groups, allowing users to expand and collapse each group individually. |attribute_groups| The groups are formed using the ``displayGroup`` metadata. Using ``NodeDisplayGroupAPI`` the information about Input Group Collapsing is written to a file, thus the expansion state is maintained on re-opening the stage.