UDN
Search public documentation:

MaterialInstanceEditorUserGuide
日本語訳
中国翻译
한국어

Interested in the Unreal Engine?
Visit the Unreal Technology site.

Looking for jobs and company info?
Check out the Epic games site.

Questions about support via UDN?
Contact the UDN Staff

UE3 Home > Unreal Editor and Tools > Material Instance Editor User Guide
UE3 Home > Materials & Textures > Material Instance Editor User Guide

Material Instance Editor User Guide


Overview


The material instance editor is used for modifying parameters for material instances. If you are unfamiliar with material instances, please see the Instanced Materials page for more information.

Opening the Material Instance Editor


The Material Instance Editor can be opened by double-clicking any Material Instance asset or through the right-click context menu of a Material Instance asset in the Content Browser. Either of these will open up that particular Material Instance in the Material Instance Editor for editing. Another way to open the Material Instance Editor is by right-clicking on an actor and selecting Edit Material Instance from the Material Name sub menu of the Materials menu.

Material Instance Editor Interface


The Material Instance Editor is comprised of these regions:

materialinstanceeditor.jpg

  1. Menu Bar
  2. Toolbar
  3. Properties Pane - Properties of the material instance.
  4. Parent List - A list of the chain of parents for the current material instance.
  5. Preview Pane - Previews the current material instance.

Menu Bar

Window

  • Properties - Toggles display of the Properties Pane.
  • Material Instance Parents - Toggles display of the Parent List.

Tool Bar

Icon Description
toolbar_grid.jpg Toggles the background grid in the material instance preview pane.
toolbar_cylinder.jpg toolbar_cube.jpg toolbar_sphere.jpg toolbar_plane.jpg Select from the standard shapes upon which to preview your material instance.
toolbar_find.jpg Opens the Content Browser and selects the material instance.
toolbar_usestatic.jpg Select a static mesh in the Conent Browser and press this button to make the selected mesh the preview mesh.
toolbar_realtime.jpg If enabled, update the material on the preview mesh in realtime. Disable this flag for editor performance.
toolbar_showparams.jpg Makes all material parameters in the parent material visible in the Properties Pane.

Properties Pane

propertiespane.jpg

The property window in the material instance editor is where all of the ‘work’ should take place. Through the property window, material instance parameters can be overridden and changed. Each parameter that exists in the parent material for this material instance is listed in the Parameter Groups array under the group assigned to the parameter in the parent material. By default, none of the parent's parameters values are overridden.

In addition to parameters, The PhysicalMaterial and physical material mask properties can be assigned in the Properties Pane as well as several of the mobile-specific properties and Lightmass settings.

Parent List

parentlist.jpg

Since Material Instances can have other Material Instances as their parent, sometimes its difficult to find the original Material that the Material Instance is based off of. The parent list solves that problem by displaying the chain of parents of the current Material Instance all the way up to the root Material that is the start of the chain. For example, The parent list displayed above shows a Material Instance named "TestMaterial_INST_INST" that has the Material Instance "TestMaterial_INST" as its parent. We can see in the parent list that "TestMaterial_INST" has "TestMaterial" as its parent. The instance currently being edited is shown in bold.

Furthermore, by double-clicking on any of the items in the parent list, the editor for that parent will be launched. Parents can also be located in the generic browser by right-clicking on the parent's item and then choosing "Sync Generic Browser".

Preview Pane

previewpane.jpg

The material preview pane displays the material being edited applied to a mesh. Rotate the mesh by dragging with the left mouse button. Pan by dragging with the middle mouse button, and zoom by dragging with the right mouse button. Rotate the light direction by holding down L and dragging with the left mouse button.

The preview mesh can be changed by using the associated toolbar controls (the shape buttons, "Select Preview Mesh" combo, and "Use Selected StaticMesh" button). The preview mesh is saved with the material so that the next time the material is opened in a material editor, it will be previewed on the same mesh.

The Preview Pane of the Material Instance Editor also displays statistics about the material, such as instruction counts for the various shader types as well as the number of texture samples being used by the material.

Creating Instances


Users can create a new instance of a Material or a Material Instance by right clicking on the asset's thumbnail within the Content Browser, and then choosing the Create New Material Instance (Constant)... or Create New Material Instance (Time Varying)... option. This action will create a new Material Instance with the selected Material/Material Instance as the parent and then open up the new Material Instance in the Material Instance Editor.

Material instances can also be created from actors that support materials by right clicking on the actor, and going to the Materials submenu. There will be an submenu for each of the materials currently in use by the actor. Within this submenu, users can replace the currently bound material with a new material instance. This menu can be seen below:

creatematerialinstance.jpg

Overriding Parameters


The checkboxes to the left side of each of the parameter names specify whether or not an overridden value should be used. So below TintColor is being used while TimeScalar, DiffuseTex, SomeUnusedScalar and SomeUnusedVector are not. Only checked values are stored for memory conservation reasons, so unchecked values will be lost when the material instance editor window is closed.

matinstedit3.jpg

Workflow


With these features, we are hoping to establish a consistent workflow for authoring new material instances.

Artist Workflow

The most common usage case for artist of this editor would be something like this:

  1. Artist creates new material with parameters to alter the appearance.
  2. Artist creates a new material instance constant in a package by right clicking in the GB.
  3. Artist assigns previously created material as the parent of the new material instance constant
  4. Artist modifies material instance parameters to change the way the material looks.
  5. Artist and LDs can now use the new material instance constant throughout the editor.

Level Designer Workflow

The most common usage case for LDs of this editor would be something like this:

  1. Artist creates new material with parameters to alter the appearance.
  2. LDs place the material throughout the level.
  3. LD feels that the material needs to be tweaked and creates a new material instance by right clicking on the actor and using the menu option described above.
  4. LD checks the box next to the instance parameter they want to replace and modifies the look of the material.
  5. (Optional) Since material instances created this way are stored in the level package, the LD can optionally apply the material instance that was created to other actors. The material instance will appear in the level package in the generic browser.