This is the documentation for Enlighten.
The XML schema for the .mats file format is available in Src/Samples/Libraries/GeoEn2Support/common_mats.xsd.
There are two types of material: Blinn-Phong and PBR. Some elements and attributes are common to both types.
<materials>Your materials must be enclosed within a single <materials> element, with the following attributes. Your <materials> element may contain any number of <material> elements describing the IDs/GUIDs and behaviour of individual materials.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Required | The version of the | Integer |
<material>The <material> element is used to assign material IDs/GUIDs and describe the behaviour of individual materials. Any number of <material> elements may appear within your <materials> element.
<diffuse>
The <diffuse> element is used to specify the diffuse channel as a single colour or a texture.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Optional | Specifies the colour of the diffuse channel. | 4-element vector as string (RGBA) |
| Optional | The scale to apply to the diffuse channel. | Float |
| Optional | The scale to apply to the mesh's UVs before looking up in the diffuse texture. | 2-element vector as string (XY scale) |
| Optional | The offset to apply to the mesh's UVs before looking up in the diffuse texture (applied after the above | 2-element vector as string (XY scale) |
The <diffuse> element can optionally contain a child <texture> element, containing the filename of the texture to use.
<opacity>The <opacity> element is used to specify the opacity channel as a single colour or a texture.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Optional | Specifies the colour of the opacity channel. | 4-element vector as string (RGBA) |
| Optional | The scale to apply to the opacity channel. | Float |
| Optional | The scale to apply to the mesh's UVs before looking up in the opacity texture. | 2-element vector as string (XY scale) |
| Optional | The offset to apply to the mesh's UVs before looking up in the opacity texture (applied after the above | 2-element vector as string (XY scale) |
<specular>The <specular> element is used to specify the specular channel as a single colour or a texture, along with a power.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Optional | Specifies the colour of the opacity channel. | 4-element vector as string (RGBA) |
| Optional | The scale to apply to the opacity channel. | Float |
| Required | A power to apply to the specular channel. | Float |
| Optional | The scale to apply to the mesh's UVs before looking up in the specular texture. | 2-element vector as string (XY scale) |
| Optional | The offset to apply to the mesh's UVs before looking up in the specular texture (applied after the above | 2-element vector as string (XY scale) |
The <specular> element can optionally contain a child <texture> element, containing the filename of the texture to use.
<pbrMaterials>Your materials must be enclosed within a single <pbrMaterials> element, with the following attributes. Your <pbrMaterials> element may contain any number of <pbrMaterial> elements describing the IDs/GUIDs and behaviour of individual materials.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Required | The version of the | Integer |
<pbrMaterial>The <pbrMaterial> element is used to assign material IDs/GUIDs and describe the behaviour of individual materials. Any number of <pbrMaterial> elements may appear within your <pbrMaterials> element.
<baseColour>The <baseColour> element is used to specify the baseColour channel as a colour and/or a texture.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Optional | Specifies the colour of the baseColour channel. | 4-element vector as string (RGBA) |
| Optional | The scale to apply to the baseColour channel. | Float |
| Optional | The scale to apply to the mesh's UVs before looking up in the baseColour texture. | 2-element vector as string (XY scale) |
| Optional | The offset to apply to the mesh's UVs before looking up in the baseColour texture (applied after the above | 2-element vector as string (XY scale) |
The <baseColour> element can optionally contain a child <texture> element, containing the filename of the texture to use.
<metallic>The <metallic> element is used to specify the metallic channel as a single channel texture.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Optional | The scale to apply to the metallic channel. | Float |
| Optional | The scale to apply to the mesh's UVs before looking up in the metallic texture. | 2-element vector as string (XY scale) |
| Optional | The offset to apply to the mesh's UVs before looking up in the metallic texture (applied after the above | 2-element vector as string (XY scale) |
The <metallic> element must contain a child <texture> element, containing the filename of the texture to use.
<roughness>The <roughness> element is used to specify the roughness channel as a single channel texture.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Optional | The scale to apply to the roughness channel. | Float |
| Optional | The scale to apply to the mesh's UVs before looking up in the roughness texture. | 2-element vector as string (XY scale) |
| Optional | The offset to apply to the mesh's UVs before looking up in the roughness texture (applied after the above | 2-element vector as string (XY scale) |
The <roughness> element must contain a child <texture> element, containing the filename of the texture to use.
<ao>The <ao> element is used to specify the ao channel as a single channel texture.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Optional | The scale to apply to the ao channel when applied to indirect diffuse lighting. | Float |
| Optional | The scale to apply to the ao channel when applied to indirect specular lighting. | Float |
| Optional | The scale to apply to the mesh's UVs before looking up in the ao texture. | 2-element vector as string (XY scale) |
| Optional | The offset to apply to the mesh's UVs before looking up in the ao texture (applied after the above | 2-element vector as string (XY scale) |
The <ao> element must contain a child <texture> element, containing the filename of the texture to use.
<cavity>The <cavity> element is used to specify the cavity channel as a single channel texture.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Optional | The scale to apply to the cavity channel. | Float |
| Optional | The scale to apply to the mesh's UVs before looking up in the cavity texture. | 2-element vector as string (XY scale) |
| Optional | The offset to apply to the mesh's UVs before looking up in the cavity texture (applied after the above | 2-element vector as string (XY scale) |
The <cavity> element must contain a child <texture> element, containing the filename of the texture to use.
The atttributes and child elements listed below are common to both <material> and <pbrMaterial> elements:
Attribute | Usage | Description | Values |
|---|---|---|---|
id | Required | The identifier of this material. | String |
guid | Optional | The GUID of this material. | GUID string |
| Optional | The backface ray hit behaviour type of this material. | String: |
| Optional | Defines the triangle faces which cast direct lighting shadows. Used in precomputed directional visibility and baking. Note that the precompute treats | String: |
| Optional | Fraction of incident rays which pass through the material. | Positive float |
| Optional | The fraction of incident rays which are reflected by the material. | Positive float |
| Optional | Setting to true will enable special treatment appropriate for emissive materials. | Boolean |
<normal>The <normal> element is used to specify the normal channel as a texture.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Optional | The scale to apply to the normal channel. | Float |
| Optional | Whether the normal channel should be used when baking. | Boolean |
| Optional | The scale to apply to the mesh's UVs before looking up in the normal texture. | 2-element vector as string (XY scale) |
| Optional | The offset to apply to the mesh's UVs before looking up in the normal texture (applied after the above | 2-element vector as string (XY scale) |
The <normal> element must contain a child <texture> element, containing the filename of the texture to use.
<emissive>The <emissive> element is used to specify the emissive channel as a single colour or a texture.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Optional | Specifies the colour of the emissive channel. | 4-element vector as string (RGBA) |
| Optional | The scale to apply to the emissive channel. | Float |
| Optional | The scale to apply to the mesh's UVs before looking up in the emissive texture. | 2-element vector as string (XY scale) |
| Optional | The offset to apply to the mesh's UVs before looking up in the emissive texture (applied after the above | 2-element vector as string (XY scale) |
The <emissive> element can optionally contain a child <texture> element, containing the filename of the texture to use.
<transparency>The <transparency> element is used to specify the transparency channel as a single colour or a texture.
Attribute | Usage | Description | Values |
|---|---|---|---|
| Optional | Specifies the colour of the transparency channel. | 4-element vector as string (RGBA) |
| Optional | The scale to apply to the transparency channel. | Float |
| Optional | The scale to apply to the mesh's UVs before looking up in the transparency texture. | 2-element vector as string (XY scale) |
| Optional | The offset to apply to the mesh's UVs before looking up in the transparency texture (applied after the above | 2-element vector as string (XY scale) |
The <transparency> element can optionally contain a child <texture> element, containing the filename of the texture to use.