Custom Paint Mods: Difference between revisions

From Automation Game Wiki
No edit summary
Line 23: Line 23:


After setting up the modding SDK from [[Modding|Here]], create a new blank mod:
After setting up the modding SDK from [[Modding|Here]], create a new blank mod:
[[UE4ModCreation_02.gif|alt=|frameless]]


=== Create A Custom Paint File ===
[[File:UE4ModCreation_02.gif|alt=|frameless]]
 
===Create A Custom Paint File===
In your mod content folder, right-click and add a new <code>Custom Paint</code> file. This is the file the game uses to load the paint into the UI.
In your mod content folder, right-click and add a new <code>Custom Paint</code> file. This is the file the game uses to load the paint into the UI.
[[index.php?title=File:CreateCustomPaintFile1.jpg|frameless]]
 
[[File:CreateCustomPaintFile1.jpg|frameless]]
 
Open the Custom Paint file. It has a few parameters:
Open the Custom Paint file. It has a few parameters:


* '''Name''' - This will be the name of the paint as it will appear in-game.  
*'''Name''' - This will be the name of the paint as it will appear in-game.
* '''Material Instance''' - This is the actual paint itself. The material instance defines how the paint looks, what parameters are available, and how it looks when exported.  
*'''Material Instance''' - This is the actual paint itself. The material instance defines how the paint looks, what parameters are available, and how it looks when exported.
* '''GUID''' - This is an unique identifier for this custom paint. It is a random value. This is how the paint is stored and saved by the game.  
*'''GUID''' - This is an unique identifier for this custom paint. It is a random value. This is how the paint is stored and saved by the game.
* '''Family GUID''' - As above, this is an unique identifier. This one is currently un-used, but could in the future be used for storing what paints are part of the same family, if you decide to make several.
*'''Family GUID''' - As above, this is an unique identifier. This one is currently un-used, but could in the future be used for storing what paints are part of the same family, if you decide to make several.


=== Create A Material ===
===Create A Material ===
Right-click the content browser again, and create a new <code>Material.</code> This is the actual shader: it defines how the paint looks.
Right-click the content browser again, and create a new <code>Material.</code> This is the actual shader: it defines how the paint looks.
[[index.php?title=File:CreateCustomPaintMaterial.jpg|frameless|352x352px]]
Open the material. UE4 uses standard PBR Metallic-Roughness workflows. What this means is you define a material by giving it:


* a colour (0,0,0 - 1,1,1)
[[File:CreateCustomPaintMaterial.jpg|frameless|352x352px]]
 
Open the material. UE4 uses standard PBR Metallic-Roughness workflows. What this means is you define a material by giving it:
 
*a colour (0,0,0 - 1,1,1)
* telling it how rough it is (0 - 1, 0 being shiny)
* telling it how rough it is (0 - 1, 0 being shiny)
* how metallic it is (0 - 1, 0 being plastic)
*how metallic it is (0 - 1, 0 being plastic)


as well as a few additional things that help optimise parts of the rendering process, such as:
as well as a few additional things that help optimise parts of the rendering process, such as:


* a Normal map (this defines surface detail that would be too fine or complicated to be geometry)
*a Normal map (this defines surface detail that would be too fine or complicated to be geometry)
* an Ambient Occlusion map (this helps darken and reduce reflections and specular highlighting on parts of the geometry that should be darker than usual, and which the lighting model cannot properly calculate)
*an Ambient Occlusion map (this helps darken and reduce reflections and specular highlighting on parts of the geometry that should be darker than usual, and which the lighting model cannot properly calculate)
* Opacity/Opacity Mask
*Opacity/Opacity Mask

Revision as of 20:44, 6 December 2022

Beginning with LCv4.2, Automation supports the creation of custom paint materials which can be applied to cars, fixtures, and engine parts. These materials also support the Exporter, including exporting to BeamNG.

Overview

A Custom Paint mod is a collection of files, of which a Custom Paint file is the parent.

The Custom Paint file contains the settings and applicable options for the Custom Paint, as well as a reference to the paint material.

The custom paint material itself is a Material in UE4, which is set up in a specific way. Material variables can have an editable_ prefix in the name if you want the player to have access to it in the custom paint settings in-game. Variables and parameters also need to be input into the export user data, contained within the material, for them to export correctly. Materials will not export correctly at all without this export user data.

Workflow

  1. In UE4:
    1. Set up a mod.
    2. Create and fill out a Custom Paint file.
    3. Create your Custom Paint material.
    4. Assign variables to the export user data.
  2. In the Automation Workshop Publishing Tool:
    1. Set up a workshop item.
    2. Share your mod.

Create your Custom Paint mod

Create A New Mod

After setting up the modding SDK from Here, create a new blank mod:

Create A Custom Paint File

In your mod content folder, right-click and add a new Custom Paint file. This is the file the game uses to load the paint into the UI.

CreateCustomPaintFile1.jpg

Open the Custom Paint file. It has a few parameters:

  • Name - This will be the name of the paint as it will appear in-game.
  • Material Instance - This is the actual paint itself. The material instance defines how the paint looks, what parameters are available, and how it looks when exported.
  • GUID - This is an unique identifier for this custom paint. It is a random value. This is how the paint is stored and saved by the game.
  • Family GUID - As above, this is an unique identifier. This one is currently un-used, but could in the future be used for storing what paints are part of the same family, if you decide to make several.

Create A Material

Right-click the content browser again, and create a new Material. This is the actual shader: it defines how the paint looks.

CreateCustomPaintMaterial.jpg

Open the material. UE4 uses standard PBR Metallic-Roughness workflows. What this means is you define a material by giving it:

  • a colour (0,0,0 - 1,1,1)
  • telling it how rough it is (0 - 1, 0 being shiny)
  • how metallic it is (0 - 1, 0 being plastic)

as well as a few additional things that help optimise parts of the rendering process, such as:

  • a Normal map (this defines surface detail that would be too fine or complicated to be geometry)
  • an Ambient Occlusion map (this helps darken and reduce reflections and specular highlighting on parts of the geometry that should be darker than usual, and which the lighting model cannot properly calculate)
  • Opacity/Opacity Mask