Skins

Skins are special parts that replace specific materials with different materials when equipped. They are mostly used for vehicle liveries or other paint designs, as well as selecting interior colors and designs.

Skins have a lower priority than glowMaps , so in order to replace a material using a skin, all 3 output materials defined in the glowMap need to be replaced. They also have a lower priority than deformGroups , so the damaged variant of the material also has to be replaced.

They are defined as global modifiers in the root part of Jbeam, similarly to license plate properties. As such, they are seen by every component of the vehicle.

Global modifiers

These two modifiers can be used interchangably. The only difference is that skinName will not be reported by some system when dumping data in the console.

string
type
Name of the skin
string
type
Name of the skin

Material syntax

The replacement materials of the skins are defined in materials.json files like normal materials. Usually, they are present in a separate file called skin.materials.json for clarity. The way the skin will work is defined in the "mapTo" section of the material (which is usually the same as the name for clarity). It has 3 parts separated by dots:

"mapTo": "pickup.skin.ambulance",

The first part is the mapTo value of the material that will be replaced. On most vehicles, the material containing the exterior paint will have the same mapTo value as the name of the vehicle.

The second part is the material slot. Material slots allow different parts to replace different materials. The material slot is determined by the slotType of the slot where the part that calls the skin is. The material slot will be the same as slotType if the slotType contains "skin_" in the name. When the slotType is "paint_design", then the material slot will be just "skin".

The third part is the skin name. This is defined by the global modifiers described in the section above. They can be used interchangably, but for the sake of clarity, it’s better to use globalSkin on skins that modify the main exterior paint, and skinName on all others.

The rest of the syntax is the same as a normal material. Refer to the skin system reference page and material examples for further details.

Dynamic Textures

Dynamic Textures is an auxiliary skin present on every vehicle which allows it to be painted via the livery editor in career mode. The Jbeam syntax should look like this:

{
"moonhawk_skin_dynamicTextures": {
    "information":{
        "authors":"BeamNG",
        "name":"Dynamic Textures",
        "isAuxiliary": true,
        "value":1350
    },
    "slotType" : "paint_design",
    "dynDecalMaterials": ["moonhawk", "moonhawk_nosecone_alt"],
    "globalSkin" : "dynamicTextures"
  },
}

It includes an optional Jbeam section called dynDecalMaterials, which is a table with materials of the vehicle the system will affect. If this section is not present, the system will affect a material with the same name as the vehicle.

Simple example

A standard vehicle livery.

Jbeam:

"pickup_skin_ambulance": {
    "information":{
        "authors":"BeamNG",
        "name":"Ambulance Livery",
        "value":5000,
    },
    "slotType" : "paint_design",
    "globalSkin" : "ambulance",
},

Beginning of skin.materials.json:

"pickup.skin.ambulance": {
  "name": "pickup.skin.ambulance",
  "mapTo": "pickup.skin.ambulance",
  "class": "Material",
  /* ... */
},

Advanced example

A skin that replaces the visual look of vehicle lights.

Jbeam:

"etki_skin_lights_alt": {
    "information":{
        "authors":"BeamNG",
        "name":"Alternate Lights",
        "value":200
    },
    "slotType" : "skin_lights",
    "globalSkin" : "lights_alt"
},

All the relevant materials in skin.materials.json:

"etki_lights.skin_lights.lights_alt": {
  "name": "etki_lights.skin_lights.lights_alt",
  "mapTo": "etki_lights.skin_lights.lights_alt",
  "class": "Material",
  /* ... */
},
"etki_lights_dmg.skin_lights.lights_alt": {
  "name": "etki_lights_dmg.skin_lights.lights_alt",
  "mapTo": "etki_lights_dmg.skin_lights.lights_alt",
  "class": "Material",
  /* ... */
},
"etki_lights_on.skin_lights.lights_alt": {
  "name": "etki_lights_on.skin_lights.lights_alt",
  "mapTo": "etki_lights_on.skin_lights.lights_alt",
  "class": "Material",
  /* ... */
},
"etki_lights_on_intense.skin_lights.lights_alt": {
  "name": "etki_lights_on_intense.skin_lights.lights_alt",
  "mapTo": "etki_lights_on_intense.skin_lights.lights_alt",
  "class": "Material",
  /* ... */
},
Last modified: 30/1/2024 11:05

Any further questions?

Join our discord