SnowRunner

SnowRunner

Discover a wealth of new maps, vehicles, modes, and more, all created by the community! Discover something new every day and expand your SnowRunner experience.

Find the game on Epic Games, Xbox, Playstation, Facebook, Twitter, Instagram, Reddit, Forums, Discord.

Integration of Trucks and Addons. Part #5.

This guide describes the integration of Trucks and Addons. Part #5 of this guide covers custom skins and colorization (Chapter 15).

2 comments

Posted by on (updated ago)


Please refer to:

  • Part #1 of this guide - for the general info on modding files (Chapters 1-4).
  • Part #2 for general aspects of the XML structure (Chapters 5-6).
  • Part #3 for description of tags and attributes used for Meshes and Trucks (Chapters 7-8).
  • Part #4 for description of tags and attributes used for Suspensions, Engines, Gearboxes, Wheels, and Addons (Chapters 9-14).

This part describes particular tags and attributes used for the creation of custom skins and colorization. The hierarchy of sections below corresponds to the hierarchy of tags.

NOTE: When describing attributes, we will mark mandatory attributes with *.

If you want an offline copy, you can download this full guide in PDF format from here and Russian here.

15. Color Customization

This chapter describes tags that allow you to create custom skins and colorize your trucks and addons.
After you create and configure them, variants of such customization for a particular truck can be selected in the Garage:

skin customization

Main terms used in this chapter:

  • the override of the material (the <MaterialOverride> tag) - the override that sets new values to a necessary number of parameters of a truck material. And, also, specifies the zones of this material where the custom colors will be applied (up to 3 colors).
  • the customization preset (the <CustomizationPreset> tag) - this preset allows you to assign a specific button in the Garage menu to replace the parameters of one or more materials of the track and its addons. And, along with that, it sets particular color tints for three layers of paint customization.

The main process of creating a new type of color customization is the following:

  1. Visually define the areas where you want to perform repainting.
  2. Find all the materials of the truck and its addons that should be repainted upon a selection of a single button in the Garage menu.
  3. For every material found on the step #2 above, create its own MaterialOverride block with the necessary parameters.
  4. Specify the same value of the Name attribute to all the overrides of the materials from the step #3 above.
  5. For every set of colors you want to use for painting, create its own customization preset (CustomizationPreset).
  6. Specify the name from the step #4 above as the value of the MaterialOverrideName attribute for all created customization presets (MaterialOverrideName == Name). These presets will change the paint color for this set of overridden materials.

You can create several customizations, where each customization will override a certain number of materials. For example, you can both repaint the truck and draw an airbrushed image on it. And, you can implement it as two different customizations. After that, you can create several color presets for each of these customizations, to get the desired number of coloring options for each customization as a result. That is, you will get several different color options for repainting the truck and several color options for its airbrush image. And all of these options will be available in the Garage.

For example, we can configure two customizations (namedskin_00 and skin_01) as shown in the screenshot below:

sample customizations

As you can see, we override the materials of the truck in the skin_00 customization and the materials of both the truck and the truck cabin in the skin_01 customization. For skin_00, we create 4 different color presets. For skin_00, we create 3 different color presets.
As a result, we will have 7 color customization buttons in the Garage. The first 4 buttons will correspond to 4 different color options of skin_00. The last 3 buttons will correspond to 3 different color options of skin_01.

15.1. <CombineXMesh>

The root tag of the XML file of the Mesh.

For information about this tag and its child tags - see "7. <CombineXMesh>" in Part #3 of this guide.

15.1.1. <MaterialOverrides>

Section responsible for material customization.

This section may contain several child tags of the <MaterialOverride> type, where the materials specified for the truck are overridden.

15.1.1.1. <MaterialOverride>

The override of the material.

Any truck material defined by the <Material> tag can be overridden in the <MaterialOverride> tag. For description of the <Material> tag - see "7.2. <Material>" in Part #3 of this guide.

Using the <MaterialOverride> tag, you can replace the material maps with other ones and change the color tint. For the created MaterialOverride block, you can specify the zones that will be affected by this change of color. Each particular overridden material can have up to three color tints.

With <MaterialOverride>, you can override all the attributes of the <Material> tag. The attributes that you do not override will keep their initial values specified in the <Material> tag. Below, we will list all the attributes of the <MaterialOverride> tag. However, we will omit descriptions of the attributes that are identical to the attributes of the <Material> tag.

Attributes:

  • Name="skin_00"
    The name of the customization (see "15. Color Customization" above). This name links the override of the material with color presets. All color presets of the truck (defined by the <CustomizationPreset> tags) with the value of the MaterialOverrideName attribute matching the specified Name value, will set the color tint parameters for this material. See "15.2.1.1. <CustomizationPreset>" below.
  • TargetMaterialName="mod_scout_mat"
    The name of the material that will be overridden, as it is specified in the <Material> tag. See "7.2. <Material>" in Part #3 of this guide.
  • TintMap="trucks/mod_scout_cc__d.tga"
    The map that defines the paint zones.
    tint map preview
    These zones are set via RGB channels. Thus, you can set up to three tint colors:
    3 colors on the button

    NOTE: The TintMap defines only the zones themselves, but not the tint values that will be used for colorization of these zones. The tint values are defined in the customiztion_preset.xml (see "15.2. <TruckSet>" below), inside the <CustomizationPreset> tags.

    The channels of this map allow you to set the following:
    • R - the main color. Low values on the R mask correspond to the decrease in the colorization for ALL layers. Along with that, this color defines the overall paint zone. I.e., for all areas that are not painted in the red channel, the color tint will not change, regardless of the values ​​specified for these areas in the green and blue channels. Since this color defines the overall paint area, scratches and chips can be painted only in the red layer.
      tint map preview - R channel
    • G - the second layer for painting.
      tint map preview - G channel
    • B - the third layer for painting.
      tint map preview - B channel
  • TintMaskScale="1.01"
    The multiplier for the value of Tint from the TintMap texture (see above). This multiplier allows you to make a sharper border of the mask. If the TintMap is made correctly, this multiplier is not necessary.
  • AlbedoMap="trucks/mod_scout_wt__d.tga"
    The map with the base color of the surface. This can be either a map with a completely new coloring for the vehicle or a map prepared for the change of the tint.
    For correct tinting, all areas where you want to apply the tint should be white. The brightness of the white color should be, on average: RGB 220: 220: 220.
    For example, on the pictures below, you can see the original texture (the 1st picture), the texture, which is prepared for painting (the 2nd picture), and the zones of painting (the 3rd picture).
    3 pictures of maps

