Difference between revisions of "Documentation/Engine/Units/accessory paint job data"
(→Flipflake) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 24: | Line 24: | ||
|mask_r_color | |mask_r_color | ||
|rowspan="3"|float3 | |rowspan="3"|float3 | ||
− | | | + | |rowspan="3"| |
|rowspan="3"|colormask | |rowspan="3"|colormask | ||
|rowspan="3"|Defines the default color applied to each channel of the color mask. | |rowspan="3"|Defines the default color applied to each channel of the color mask. | ||
|- | |- | ||
|mask_g_color | |mask_g_color | ||
− | |||
|- | |- | ||
|mask_b_color | |mask_b_color | ||
− | |||
|- | |- | ||
|base_color | |base_color | ||
|float3 | |float3 | ||
− | | | + | | |
|all | |all | ||
|Defines the default color of the paint job. | |Defines the default color of the paint job. | ||
Line 42: | Line 40: | ||
|mask_r_locked | |mask_r_locked | ||
|rowspan="3"|bool | |rowspan="3"|bool | ||
− | | | + | |rowspan="3"| |
|rowspan="3"|colormask | |rowspan="3"|colormask | ||
|rowspan="3"|When false, the player may change each channel's color via the color picker. | |rowspan="3"|When false, the player may change each channel's color via the color picker. | ||
|- | |- | ||
|mask_g_locked | |mask_g_locked | ||
− | |||
|- | |- | ||
|mask_b_locked | |mask_b_locked | ||
− | |||
|- | |- | ||
|base_color_locked | |base_color_locked | ||
|bool | |bool | ||
− | | | + | | |
|all | |all | ||
|When false, the player may change the base color via the color picker. | |When false, the player may change the base color via the color picker. | ||
Line 60: | Line 56: | ||
|flip_color_locked | |flip_color_locked | ||
|bool | |bool | ||
− | | | + | | |
|flipflake | |flipflake | ||
|When false, the player may change the flip color via the color picker. | |When false, the player may change the flip color via the color picker. | ||
Line 66: | Line 62: | ||
|flake_color_locked | |flake_color_locked | ||
|bool | |bool | ||
− | | | + | | |
|flipflake | |flipflake | ||
|When false, the player may change the flake color via the color picker. | |When false, the player may change the flake color via the color picker. | ||
Line 72: | Line 68: | ||
|flip_color | |flip_color | ||
|float3 | |float3 | ||
− | | | + | | |
|flipflake | |flipflake | ||
− | | | + | | |
|- | |- | ||
|flip_strength | |flip_strength | ||
|float | |float | ||
− | | | + | | |
|flipflake | |flipflake | ||
− | | | + | | |
|- | |- | ||
|flake_color | |flake_color | ||
|float3 | |float3 | ||
− | | | + | | |
|flipflake | |flipflake | ||
− | | | + | | |
|- | |- | ||
|flake_uvscale | |flake_uvscale | ||
|float | |float | ||
− | | | + | | |
|flipflake | |flipflake | ||
− | | | + | | |
|- | |- | ||
|flake_density | |flake_density | ||
|float | |float | ||
− | | | + | | |
|flipflake | |flipflake | ||
− | | | + | | |
|- | |- | ||
|flake_shininess | |flake_shininess | ||
|float | |float | ||
− | | | + | | |
|flipflake | |flipflake | ||
| | | | ||
Line 108: | Line 104: | ||
|flake_clearcoat_rolloff | |flake_clearcoat_rolloff | ||
|float | |float | ||
− | | | + | | |
|flipflake | |flipflake | ||
− | | | + | | |
|- | |- | ||
|flake_noise | |flake_noise | ||
|string | |string | ||
− | | | + | | |
|flipflake | |flipflake | ||
− | |Path to the flipflake texture | + | |Path to the flipflake texture. |
|- | |- | ||
|flipflake | |flipflake | ||
|bool | |bool | ||
− | | | + | | |
| | | | ||
|When true, flipflake (metallic/pearlescent) behavior and attributes are enabled. Cannot be used with colormask. | |When true, flipflake (metallic/pearlescent) behavior and attributes are enabled. Cannot be used with colormask. | ||
Line 126: | Line 122: | ||
|airbrush | |airbrush | ||
|bool | |bool | ||
− | | | + | | |
| | | | ||
|When true, airbrush behavior and attributes are enabled. Cannot be used with colormask. | |When true, airbrush behavior and attributes are enabled. Cannot be used with colormask. | ||
Line 132: | Line 128: | ||
|alternate_uvset | |alternate_uvset | ||
|bool | |bool | ||
− | | | + | | |
|all | |all | ||
|When true, the resulting material will have the ''altuv'' flavor. This triggers usage of the alternate UV layout, if configured. | |When true, the resulting material will have the ''altuv'' flavor. This triggers usage of the alternate UV layout, if configured. | ||
Line 138: | Line 134: | ||
|stock | |stock | ||
|bool | |bool | ||
− | | | + | | |
|all | |all | ||
− | |Defaults to ''' | + | |Defaults to '''true'''. This was previously used to mark paintjobs available when purchasing a truck when true, and only available from the upgrade shop when false. Currently must be set to '''false''' to avoid undesirable behavior. |
|- | |- | ||
|paint_job_mask | |paint_job_mask | ||
|string | |string | ||
| | | | ||
− | | | + | |colormask, airbrush |
− | |Defines the path to the texture resource (.tobj) to be used for color masking (colormask) or for blending (airbrush) | + | |Defines the path to the texture resource (.tobj) to be used for color masking (colormask) or for blending (airbrush). |
|- | |- | ||
− | | | + | |base_texture |
|string | |string | ||
| | | | ||
|all | |all | ||
− | | | + | |Can be used to override the base texture of the truckpaint material. Requires that all truckpaint materials on the vehicle use the same base texture in the first place. |
|} | |} |
Revision as of 20:32, 30 May 2017
The accessory_paint_job_data unit class is used to define paint jobs for trucks and trailers (as of ETS2 1.25/ATS 1.4).
Contents
Usage
Airbrush
In the airbrush mode, the RGB of paint_job_mask is blended with the base color, using the alpha channel as the blend factor. This mode is active when the attribute airbrush is true.
Colormask
In the colormask mode, each of paint_job_mask's color channels (RGB) acts as a mask for a color being blended over the base texture. They are applied in the order blue, green, and red. So the red channel has the highest “priority”, followed by green and then blue.
TIP: Texture compression can lead to some minor aliasing at sharp boundaries between the mask channels. To avoid colors ‘bleeding through’ at these boundaries, try blending some of the lower-priority channel ‘under’ the higher-priority channel along their shared boundary. For example, at a sharp boundary between the red (255, 0, 0) and green (0, 255, 0) channels, a thin line of the base color may be visible. This can be mitigated by extending the edge of the lower-priority mask ‘under’ the higher-priority mask. So in the case where there is a sharp line between the red mask and the green mask, the green mask should be extended slightly into the area of the red mask. The resultant color looking at the RGB image would be yellow (255, 255, 0).
Attributes
Many common attributes are inherited from accessory_data.
Name | Type | Default Value | Modes | Description |
---|---|---|---|---|
mask_r_color | float3 | colormask | Defines the default color applied to each channel of the color mask. | |
mask_g_color | ||||
mask_b_color | ||||
base_color | float3 | all | Defines the default color of the paint job. | |
mask_r_locked | bool | colormask | When false, the player may change each channel's color via the color picker. | |
mask_g_locked | ||||
mask_b_locked | ||||
base_color_locked | bool | all | When false, the player may change the base color via the color picker. | |
flip_color_locked | bool | flipflake | When false, the player may change the flip color via the color picker. | |
flake_color_locked | bool | flipflake | When false, the player may change the flake color via the color picker. | |
flip_color | float3 | flipflake | ||
flip_strength | float | flipflake | ||
flake_color | float3 | flipflake | ||
flake_uvscale | float | flipflake | ||
flake_density | float | flipflake | ||
flake_shininess | float | flipflake | ||
flake_clearcoat_rolloff | float | flipflake | ||
flake_noise | string | flipflake | Path to the flipflake texture. | |
flipflake | bool | When true, flipflake (metallic/pearlescent) behavior and attributes are enabled. Cannot be used with colormask. | ||
airbrush | bool | When true, airbrush behavior and attributes are enabled. Cannot be used with colormask. | ||
alternate_uvset | bool | all | When true, the resulting material will have the altuv flavor. This triggers usage of the alternate UV layout, if configured. | |
stock | bool | all | Defaults to true. This was previously used to mark paintjobs available when purchasing a truck when true, and only available from the upgrade shop when false. Currently must be set to false to avoid undesirable behavior. | |
paint_job_mask | string | colormask, airbrush | Defines the path to the texture resource (.tobj) to be used for color masking (colormask) or for blending (airbrush). | |
base_texture | string | all | Can be used to override the base texture of the truckpaint material. Requires that all truckpaint materials on the vehicle use the same base texture in the first place. |