Search public documentation:
UE3 Home > Unreal Editor and Tools > Material Editor User Guide
UE3 Home > Materials & Textures > Material Editor User Guide
UE3 Home > Materials & Textures > Material Editor User Guide
- Material Editor User Guide
This document describes how to use UnrealEd's Material Editor. For a description of what the various material expressions do, see the Materials Compendium. For an explanation of how to create new material expressions, see CreatingMaterialExpressions. For information about creating materials for mobile platforms, please see the mobile material reference page.
The Material Editor can be opened by double-clicking any Material asset or through the right-click context menu of a Material asset in the Content Browser. Either of these will open up that particular Material in the Material Editor for editing.
The Material Editor is comprised of six regions:
- Menu Bar
- Tool Bar
- Preview Pane - Previews the material on a mesh.
- Material Expression Graph - Material expression nodes are connected together in this pane to create shader instructions.
- Material Expressions List - A list of the available material expressions.
- Material Functions Library - A list of the available material functions.
- Properties Pane - Properties of the material or selected material expression nodes.
- Properties - Shows the Properties Pane.
- Preview - Shows the Preview Pane.
- Material Expressions - Shows the Material Expressions Graph.
|Moves the material expression graph so that the base material node appears in the upper left corner of the main pane.|
|Toggles the background grid in the material preview pane.|
|Select from the standard shapes upon which to preview your material.|
|Opens the Content Browser and selects the material.|
|Select a static mesh in the Content Browser and press this button to make the selected mesh the preview mesh.|
|Deletes any material expression nodes that aren't connected to the material.|
|Show/Hide material expression connectors that aren't connected to anything.|
|If enabled, update the material on the preview mesh in realtime. Disable this flag for editor performance.|
|If enabled, update the materials in each material expression node in realtime. Disable this flag for editor performance.|
|This button is a global toggle for a material expression's bRealtimePreview flag. If enabled, the shaders of all subexpressions will be compiled every time nodes are added, deleted, connected, disconnected, or have their property values changed. Disable this flag for editor performance. See the Expression Preview section.|
|Applies any changes made in the Material Editor to the original material and any uses of that material in the world.|
|Show/Hide material statistics in the expression graph pane.|
|Toggles display of the HLSL source for the currently selected expression.|
|Allows you to search the expressions for occurrences of a piece of text. See Material Expression Search for more information.|
|LMB or RMB + Drag on background||Pan material expression graph|
|Mouse Wheel Scroll||Zoom in and out|
|LMB + RMB + Drag||Zoom in and out|
|LMB on object||Select expression/comment|
|Ctrl + LMB on object||Toggle selection of expression/comment|
|Ctrl + LMB + Drag||Move current selection/comment|
|Ctrl + Alt + LMB + Drag||Box select|
|Ctrl + Alt + Shift + Drag||Box select (add to current selection)|
|LMB + Drag on connector||Create connection (release on connector or variable)|
|LMB + Drag from connection||Move connection (release on same type connector or variable)|
|Shift + LMB on connector||Marks the connector. Performing the action again with a connector marked will create connection between the two connectors. This is a quick way of making connections over large distances.|
|RMB on background||Bring up New Expression menu|
|RMB on object||Bring up Object menu|
|RMB on connector||Bring up Object menu|
|Alt + LMB on connector||Break all connections to connector|
|Hold L + Drag (in preview pane)||Rotate the preview light direction|
|Ctrl + C||Copy selected expressions|
|Ctrl + V||Paste|
|Ctrl + W||Duplicate selected objects|
|Ctrl + Y||Redo|
|Ctrl + Z||Undo|
|Delete||Delete selected objects|
|Spacebar||Force update all material expression previews|
|Enter||(same as clicking apply)|
|Shift + C||Comment|
Comments are a great way to document what your material is doing, making it easier for you and others to understand what might be a complicated material graph. Comments are displayed in blue text appearing above the associated nodes. Comments are rendered independently of zooming, making it easy to navigate complex material graphs. Material expression nodes can be commented individually by putting text in the "Desc" property of that node. Groups of nodes can be assigned group comments by selecting several nodes and hitting 'Shift + C'. Enter comment text in the "New Comment" dialog and hit OK. The selected nodes will then be grouped in a comment frame. Nodes in a group comment can be moved by dragging on the group comment text. The frame can be resized by dragging on the black triangle in the lower right corner of the comment frame. Any nodes inside a group comment will be moved with the frame, so you can resize an existing frame to include new nodes. Comments can be renamed by selecting the comment and then modifying the "Text" property using the property window.
Nodes in the material editor contain a small box in the upper left corner. This box indicates the node's bRealtimePreview property: yellow indicates enabled, black indicates disabled. Whenever a material changes in any way (a node is created, deleted, connected, a property is changed, etc), all nodes with bRealtimePreview enabled have their shaders recompiled. This recompilation has to happen so that the material preview drawn at that node is up-to-date. However, recompiling these intermediate shaders can be time-consuming, especially if your material contains many nodes. So, to avoid hampering workflow, bRealtimePreview is disabled by default for all node types except TextureSample. You can force-update all previews by hitting the Spacebar. So, fast iteration can be achieved by disabling bRealtimePreview for as many nodes as possible, and then hit space whenever you'd like to view your changes. You can enable bRealtimePreview for a node by clicking on the box in the upper left corner of the node, or by using the property window with the node selected. You can globally toggle all nodes with the "Toggle Expression Realtime Preview" button.
Each time a change is made to the material network, the material must be compiled. If any required inputs of an expression within the network have no connections or are being passed the wrong type of data, a compiler error will occur. These errors are displayed in the Graph Pane. Compiler errors let you know a problem exists and what that problem is by providing information about the type of expression that the occurred on and a description of the error. In addition, the node that contains the error will be highlighted in red in the graph pane so that you can easily find it and make the necessary corrections.
The search functionality in the Material Editor allows you to quickly find any nodes (including comments) within the material network that contain a specific piece of text in their description or certain other properties specific to indivdual types of expressions. This makes it easy to add identifying keywords to nodes and jump to them at a later time without hunting through the network of expressions haphazardly. Typing a full or partial keyword into the search box will perform a search against the properties of the expressions present in the graph pane. Matches are highlighted in green when they are the current active result Note: The search is case-insensitive. Searches are performed against the following proeprty values:
|Expression Type||Searched Properties|
NAME=switch with your search. For example, to find all texture samplers you could use the following search: