Car body and fixture mods should in theory export to Beam.NG 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.
- 1 Custom Materials
- 2 Material Export Parameters
- 2.1 To Add
- 2.2 Basic Parameters
- 2.3 Extra Parameters
- 2.4 Normal Map
- 2.5 UV Tiling
- 3 Combined Parameter Data
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.
Pixel formats (selected in the “Compression settings” dropdown) supported by the exporter:
- 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 BeamNG exporter know how to interpret these materials in order to build one that works in BeamNG. Developed after all attempts at naming conventions failed, it lists material parameter names according to the function those parameters perform, as well as a few other bits of information that the exporter needs to know about.
Many of the parameters use the Combined Parameter Data type, which allows a group of parameters to be combined into one for export.
- An exported material defaults to a colour and opacity of #FFFFFFFF. This is a hexadecimal colour of "White, and completely opaque."
- If a vector or texture parameter is specified in the Colour Param or Diffuse Tex variables within the Export Material User Data, those variables will be used for the colour of the exported material.
- If both are specified, they will be multiplied together.
- The exported opacity is assumed to be 1 (completely opaque) if no Alpha Param is specified. if a Diffuse Tex variable is specified, then the opacity is defined by the alpha channel of the texture. If the texture is single-channel, it is assumed to be an alpha texture as well as a diffuse texture. If a texture is RGB without an alpha, the alpha is unaffected by the diffuse tex.
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".
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 - The exporter will create a proper two layered material and generate a blend map. One layer is chrome, the other is black.
- Clear Glass - For transparent glass materials.
- Decal - This is for multicoloured decals. Because these don’t work in a consistent way in Automation, the output is hard-coded for each base material. Don’t use this value for a brand new material as the exporter won’t know what to do with it.
- Number Plate - Another one that needs a two-layered material, one for the plate background and one for the numbering/lettering.
- Badge, Mirror - These are treated the same as “Metal” for BeamNG, though custom exporters may wish to separate them.
- Metal - For metallic materials. These default to full metallic and specular values, if those parameters are not specified.
- Black Plastic, Carbon Fiber, Leather, Opaque Glass - These are treated the same as “Other” for BeamNG, though custom exporters may wish to separate them.
- Other - default behaviour. If in doubt, use this value.
This group of parameters controls the diffuse colour of the material. See Combined Parameter Data, below.
This group of parameters controls the opacity of the material. See Combined Parameter Data, below.
This group of parameters controls the roughness of the material. See Combined Parameter Data, below.
This group of parameters controls the metallic value of the material. See Combined Parameter Data, below.
This group of parameters controls the specular value of the material. See Combined Parameter Data, below.
Diffuse Tex Param Name
The name of the parameter that refers to the diffuse texture.
Alpha Cutoff Name
This parameter determines the alpha cutoff, or the point where the pixel being rendered gets culled.
This is a secondary colour parameter. Not currently used.
Multi Colour Decal Texture
This parameter identifies the texture for a multicoloured decal.
Bypass Normal Map
If true, this material will not be exported with a normal map.
Normal Switch Name
The name of the switch parameter that turns normal mapping on/off for this material.
Explicit Normal Map
Normally, the exporter will pull out all of the textures in a material and use the first one it finds with the normal map pixel type as the material’s normal map. If the material has a 'detail normal' and a 'normal map', or multiple normal maps, the explicit normal map should be set to 'normal map' (or the same name as the variable name of the texture you want to be the normal map).
UV tiling in Automation uses all kinds of projection maths that is not available to us in BeamNG. These parameters are used to help us get something that looks approximately right, though it will likely never be an exact match.
Because BeamNG does not support UV offset and scale, the UV data in the mesh vertices need to be modified for tiled UVs to work.
The name of the parameter that controls UV tiling.
This parameter controls a scaling multiplier in the Z axis of the object. Only has effect if World Scaled UVs is true.
World Scaled UVs
If true, the UV scale is determined by the size of the mesh.
Uniform Scaled UVs
If true, UV scale values are forced to be the same in all 3 axes. Only has effect if World Scaled UVs is true.
Force Rescale UVs
If true, overrides the meshes UVs to a Z-projected (top-down) version of the vertex position, scaled to 2cm per UV tile.
Combined Parameter Data
This data allows for a group of parameters to be combined into one for export.
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. Many Automation materials blend between colours or other values via a noise/bump map or via some other user or child driven value. Because BeamNG needs a single value, we need to do the blending once for the whole material.
Param Name Lerp
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. If this value is empty but Param Name 2 is not, the two values will be averaged.
If set to true, the above parameter names will be ignored in favour of the given override value.
If Override is true, this value will be used for the parameter instead of the named material parameter.