Temp-new mod materials

From Automation Game Wiki
Revision as of 16:57, 16 November 2021 by Jayelinda (talk | contribs) (→‎ColourSecondaryMaskParam (Texture Parameters))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

New material parameters

Car body and fixture mods should in theory export just like the built in bodies and fixtures. If it works in Automation, then the exporter should be able to deal with it. One exception to this is custom materials.

Custom Materials

When the exporter exports a material, it checks which base material is being used and chooses from a series of built-in handlers based on that. Custom materials that are material instances of existing car/fixture materials should already export properly. Where possible, it’s best to use instances of existing materials rather than create new ones.


Textures

Pixel formats (selected in the “Compression settings” dropdown) supported by the exporter:

  • RGBA8
  • DTX1/BC1
  • DXT3/BC2
  • DXT5/BC3
  • BC4 (Alpha)
  • BC5 (Normal map)

RGBA textures will be saved with DTX5/BC3 compression by the exporter.

For best results on export, make sure the “Global Force Resident Mip Levels” option is ticked on, otherwise the texture may export down-resed, depending on whether or not Unreal feels like loading the full resolution texture at that time.

Material Export Parameters

This is the data attached to Automation materials to help the exporter know how to interpret these materials in order to build one that works externally. Developed after all attempts at naming conventions failed, it basically defines the naming convention used by the material, as well as storing a few other bits of information that the exporter needs to know about.

Many of the parameters use the Combined Parameter Data and Texture Parameter Data types, which allow a group of parameters to be combined into one for export.

To Add

Export parameters should be added to the base material, not to a material instance. To add export parameters, click the plus icon next to Asset User Data, in the material editor. In the dropdown that appears, select "Export Material User Data".

Basic Parameters

Material Type

The type of material. Some materials need special handling by the exporter. The type is used to help determine these. If in doubt as to the correct type, leave it as the default (Other) value.

  • Grille - A material using a mask to blend between metal and a (usually black) background.
  • Clear Glass - For transparent glass materials.
  • Decal - One of a set series of materials each with custom handling for the diffuse texture. Do not put this type on new materials.
  • Other - default behaviour. If in doubt, use this value.

Diffuse Colour

Colour Param (Vector Parameters)

This group of parameters controls the diffuse colour of the material. See Combined Parameter Data, below.

Diffuse Texture Param (Texture Parameters)

This group of parameters controls the diffuse map of the material. See Texture Parameter Data, below.

Diffuse Texture To Colour Lerp (Scalar Parameters)

This group of parameters controls the value for lerping from the given diffuse texture to the diffuse colour of the material. See Combined Parameter Data, below.

Colour Secondary Param (Vector Parameters)

This group of parameters controls the secondary diffuse colour of the material. See Combined Parameter Data, below.

This colour is blended with the main colour using the texture specified in Colour Secondary Mask Param.

Colour Secondary Mask Param (Texture Parameters)

This group of parameters controls the mask that blends between the primary and secondary colours of the material. See Texture Parameter Data, below.

Mask Values

Roughness Param (Scalar Parameters)

This group of parameters controls the roughness of the material. See Combined Parameter Data, below.

Roughness Texture Param (Texture Parameters)

This group of parameters controls the roughness map of the material. See Texture Parameter Data, below.

Metallic Param (Scalar Parameters)

This group of parameters controls the metallic value of the material. See Combined Parameter Data, below.

Metallic Texture Param (Texture Parameters)

This group of parameters controls the metallic map of the material. See Texture Parameter Data, below.

Specular Param (Scalar Parameters)

This group of parameters controls the specular value of the material. See Combined Parameter Data, below.

Specular Texture Param (Texture Parameters)

This group of parameters controls the specular value map of the material. See Texture Parameter Data, below.

Normal Map

Normal Strength (Scalar Parameters)

This group of parameters controls the normal strength of the material. See Combined Parameter Data, below.

Normal Texture Param (Texture Parameters)

This group of parameters controls the normal map of the material. See Texture Parameter Data, below.

Opacity

Materials with no information set here will defaut to an opacity of 1.0 (completely opaque).

Opacity Param (Scalar Parameters)

This group of parameters controls the opacity of the material. See Combined Parameter Data, below.

Opacity Texture Param (Texture Parameters)

This group of parameters controls the opacity map of the material. See Texture Parameter Data, below.

Alpha Cutoff Name

This parameter determines the alpha cutoff, or the point where the pixel being rendered gets culled.

Stamp Map Has Priority

If set to true, the stamp map has priority over other opacity sources when both are present. Defaults to true.


UVs

World Space UVs

If true, the mesh will be unwrapped according to the world space positions of its vertices.

Magical Mystery Multiplier

All the world space UVs work the same, they said...

This value specifies a multiplier to apply to the world space UVs. Depending on what the material is doing, you may need to adjust this value til the export looks right.

UV Scale Param (Scalar Parameters)

This group of parameters controls the uniform scaling of the material UVs. See Combined Parameter Data, below.

U Scale Param (Scalar Parameters)

This group of parameters controls the U (horizontal) scaling of the material UVs. See Combined Parameter Data, below.

This value will be multiplied by that of UV Scale Param.

V Scale Param (Scalar Parameters)

This group of parameters controls the V (vertical) scaling of the material UVs. See Combined Parameter Data, below.

This value will be multiplied by that of UV Scale Param.

U Offset Param (Scalar Parameters)

This group of parameters controls the U (horizontal) offset of the material UVs. See Combined Parameter Data, below.

V Offset Param (Scalar Parameters)

This group of parameters controls the V (vertical) offset of the material UVs. See Combined Parameter Data, below.


Combined Parameter Data

This data allows for a group of parameters to be combined into one for export.

Unless Override has been set, the final value for the material will be an interpolation between [Name] and [Name2] by [Lerp][Lerp Power].

The Name and Name2 parameters will both either be for scalar or vector parameters.

Param Name

The main parameter for the value. If Param Name 2 is empty, this will be the only parameter used and its value will be exported as is.

Param Name 2

The second parameter for the value.

Param Name Lerp (Scalar Parameter)

This parameter, if named, controls the blending between the values of Param Name and Param Name 2. If Param Name 2 is empty, this value has no effect. This defaults to 0.5 if no valid parameter is specified.

Param Name Lerp Power (Scalar Parameter)

This parameter is an exponent applied to the value of the lerp parameter. This defaults to 1.0 if no valid parameter is specified.

Override

If set to true, the above parameter names will be ignored in favour of the given override value.

Value Override

If Override is true, this value will be used for the parameter instead of the named material parameter.

Texture Parameter Data

This data allows for the various ways textures are defined for Automation materials.

Param Name (Texture Parameter)

The main parameter for the value.

Param Name List (Texture Parameters)

Some materials select a texture from a list, instead of just defining one.

This list takes priority over Param Name.

Param Name Selector (Scalar Parameter)

This parameter controls the selection from the above list. It has no effect if the list is empty. The value of the parameter should be a normalised (0 - 1) value.

Mask Channel

If the texture being defined is a single-coloured mask, this allows you to specify which channel of the Automation texture is being used as the mask.