This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Properties
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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 Optimization
Materials
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

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 by names, 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 and .mat 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 renaming the asset file it is linked.

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 Inherit in the drop-down list.

Inheriting a Material

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

Notice
Inheriting a material leads 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 Inherit 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.

Last update: 2021-04-29
Build: ()