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:
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
Arguments#
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:
- DecalProj — a projected decal
- DecalOrtho — an orthographic decal
- DecalMesh — a mesh decal
- LandscapeLayerMap — a landscape layer map
- ObjectDummy — a Dummy object
- ObjectDynamic — a dynamic object
- ObjectMeshStatic — a static mesh
- ObjectMeshCluster — a Mesh Cluster
- ObjectMeshClutter — a Mesh Clutter
- ObjectMeshSkinned — a Skinned Mesh
- ObjectMeshDynamic — a Dynamic Mesh
- ObjectMeshSplineCluster — a mesh spline cluster
- ObjectLandscapeTerrain — a Landscape Terrain object
- ObjectTerrainGlobal — a Global Terrain object
- ObjectGrass — a Grass object
- ObjectParticles — particles
- ObjectBillboards — Billboards
- ObjectVolumeBox — a Volume Box
- ObjectVolumeSphere — a Volume Sphere
- ObjectVolumeOmni — a Volume Omni object
- ObjectVolumeProj — a Volume Projected object
- ObjectGui — a GUI object
- ObjectGuiMesh — a GUI mesh
- ObjectWaterGlobal — a Global Water object
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.