Material element
- Last UpdatedDec 06, 2023
- 1 minute read
The Material element features two attributes: type and version.
|
Attribute |
Description |
|---|---|
|
type |
Type can be Unified or DX11. (DX11 is the DirectX material used by ShaderGen.) |
|
version |
This is the version number |
Every element and parameter within <Material> is populated by the exporter using data found in both the 3D Studio Max material and the User Defined object properties (user buffer).
For more information about material data exported to .mwx, see the ShaderGen section on automatic material export.
Shader and ShaderLights
As well as what is described below, the Material element contains <shader> and <shaderLights>.
It contains material data such as these details.
|
Type |
Parameters |
Comment |
|---|---|---|
|
Unified |
Opacity |
|
|
Material |
Opacity |
|
|
emissiveMul |
Emissive multiplier value for HDR |
|
|
screenRefraction |
Boolean |
|
|
refractivity |
Refractivity value for HDR |
|
|
reflectivity |
Reflection value for HDR |
|
|
DX11 fadeValue |
Alpha multiplier for Shader |
|
|
castShadows |
Boolean |
|
|
receiveShadows |
Boolean |
For details about DX11 material in XML format, see DX11 Material XML Format.
<shader>
The Shader element attribute name corresponds to the value of szName in the object user buffer.
All the children elements that defining the shader parameters and textures are populated by the exporter using both user buffer and material data.
<shaderlights>
The ShaderLights element is used to add fixed lights. Because it is case sensitive, an exact light name is required.