Other attributes are the same as the attributes of the <Material> tag and simply override its corresponding values:

  • AlphaKill
  • Blending
  • NormalMap
  • NormalScale
  • ShadingMap
  • MetalnessScale
  • MetalnessВias
  • RoughnessScale
  • RoughnessВias
  • AmbientOcclusionIntensity
  • ReflectivityMultiplier
  • EmissiveMap
  • SnowUpIntensity
  • SnowUpNormalsSpace
  • SnowUpNoiseIntensity
  • SnowUpNoiseScale
  • SnowUpAngleRange
  • SnowUpFlatten
  • SnowifyNoiseIntensity
  • SnowifyNoiseIntensityShift
  • SnowifyNoiseTilingMult
  • ForceSnowUnderwater

For a description of these attributes, see "7.2. <Material>" in Part #3 of this guide.

15.2. <TruckSet>

The root tag of the class file of material customization (сlasses/customization_presets/customization_preset.xml).

The class of material customization for the track needs to be created in a separate file at the following path: /classes/customization_presets/customization_preset.xml. The <TruckSet> tag needs to be the root tag of this file.

15.2.1. <Truck>

The customization block for the particular truck.

Attributes:

  • Name="mod_scout"
    Name of the XML class of the truck. Please note that you need to specify here the name of the XML class of the truck, not the XML class of the mesh (they can be different).

15.2.1.1. <CustomizationPreset>

The customization preset.

This tag creates the customization preset, i.e. specifies particular colors for the zones that you marked for painting in the TintMap attribute in the <MaterialOverride> tag. To link the color preset to the overrides of the necessary materials, you need to set in the MaterialOverrideName attribute of the <CustomizationPreset> tag the same value that you have specified in the Name attribute of the <MaterialOverride> tag.

Along with colors, in each preset, you need to specify the identifier of the color button in the Garage, which will enable your customization of the vehicle with these colors applied.

NOTE on Addons: The color can be changed both for the truck and for its addons. You do not need to create customization presets for addons, color settings for them are taken from the color settings of the truck.
For example, in the pictures below, the bumper from Pacific P16 is installed on TUZ 166. MaterialOverrides are configured on Pacific P16 and, along with that, there is also an override with the "skin_00" name, which is also configured for TUZ 166. Therefore, after installation of this bumper to TUZ 166, this bumper is colorized with the color of the truck.
addon
colored addon

Attributes:

  • MaterialOverrideName="skin_00"
    Name of the override of the material, which is defined in the XML of the mesh of the truck, in the <MaterialOverride> tag (in its Name attribute).
  • Id="0"
    Identifier of the color button in the Garage. The sequence of these identifiers starts with zero. You should not use the same identifier twice (it must be unique) and you should not skip numbers in the sequence of identifiers. In the case of a duplicated identifier, the value of the preset will be ignored by the game. If you skip some values in the sequence of identifiers, the game will create superfluous non-functional buttons for the skipped values.
    ids of color buttons
  • TintColor1="g(117; 18; 38)"
    The color of the first layer. It is applied to the texture using the R-channel mask of the TintMap, which is defined in the <MaterialOverride> tag (see "15.1.1.1. <MaterialOverride>" above).
  • TintColor2="g(117; 18; 38)"
    The color of the second layer. It is applied to the texture using the G-channel mask of the TintMap, which is defined in the <MaterialOverride> tag (see "15.1.1.1. <MaterialOverride>" above).
  • TintColor3="g(117; 18; 38)"
    The color of the third layer. It is applied to the texture using the B-channel mask of the TintMap, which is defined in the <MaterialOverride> tag (see "15.1.1.1. <MaterialOverride>" above).
  • IsSpecialSkin="true"
    This option marks this color preset as a special one, which may be necessary to attract the player's attention to it. Buttons of special presets are displayed with the “palette and brush” icon on them (see below).
    Default value: false.
    special preset



To be continued :)

2 comments

Join the community or sign in with your gaming account to join the conversation:

MO
moogle4u @moogle4u

SnowRunner_Support,

Is there a way to change the color of an add-on for an existing vehicle in-game via mod? or is it possible to update the game assets on your end to correct the mismatches?

For example:

The Freightliner M916A1 has a default color of Green w/ White Stripe

The default color of the "Freightliner Visor" add-on is the same Green

If you change the color of the truck to brown or red or any other color, the visor remains Green and does not change.

I've noticed this with several vehicles. It seems the functionality is there, based on what you posted in this guide, but it was not fully implemented in the base game assets?

It would be really nice to be able to have things match, because it's quite frustrating when I want to use a particular piece, like the visor, but the color does not match the color of the truck.

Thanks!
-Jin

SR
SnowRunner_Support @snowrunner-support

Hi! Thanks for your feedback! We will think what we can do.
Regarding "Is there a way to change the color of an add-on for an existing vehicle in-game via mod?" - No, this is not possible.