Material Config XML
Example XML:
<materials version="3">
<material name="mat_name" render_template="generic:DIFFUSE_TEXTURE:NORMALMAP" version="2">
<diffuse_texture file="texture/file/path/my_texture_df"/>
<bump_normal_texture file="texture/file/path/my_texture_nm"/>
</material>
</materials>
A full list of template variables can be found in shaders/base.render_template_database
<material/>
contains the information of a material.<diffuse_texture/>
typicallya variable that often uses a texture with the identifier _df at the end.<bump_normal_texture/>
typicallya variable that often uses a texture with the identifier _nm at the end.<material_texture/>
typicallya variable that often uses a texture with the identifier _gsma at the end. (Gloss, Specular, Metalness, Alpha)
Special Use Cases
-
<material/>
control options:name="mat_name"
give your material a name to go with your models material name.render_template="template_name"
a full list of templates can be found inshaders/base.render_template_database
unique="true"
is usually used for materials that will change per-unit. Unit contours for example.src="name"
will clone the values from an existing<material>
to your current material.- cloned materials can be modified further by including variables or textures to override the source copy.
decal_material="id"
graphic mesh faces with the material will use thedecal_material
variable for hit effects.diffuse_color="255 255 255 255"
potentially unused. (Red, Green, Blue, Alpha)version="2"
most if not all templates use version 2.
-
<variable/>
control options:- Animations can control some variables using the listener type.
- Standard variable:
<variable name="il_tint" type="vector3" value="1 1 1"/>
- Listener variable:
<variable name="il_tint" type="listener" value="light::color" object="lo_lightobject"/>
- Standard variable:
- Animations can control some variables using the listener type.