Export Material User Data

From Automation Game Wiki

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:

ExportParameters AddExportUserData.jpg

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:

ExportParameters DiffuseParameters.jpg

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:

ExportParameters DiffuseParameterSet.jpg

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:

ExportParameters DiffuseParamName.jpg