Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and 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
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes

Setting Up Materials

This panel allows to organize and modify the materials and can be invoked by pressing the M key (for other materials hotkeys see Controls) or choosing Materials tab on the Editor interface panel.

Warning
This article is deprecated and will be updated in the UNIGINE 2.6 version.

Materials Editor consists of three parts: preview panel, material tree hierarchy list and data related to the selected material (material tabs).

Materials editor settings

Preview Panel and Material Tree

The left part of the Materials panel consists of the following elements:

  • Preview panel — display the current material over the geometric figure, selected in the drop-down list: box, sphere or dodecahedron.
  •   Save materials — save the material.
  •   Clone material — clone the selected material. The new material file will be created.
  •   Inherit material — inherit the selected material. The new material file will be created.
  •   Rename material — rename the material. Renaming the material leads to renaming the material file.
  •   Remove material — remove material and all its children. Removing material leads to removing the material files.
  •   Assign material — assign material to one selected surface of the selected node.
  • Search — search material in the hierarchy list by name.
  • Materials hierarchy list — hierarchically structured list of the materials giving material names and parent-child links. It enables showing only the parent materials and hide the child ones if necessary.

Material Tabs

The material-related data is grouped into four tabs:

  • The Common tab contains common material settings. These properties are the same for all materials.
  • The States tab contains a set of flags that will be used for a shader corresponding to the material.
  • The Textures tab contains paths to textures used by the material.
  • The Parameters tab contains parameters associated with the selected states.

Details on type dependent properties can be found in Material Class article.

Common Tab

The common tab has the following options:

Info

This section provides the information about the selected material:

Name A name of the material.
Parent A name of the parent material.
Children The number of child materials.

Transparency

This section contains transparency settings:

Preset Blending presets. One of the following can be selected:
  • Opaque
  • Alpha test
  • Alpha blend
  • Additive
  • Multiplicative
  • Custom
Src Option used to scale the source color (the color of an overlaying material). Available only when Custom preset is selected.
Dest Option used to scale the destination color (the color of an obscured material). Available only when Custom preset is selected.
Overlap Render polygons, to which the material is applied, on the top of the render. This can be used for UI elements.

Options

This section contains common material options:

Rendering order Sort order used by rendering transparent objects with alpha blending. Transparent objects should be set lowest order numbers and thus rendered first, while opaque objects should be set highest order numbers to be rendered last.
Notice
In order to control the rendering order, you need to set Materials settings -> States tab -> Ambient pass to Transparent for the selected material.
Polygon offset Polygon offset level used for the material.
Shadow mask A shadow mask of the material.
Viewport mask A viewport mask that allows to selectively render materials and reflections from them. (See the detailed info).
Two sided Render polygons, to which the material is applied, two times by lighting pass.
Cast shadow Render polygons, to which the material is applied, casting shadows from omni, projected or cubemap light sources.
Cast world shadow Render polygons, to which the material is applied, casting shadows from world light sources.
Depth test Enable or disable depth testing for the material. This can be used to make objects occluded by others visible (e.g. a character behind a wall).
Copy settings Copy all material settings.
Paste settings Apply the previously copied settings of the material to the current one.
Last update: 2017-10-20