No edit summary |
|||
Line 9: | Line 9: | ||
Because the workflows for the different textures are similar but entirely separate, The documentation for each texture is thusly separated. | Because the workflows for the different textures are similar but entirely separate, The documentation for each texture is thusly separated. | ||
== Export Material User Data Diffuse Parameter Info == | == Add an Export Material User Data parameter to Your Material == | ||
From the Details panel of the material, under the Material category, expand the parameters, and add, from the Asset User Data array, an Export Material User Data: | |||
[[File:ExportParameters AddExportUserData.jpg|frameless]] | |||
== Diffuse Parameter Info == | |||
The Diffuse EMUD is the only mandatory export parameter. All other parameters have defaults, but a material without a diffuse parameter set in the EMUD will not export correctly or at all. | The Diffuse EMUD is the only mandatory export parameter. All other parameters have defaults, but a material without a diffuse parameter set in the EMUD will not export correctly or at all. | ||
Line 16: | Line 21: | ||
The diffuse parameters are split up into several sections that can be used or ignored as required. They are as such: | The diffuse parameters are split up into several sections that can be used or ignored as required. They are as such: | ||
[[File:ExportParameters DiffuseParameters.jpg|frameless]] | |||
The Colour Secondary Param is only necessary if you are doing a two-tone colour gradient using a texture as the alpha. That will be explained later. | |||
At least one parameter within either the Colour Parameters, or the Diffuse Texture Param, is necessary. All else is optional, or adds on top of these parameters. | |||
If you have a texture parameter, with no additional modification to it, leave all parameters within the Diffuse parameters list empty, except for the <code>Diffuse Texture Param > Param Name</code>: | |||
[[File:ExportParameters DiffuseParameterSet.jpg|frameless]] | |||
If your diffuse value is instead a solid colour, leave all parameters within the diffuse parameters list empty, except for the <code>Colour Param > Param Name</code>: | |||
[[File:ExportParameters DiffuseParamName.jpg|frameless]] |
Revision as of 22:06, 17 January 2023
The Export Material User Data is a translation layer for the Exporter. The exporter doesn't have access to the raw HLSL of the material in UE4, nor do most games or applications have a shader path that allows use of custom shaders. BeamNG.Drive, for example, has a static shader path, and as such, it is a constant struggle to get Automation's paints and materials to export nicely.
The Export Material User Data (or EMUD) contains the logic that the exporter can use for adjusting textures and the UVs of the exported meshes, in order to get a close approximation of Automation's materials, for use in other rendering engines.
The layout and structure of the EMUD must be kept in mind at all times during the creation of a Custom Paint or fixture material, as there are certain limitations that cannot be overcome.
The EMUD can create new static (non-moving) UVs in one of two flavours; it can scale the existing UVs, or it can create a new box-unwrapped UV set. The EMUD can also create and edit static textures for the following material channels: Diffuse, Roughness, Metallic, Specular, Normal, and Opacity.
Because the workflows for the different textures are similar but entirely separate, The documentation for each texture is thusly separated.
Add an Export Material User Data parameter to Your Material
From the Details panel of the material, under the Material category, expand the parameters, and add, from the Asset User Data array, an Export Material User Data:
Diffuse Parameter Info
The Diffuse EMUD is the only mandatory export parameter. All other parameters have defaults, but a material without a diffuse parameter set in the EMUD will not export correctly or at all.
The diffuse parameters inside the EMUD are capable of a number of dynamic options. You can set it up to use a texture as diffuse, or a texture as a mask between two colours, or a diffuse texture with a single colour overlaid via a mask, or a series of colours blended together via a slider or texture.
The diffuse parameters are split up into several sections that can be used or ignored as required. They are as such:
The Colour Secondary Param is only necessary if you are doing a two-tone colour gradient using a texture as the alpha. That will be explained later.
At least one parameter within either the Colour Parameters, or the Diffuse Texture Param, is necessary. All else is optional, or adds on top of these parameters.
If you have a texture parameter, with no additional modification to it, leave all parameters within the Diffuse parameters list empty, except for the Diffuse Texture Param > Param Name
:
If your diffuse value is instead a solid colour, leave all parameters within the diffuse parameters list empty, except for the Colour Param > Param Name
: