This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Organizing Materials

UNIGINE materials are organized in a hierarchy and managed via the Materials Hierarchy window.

Materials Hierarchy Window

The Materials Hierarchy window provides access to all materials of the project and allows filtering them, collapsing materials hierarchy (i.e., showing only the base materials and hiding the user ones), inheriting, cloning, renaming, and deleting materials.

All materials in the hierarchy are linked to the .basemat, .mat and .mgraph material files stored in the assets folder of the project and available via the Asset Browser. So, any operation on a material via the UnigineEditor interface updates the corresponding asset.

To open the Materials Hierarchy window, choose Windows -> Toggle Materials Hierarchy in the Menu Bar or press M.

See Also#

Creating a Material#

A material can be created via UnigineEditor in one of the following ways:

The new material is automatically added to the materials hierarchy and displayed in the Materials Hierarchy window. The asset, to which the new material links, is also created and becomes available via the Asset Browser.

Notice
Materials in the hierarchy are sorted alphabetically by names, so you cannot rearrange them.

Basic Operations on a Material#

The Materials Hierarchy window allows the following basic operations on a material.

Renaming a Material#

To rename a material, right-click it and choose Rename in the drop-down list.

Renaming a Material

You can also rename a material via the Parameters window by editing the Name field.

Notice
Only the user materials can be renamed. Renaming a material leads to renaming the asset file it is linked to.

If you rename a material asset via the Asset Browser, the material that links to it will be renamed as well.

Cloning a Material#

To clone a material, right-click it and choose Clone in the drop-down list.

Cloning a Material

Another way to clone a material is to select it and click to the left of the material name filter.

Notice
Only the user materials can be cloned. Cloning a material leads creating an asset file, to which the new material links.

The new material will be created at the same hierarchy level as the original one. Note that the child materials won't be cloned.

If you copy a material file via the Asset Browser, the material that links to it will be cloned.

Deleting a Material#

To delete a material, right-click it, choose Delete in the drop-down list and confirm deletion in the dialog window that opens:

Deleting a Material

Another way to delete a material is to select it and click to the left of the material name filter. If you delete a parent material, all its child materials will be deleted as well.

Notice
Deleting a material leads deleting the asset file it is linked. You cannot undo material's deletion.

If you delete a material file via the Asset Browser, the material that links to it will be deleted as well.

Setting Up Materials Inheritance#

In UNIGINE, materials are organized in a hierarchy, like nodes, but are completely independent of the nodes hierarchy. Each material (parent material) can have multiple children (child materials). The parent material can be both the base or user material; the child material is always a user material.

To collapse or expand the list of child materials, click the arrow to the left of the parent material. You can also collapse all child materials in the Materials Hierarchy window by clicking .

Inheriting a Material#

Inheriting one material from another allows forming the materials hierarchy. To inherit a new material from the existing one, right-click the desired parent material and choose Create Child in the drop-down list.

Inheriting a Material

Another way to inherit a material is to select a material and click to the right of the material name filter.

Notice
Inheriting a material leads to creating a new asset file.

You can also inherit a new material via the Parameters window: select a surface, go to the Material section and click right to the field with the material name. The inherited material will be assigned to the currently selected surface automatically.

Notice
The child material asset is created in the same folder as the parent material asset. If the material is inherited from the base material, the asset will be created in the root of the asset folder.

Inheriting via Asset Browser#

To inherit a material via the Asset Browser, select the material asset, right-click it and choose Create Child in the drop-down list. The new material will be added to the Materials Hierarchy window and linked to the created asset.

Inheriting a Material via Asset Browser

Reparenting a Material#

To change the parent material (reparent), select the target material in the hierarchy and drag it with the left mouse button pressed to the desired parent.

Reparenting a Material

The parent material, to which the child material will be added, is highlighted with the white frame:

Highlighted Parent Material

You can also move the material to a position alongside the child materials of the desired parent: the material will be added as a child to this parent material in alphabetical order. The position in the hierarchy is highlighted with the white line during moving.

Reparenting a Material

Assigning a Material#

A material can be assigned to the entire node (i.e., to all its surfaces), several surfaces or a single surface of the node.

To assign a material to a surface (or surfaces) of a node, select the node, select the target surface (surfaces) and perform one of the following:

Notice
To assign a material to the entire node, selecting the node will be enough: the material will be assigned to all its surfaces.
  • Drag the material from the Materials Hierarchy window or the icon of the material asset from the Asset Browser to the field with the material asset name in the Parameters window.

  • Drag the material from the Materials Hierarchy window or the icon of the material asset from the Asset Browser to the target surface in the Editor Viewport.

  • Use the button next to the field with the material asset name in the Parameters window (the Node tab) to choose the desired material asset.

  • Type the name of the material asset to the field with the material asset name in the Parameters window (the Node tab) manually. If an asset with the specified name exists in the project, it will be shown in the drop-down list while typing.

Filtering Materials#

Filtering helps to reduce the number of materials viewed in the hierarchy, and, therefore, simplifies its management.

To filter materials by name, start typing a material name in the corresponding field of the Materials Hierarchy window:

Materials in the hierarchy can also be displayed depending on the specified filters: click in the Materials Hierarchy window and choose the required filters. By default, all materials are shown (Enable All is toggled on).

Available Filters

The filters are divided into several groups, so you can:

  • Filter the materials by types of objects, to which they can be applied. For example, you can toggle on the Grass filter to show materials that can cover the Grass object.
  • Display or hide the materials implemented programmatically (the Code-Based filter) and/or created via Materials Editor (the Material Graph filter).
  • Display or hide the Built-In Engine Base Materials and/or Users Created Base Materials.
  • Filter the materials by their properties. For example, you can show all materials with Emission.
  • Filter by Detail rendering parameters.
  • Filter by UV mapping parameters.

To filter the materials, toggle checkboxes in the Visibility column. Each filter can have one of the following values:

  • enabled - all materials that match the filter are displayed in the hierarchy.
  • NOT enabled - all materials that don't match the filter are displayed.
  • disabled - the filter isn't taken into account.

Filters can be combined using logical OR or logical AND operations. For example, to display the opaque materials with detail rendering disabled that can be applied to a mesh, you should use the following combination of filters with logical AND:

You can also display filter states in the materials hierarchy: toggle on the corresponding checkboxes in the States column. The materials hierarchy will switch to a table view. If the displayed material matches the filter, it will have a mark in the corresponding column.

You can sort the materials by state by clicking the column header.

Last update: 2023-06-23
Build: ()