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

ULON Base Material File Format

Material specifies which shaders the specific rendering pass will use to render. When you assign the material, the engine starts using its shaders to render the image.

A base material is a *.basemat text file that contains all the information to provide the final appearance for an object. The base material is created by programmers and cannot be edited via the Parameters window.

It is based on ULON file format declarations that define a base material with the given properties (options, states, textures, parameters, shaders and so on).

Besides the ULON nodes, a base material file can also contain an inline UUSL code or UnigineScript expressions.

The syntax is the following:

XML Code
BaseMaterial <node=ObjectMeshStatic options_hidden=0 preview_hidden=0 var_prefix=var texture_prefix=tex>
{
	/* Other ULON nodes here*/
}

There are two types of base material supported:

  • BaseMaterial — base material for objects
  • BaseBrushMaterial — base material for terrain brushes
Notice
All node names in ULON are case-sensitive.

Arguments#

Notice
The argument names and values are case-sensitive.

editable#

Boolean

A flag indicating if all of the base material settings can be changed in the Parameters window or via API.

Available values:

  • false — unchangeable
  • true — changeable (by default)

hidden#

Boolean

A flag indicating if the material is displayed in the Materials Hierarchy.

Available values:

  • false — displayed (by default)
  • true — hidden

options_hidden#

Boolean

A flag indicating if the Options section is displayed for the material in the Common tab.

Available values:

  • false — displayed (by default)
  • true — hidden

preview_hidden#

Boolean

A flag indicating if the material preview is displayed.

Available values:

  • false — displayed (by default)
  • true — hidden

legacy#

Boolean

A flag indicating if the legacy mode is enabled.

Available values:

  • false — displayed (by default)
  • true — hidden

var_prefix#

String

The prefix added to the parameters when they are passed to the shader as a variable.

texture_prefix#

String

The prefixes that are added to the textures when they are passed to the shader.

defines#

String

The argument that specifies names of definitions that will be passed to all shaders.

node#

String

The type of node to which this material can be applied.

Available values:

default#

Boolean

Indicates that this material is used by default for the specified type of nodes.

Available values:

  • false — not used as the default material (by default)
  • true — sets as the default material

namespace#

String

The material namespace.

Notice
The Engine has its own reserved namespaces: Unigine and Editor.
Last update: 2021-12-13
Build: ()