{
"polo17_headlight_R": {
    "information":{
        "authors":"BeamNG",
        "name":"Right Headlight",
        "value":320,
    },
    "slotType" : "polo17_headlight_R",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"polo17_glass", "deformMaterialDamaged":"polo17_glass_dmg"},
         ["polo17_headlightglass_R", ["polo17_headlight_R"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound3", "deformVolume":0.5}],
         {"deformGroup":""},
         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"polo17_glass", "deformMaterialDamaged":"polo17light"},
         ["polo17_headlight_R", ["polo17_headlight_R"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound3", "deformVolume":0.5}],
         {"deformGroup":""},
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightBrightness":0.25,
            "lightRange":70,
            "lightColor":{"r":235, "g":235, "b":255, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":true,
            "flareName":"vehicleHeadLightFlare",
            "flareScale":0.25,
            "cookieName":"art/special/BNG_light_cookie_headlight.dds"
            "texSize":512,
            "shadowSoftness":0.4,
        },
        //low beams
        ["lowbeam"    , "SPOTLIGHT"        , "he4r", "he3r", "he2r", {"x":190, "y":-40, "z":45} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.25, "y":0.4, "z":0.08},"lightRange":50,"lightBrightness":0.5,"flareScale":0.07,"deformGroup":"headlightglass_R_break"}],
        //high beams
        ["highbeam" ,         "SPOTLIGHT"        , "he4r", "he3r", "he2r", {"x":190, "y":-30, "z":30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.6, "y":0.4, "z":0.07},"lightRange":80,"lightBrightness":0.8,"flareScale":0.08,"deformGroup":"headlightglass_R_break"}],
        //signal
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
             "lightColor":{"r":254, "g":150, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        ["signal_R"    , "SPOTLIGHT"        , "he4r", "he3r", "he2r", {"x":200, "y":0, "z":30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.9, "y":-0.3, "z":-0.01},"flareScale":0.015,"lightBrightness":0.08,"deformGroup":"headlightglass_R_break"}],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--HEADLIGHT--
         //right
         {"selfCollision":true},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.75},
         {"group":"polo17_headlight_R"},
         ["he1r", -0.45280, -1.98381, 0.66198],
         ["he3r", -0.45916, -2.00384, 0.61673],
         ["he2r", -0.72118, -1.72889, 0.72986],
         ["he4r", -0.72095, -1.78869, 0.62427],
         {"selfCollision":false},
         ["he5r", -0.60095, -1.73696, 0.66952],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--HEADLIGHT--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":600600,"beamDamp":90},
          {"beamDeform":13350,"beamStrength":62750},
          //headlight main shape
          {"deformLimitExpansion":1.1},
          {"deformGroup":"headlightglass_R_break", "deformationTriggerRatio":0.05},
          //r
          ["he1r","he2r"],
          ["he3r","he4r"],
          ["he1r","he3r"],
          ["he2r","he4r"],

          ["he1r","he4r"],
          ["he2r","he3r"],

          ["he1r","he5r"],
          ["he2r","he5r"],
          ["he3r","he5r"],
          ["he4r","he5r"],

          //attach
          {"deformLimitExpansion":""},
          {"beamSpring":600600,"beamDamp":90},
          {"beamDeform":11000,"beamStrength":20500},
          //r
          {"breakGroup":"headlight_R_a"},
          ["he5r","f15rr"],
          ["he2r","f15rr"],
          ["he4r","f15rr"],
          ["he4r","f19rr"],

          {"beamDeform":11000,"beamStrength":22500},
          {"breakGroup":"headlight_R_b"},
          ["he1r","f15r"],
          ["he1r","f15rr"],
          ["he3r","f15r"],
          ["he3r","f13rr"],
          ["he5r","f15r"],
          {"breakGroup":""},
          {"deformGroup":""},

          //headlight support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":600600,"beamDamp":90},
          {"beamDeform":13200,"beamStrength":330000},
          {"optional":true},
          ["he2r","h4"],
          ["he4r","h5"],
          ["he3r","h4r"],
          {"optional":false},
          ["he4r", "f14r"],
          ["he2r", "f14r"],
          ["he3r", "f12rr"],
          ["he1r", "f12rr"],
          ["f19rr", "he2r"],
          ["f11rr", "he1r"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //right headlight
            {"groundModel":"plastic"},
            {"group":"polo17_headlight_R"},
            {"dragCoef":3},
            ["he3r","he1r","he4r"],
            ["he4r","he1r","he2r"],
            ["he4r","he2r","he5r"],
            ["he1r","he5r","he2r"],
            ["he3r","he5r","he1r"],
            ["he4r","he5r","he3r"],
            {"group":""},
    ],
},
"polo17_headlight_L": {
    "information":{
        "authors":"BeamNG",
        "name":"Left Headlight",
        "value":320,
    },
    "slotType" : "polo17_headlight_L",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"polo17_glass", "deformMaterialDamaged":"polo17_glass_dmg"},
         ["polo17_headlightglass_L", ["polo17_headlight_L"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound4", "deformVolume":0.5}],
         {"deformGroup":""},
         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"polo17_glass", "deformMaterialDamaged":"polo17light"},
         ["polo17_headlight_L", ["polo17_headlight_L"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound4", "deformVolume":0.5}],
         {"deformGroup":""},
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightBrightness":0.25,
            "lightRange":70,
            "lightColor":{"r":235, "g":235, "b":255, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":true,
            "flareName":"vehicleHeadLightFlare",
            "flareScale":0.25,
            "cookieName":"art/special/BNG_light_cookie_headlight.dds"
            "texSize":512,
            "shadowSoftness":0.4,
        },
        //low beams angled right slightly to avoid blinding oncoming traffic
        ["lowbeam"    , "SPOTLIGHT"        , "he4l", "he3l", "he2l", {"x":-48, "y":30, "z":-45} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.25, "y":0.35, "z":-0.08},"lightRange":50,"lightBrightness":0.5,"flareScale":0.07,"deformGroup":"headlightglass_L_break"}],
        //high beams
        ["highbeam" ,         "SPOTLIGHT"        , "he4l", "he3l", "he2l", {"x":-40, "y":30, "z":-40} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.6, "y":0.4, "z":-0.07},"lightRange":80,"lightBrightness":0.8,"flareScale":0.08,"deformGroup":"headlightglass_L_break"}],
        //signal
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
             "lightColor":{"r":254, "g":150, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        ["signal_L"    , "SPOTLIGHT"        , "he4l", "he3l", "he2l", {"x":-20, "y":0, "z":-30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.9, "y":-0.3, "z":0.01},"flareScale":0.015,"lightBrightness":0.08,"deformGroup":"headlightglass_L_break"}],
     ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--HEADLIGHT--
         //left
         {"selfCollision":true},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.75},
         {"group":"polo17_headlight_L"},
         ["he1l", 0.44267, -1.98542, 0.66235],
         ["he3l", 0.44984, -2.00573, 0.61857],
         ["he2l", 0.71239, -1.73605, 0.72802],
         ["he4l", 0.71397, -1.79616, 0.62587],
         {"selfCollision":false},
         ["he5l", 0.58833, -1.74107, 0.66965],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--HEADLIGHT--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":600600,"beamDamp":90},
          {"beamDeform":13350,"beamStrength":128000},
          //headlight main shape
          {"deformLimitExpansion":1.1},
          {"deformGroup":"headlightglass_L_break", "deformationTriggerRatio":0.05},
          //l
          ["he1l","he2l"],
          ["he3l","he4l"],
          ["he1l","he3l"],
          ["he2l","he4l"],

          ["he1l","he4l"],
          ["he2l","he3l"],

          ["he1l","he5l"],
          ["he2l","he5l"],
          ["he3l","he5l"],
          ["he4l","he5l"],

          //attach
          {"deformLimitExpansion":""},
          {"beamSpring":600600,"beamDamp":90},
          {"beamDeform":11000,"beamStrength":20500},
          //l
          {"breakGroup":"headlight_L_a"},
          ["he5l","f15ll"],
          ["he2l","f15ll"],
          ["he4l","f15ll"],
          ["he4l","f19ll"],

          {"beamDeform":11000,"beamStrength":22500},
          {"breakGroup":"headlight_L_b"},
          ["he1l","f15ll"],
          ["he1l","f15l"],
          ["he3l","f15l"],
          ["he3l","f13ll"],
          ["he5l","f15l"],
          {"breakGroup":""},
          {"deformGroup":""},

          //headlight support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":600600,"beamDamp":90},
          {"beamDeform":13200,"beamStrength":330000},
          {"optional":true},
          ["he2l","h4"],
          ["he4l","h5"],
          ["he3l","h4l"],
          {"optional":false},
          ["he4l", "f14l"],
          ["he2l", "f14l"],
          ["he3l", "f12ll"],
          ["he1l", "f12ll"],
          ["f19ll", "he2l"],
          ["f11ll", "he1l"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //left headlight
            {"groundModel":"plastic"},
            {"group":"polo17_headlight_L"},
            {"dragCoef":3},
            ["he1l","he3l","he4l"],
            ["he1l","he4l","he2l"],
            ["he2l","he4l","he5l"],
            ["he5l","he1l","he2l"],
            ["he5l","he3l","he1l"],
            ["he5l","he4l","he3l"],
            {"group":""},
    ],
},
}