; Let’s quickly attach a simple navigator to a newly created mesh.
[INCLUDE: common/navigators.ini]
[NAVIGATOR_0 : Navigator_StyleSygic] ; we need it named exactly NAVIGATOR_0 to reference later
Meshes = dettagli_interni_001_001
@ = Navigator_Size, Resolution = "1920, 2100", Size = "475, 810", Offset = "1447, 29", Scale = 1.5 ; these values 
  ; are a bit of a mess because of mentioned curvature (had to add padding to screen mesh to make sure there
  ; wouldn’t be any holes), usually Size would match Resolution and Offset would be zero. Also to note, extra 
  ; shapes can actually be more than just rectangles and could follow that curvature precisely, but it works
  ; well enough like this, so why going a more tedious route?
Brightness = 0.5
UPCOMING_TURN_DISTANCE_ROUND_TO = 100
DYNAMIC_OPACITY = 0 ; and we’re disabling whole thing from the start

; Now, let’s prepare rear view camera. Script could access actual mirrors and use them, but we only need it 
; to work with reverse gear, so it would be pretty wasteful to add another mirror which would be hidden most
; of the time. So we’re creating a new rendering camera located somewhere above rear license plate.
[RENDERING_CAMERA_0]
DYNAMIC_TEXTURE_ID = camera_rear ; here, we will create “dynamic::camera_rear” texture
POSITION = 0, 0.685, -2.46
DIRECTION = 0, -0.5, -1
INCLUDE_CAR = 1
REFRESH_RATE = 30  ; doesn’t need to update too often, those in-car cameras are usually pretty nasty
INTERIOR_ONLY = 1  ; stop rendering if camera is not interior one
CLIP_NEAR = 0.005  ; the way it’s positioned, it needs to render things that are very close (bits of car)
FOV = 170          ; huge FOV to get that authentic look
RESOLUTION = 1904, 1264 ; and massive resolution too
ACTIVE_BY_DEFAULT = 0 ; inactive by default, activated by a script
WITH_LIGHTING = 1
; RELATIVE_TO = PORTA_SX_001_001

; Can’t really render camera like that with that huge FOV, gotta add a bit of preprocessing, namely — 
; fisheye filter to get it look curved and zoomed in in the middle.
[TEXTURE_PREPROCESSING_...]
DYNAMIC_TEXTURE_ID = camera_rear_distorted ; new “dynamic::camera_rear_distorted” texture
TEXTURE_SOURCE = dynamic::camera_rear ; use previously specificed camera texture
RESOLUTION = 476, 316 ; target resolution matches screen one, RESOLUTION for camera is just that multiplied by four
EFFECT = FISHEYE  ; use BASIC if you only need color correction (SATURATION, BRIGHTNESS, etc.)
INTENSITY = 1  ; intensity of fisheye effect, adjusted for 170° FOV
EXPOSURE = 0.05     ; this value activates tonemapping to get image from HDR to LDR space
BRIGHTNESS = 0.5  ; a bit dimmer

; And now it all comes together in a simple scriptable display.
[SCRIPTABLE_DISPLAY_...]
MESHES = dettagli_interni_001_001
RESOLUTION = 704, 632 ; matches values in navigator
DISPLAY_POS = 380, 31
DISPLAY_SIZE = 400, 200
FORCE_UPDATE_AFTER = NAVIGATOR_0  ; this display is going to be updated each time navigator is drawn
KEEP_BACKGROUND = 1               ; and without clearing step, so we would draw on top of navigator
SCRIPT = '
function update()
  if car.gear ~= -1 then  
    -- If gear is not reverse, activate navigator:
    ac.setDynamicTextureShift("NAVIGATOR_0", 1)  -- this function sets its opacity, it can do more
    ac.setRenderingCameraActive("RENDERING_CAMERA_0", false)  -- pause rendering camera
    return  -- and we’re done here, so let’s stop
  end
  -- Gear is reverse!
  ac.setDynamicTextureShift("NAVIGATOR_0", 0)  -- let’s stop navigator
  ac.setRenderingCameraActive("RENDERING_CAMERA_0", true)  -- activate rendering camera
  display.image{pos = vec2(0, 0), size = vec2(515, 210), image = "dynamic::camera_rear_distorted"}  -- and draw fisheye camera
  -- And we’re done! But for a bit of extra authenticity let’s add lines with trajectory:
  local startL = vec2(60, 210)  -- one thing to note: I haven’t really properly calibrated those lines yet
  local startR = vec2(476 - 60, 210)
  local direction = vec2(35, -25):normalize()
  local lineLen = 160
  local steps = 9
  local steerOffset = -car.steer * 0.12
  local currentPosL = startL
  local currentPosR = startR
  local color = rgbm(1, 0, 0, 1)
  for i = 1, steps do
    local newPosL = startL + direction * (i * (lineLen / steps)) + vec2(steerOffset * (i / steps) ^ 2, 0)
    local newPosR = startR + vec2(-direction.x, direction.y) * (i * (lineLen / steps)) + vec2(steerOffset * (i / steps) ^ 2, 0)
    local drawAcrossColor = color
    if i == 4 then
      color = rgbm(1, 1, 0, 1)
    elseif i == 7 then
      color = rgbm(0, 1, 0, 1)
    else
      drawAcrossColor = i == 9 and color or nil
    end
    ui.drawLine(currentPosL, newPosL, color, 4)
    ui.drawLine(currentPosR, newPosR, color, 4)
    if drawAcrossColor ~= nil then
      ui.drawLine(currentPosL, currentPosR, drawAcrossColor, 4)
    end
    currentPosL = newPosL
    currentPosR = newPosR
    direction:add(vec2(0, 0.02)):normalize()
  end
  -- And a warning:
  display.rect{pos = vec2(40, 276), size = vec2(396, 32), color = rgbm(0, 0, 0, 0.8 )}
  display.text{pos = vec2(40, 286), letter = vec2(12, 20), text = "Check surroundings for safety", font = "aria", width = 396, alignment = 0.5 }
end'



[INCLUDE: common/custom_emissive.ini]
HeatingMult = 0.5

[Material_PhotoelasticGlass]
Meshes = 
ExteriorGlassHeadlightsMaterials = EXT_GLASS
PhotoelasticityBaseScale = 4      ; this parameter alters scale in general
PhotoelasticityNoiseScale = 0.04  ; deeply affects randomization process, careful with it
PhotoelasticitySpotsScale = 0.5   ; spots for limiting effect to some areas
PhotoelasticitySpotsOffset = 0.2  ; offset for spots, to try and fit effect nice on existing meshes
PhotoelasticityStripesScale = 4   ; how many stripes are there
ProfileFix = 0.02
Refraction = 1

[BRAKEDISC_FX]
ACTIVE = 1          ; set to 0 to disable the whole thing if car uses ksBrakeDisc shader for something else
CERAMIC = 0           ; use ceramic look
CARVED = 0          ; add a bit of carving, radial lines (fast for shader to compute)
CARVED_FREQUENCY = 1  ; increase to make more lines
GLOW_OFFSET = 0.2      ; increase to offset heated and worn center more to the center, decrease to offset it more to the outside area; with 0.5, it would be in the middle

[CustomEmissiveMulti]
Meshes =rb2,l1,tcoff     ; target mesh
Resolution = 1024, 1024     ; texture resolution for coordinates to work
@ = AlphaFromTxDiffuse
Intensity = 1

@ = MultiItem, Role = TURNSIGNAL_LEFT, Start = "178.9, 122.1", Size = "44.7, 31.5"
@ = MultiItem, Role = TURNSIGNAL_RIGHT, Start = "289.3, 122.4", Size = "44.5, 31"
@ = MultiItem, Role = TRACTIONCONTROL_INACTION, Start = "367.3, 200.4", Size = "34.2, 37.7"
@ = MultiItem, Role = DashWarningTC, Start = "367.9, 199.6", Size = "32.4, 39"

[EMISSIVE_TURNSIGNAL_LEFT_0]
RANGE_PREFIX = FOG_LIGHT.001
RANGE_START_INDEX = 0
RANGE_END_INDEX = 9
RANGE_DELAY=0.03 ; to compensate for that there are more of them
COLOR=230,120,0,8
OFF_COLOR=0,0,0
LAG=0.3
REPEAT_FREQENCY_HZ=2
LOCATION=REAR
SIMULATE_HEATING=0
CAST_LIGHT=1
REPEAT_FREQENCY_HAZARDS_HZ=2

[EMISSIVE_TURNSIGNAL_RIGHT_0]
RANGE_PREFIX = R_signal_
RANGE_START_INDEX = 0
RANGE_END_INDEX = 9
RANGE_DELAY=0.03 ; to compensate for that there are more of them
COLOR=230,120,0,8
OFF_COLOR=0,0,0
LAG=0.3
REPEAT_FREQENCY_HZ=2
LOCATION=REAR
SIMULATE_HEATING=0
CAST_LIGHT=1
REPEAT_FREQENCY_HAZARDS_HZ=2

[INCLUDE: common/materials_interior.ini]

[Material_InteriorPBR]
Materials = mat_alcantara
BrightnessAdjustment = 0.28
Reflectance = 0.0
DetailTextureBlur = 0.29
DetailScale = 73
DetailNormalBlend = 2
UseClothShading = 0
ClothSheenColor = 0, 0, 0

[Material_Plastic_v1]
Materials = mat_black_interior
Reflectance = 0.085
DetailNormalPBRSecondaryColor = 0, 0, 0, 0.5
DetailNormalBlend = 0.9
DetailNormalTexture = common/pbr_plastic.dds
DetailNormalPBRSmoothnessGamma = 9
DetailTextureBlur = 0.1
DetailScale = 25
BrightnessAdjustment = 0.1

[Material_Plastic_v2]
Materials = mat_plastica_nera
Reflectance = 0.095
DetailNormalPBRSecondaryColor = 0, 0, 0, 0.5
DetailNormalBlend = 0.9
DetailNormalTexture = common/pbr_plastic.dds
DetailNormalPBRSmoothnessGamma = 2
DetailTextureBlur = 0.1
DetailScale = 25
BrightnessAdjustment = 0.2

[Material_Plastic_v2]
Materials = Plasticc
Reflectance = 0.095
DetailNormalPBRSecondaryColor = 0, 0, 0, 0.5
DetailNormalBlend = 0.9
DetailNormalTexture = common/pbr_plastic.dds
DetailNormalPBRSmoothnessGamma = 2
DetailTextureBlur = 0.1
DetailScale = 25
BrightnessAdjustment = 0.1


[Material_Carbon]
Materials = mat_carbonio
HasDetailNormals = 1
BrightnessAdjustment = 0.1
Smoothness = 0.8
Reflectance = 0.13
CubemapReflectionBlur = 0.35
UseClearCoat = 1
ClearCoatSmoothness = 1.0
ClearCoatIntensity = 1.0
DetailTexture = common/carbon.png
DetailNormalTexture = common/carbon_nm.png
DetailNormalBlend = 1
DetailScale = 450

[Material_Carbon]
Materials =retro 
HasDetailNormals = 1
BrightnessAdjustment = 0.1
Smoothness = 0.8
Reflectance = 0.13
CubemapReflectionBlur = 0.35
UseClearCoat = 1
ClearCoatSmoothness = 1.0
ClearCoatIntensity = 1.0
DetailTexture = common/carbon.png
DetailNormalTexture = common/carbon_nm.png
DetailNormalBlend = 1
DetailScale = 300


[Material_Metal]
Materials =mat_wheels
CubemapReflectionBlur = 0.1
BrightnessAdjustment = 1.5

[Material_Carbon]
Materials = Carbon_int
HasDetailNormals = 1
BrightnessAdjustment = 0.3
Smoothness = 0.8
Reflectance = 0.48
CubemapReflectionBlur = 0.35
UseClearCoat = 1
ClearCoatSmoothness = 1.0
ClearCoatIntensity = 1.0
DetailTexture = common/carbon.png
DetailNormalTexture = common/carbon_nm.png
DetailNormalBlend = 1
DetailScale = 300

[Material_Carbon]
Materials = BODY_PARTS
HasDetailNormals = 1
BrightnessAdjustment = 0.1
Smoothness = 0.8
Reflectance = 0.28
CubemapReflectionBlur = 0.35
UseClearCoat = 1
ClearCoatSmoothness = 1.0
ClearCoatIntensity = 1.0
DetailTexture = common/carbon.png
DetailNormalTexture = common/carbon_nm.png
DetailNormalBlend = 1
DetailScale = 300


[Material_Metal_v2]
Materials = mat_dettagli_interni
Metalness = 1
BrightnessAdjustment = 0.3
LocalReflectionsSharpness = 0.5
BrightnessAdjustment = 0.2
DetailNormalBlend = 1
DetailScale = 50
DetailNormalPBRSmoothnessGamma = 100
Smoothness = 0.95

[Material_Metal_v2]
Materials = jaune,bouchon
Metalness = 1
BrightnessAdjustment = 1
LocalReflectionsSharpness = 0.5
BrightnessAdjustment = 1
DetailNormalBlend = 1
DetailScale = 50
DetailNormalPBRSmoothnessGamma = 100
Smoothness = 0.95

[Material_Metal_v2]
Materials = ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾ﾿￯﾿ﾯ￯ﾾﾾ￯ﾾﾯ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾﾾ￯ﾾ﾿￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾﾾ￯ﾾﾯ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾ﾿￯﾿ﾯ￯ﾾﾾ￯ﾾﾯ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾﾾ￯ﾾ﾿￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾ﾿￯﾿ﾯ￯ﾾﾾ￯ﾾﾯ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾﾾ￯ﾾﾯ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾ﾿￯﾿ﾯ￯ﾾﾾ￯ﾾﾯ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾﾾ￯ﾾ﾿￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾﾾ￯ﾾﾯ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾ﾿￯﾿ﾯ￯ﾾﾾ￯ﾾﾯ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾ﾿￯﾿ﾯ￯ﾾﾾ￯ﾾﾯ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾ﾿￯ﾾﾯ￯﾿ﾯ￯ﾾﾾ￯ﾾﾾ￯﾿ﾯ￯ﾾﾾ￯ﾾ﾿_d263921
Metalness = 1
LocalReflectionsSharpness = 0.5
BrightnessAdjustment = 0.5
DetailNormalBlend = 1
DetailScale = 50
DetailNormalPBRSmoothnessGamma = 100
Smoothness = 0.95

[Material_Metal_v2]
Materials = black
Metalness = 1
BrightnessAdjustment = 1
LocalReflectionsSharpness = 0.5
BrightnessAdjustment = 0.20
DetailNormalBlend = 1
DetailScale = 50
DetailNormalPBRSmoothnessGamma = 100
Smoothness = 0.95

[Material_Metal_v2]
Meshes =Carrozzeria_interna_nera1_002_001
Metalness = 0.1
BrightnessAdjustment = 0.1
LocalReflectionsSharpness = 0.5
BrightnessAdjustment = 0.5
DetailNormalBlend = 1
DetailScale = 50
DetailNormalPBRSmoothnessGamma = 100
Smoothness = 0.95

[Material_InteriorPBRDetail]
Materials = rims.001,rims,rims.002,rims.003
ColorSource=DIFFUSE
Reflectance=0.1
Smoothness=0.05
Metalness=0.03
CubemapReflectionBlur=0.66
Brightness=0.0
OcclusionMult=1.3
DetailScale=30
ApplyTilingFix=1

[Material_Aluminium_v2]
Meshes =Object010,Wheel_01_LR002,Object015,Wheel_01_LR004,Wheel_01_LR004_SUB1,Wheel_01_LR002_SUB1,Grille2,Plastica_Lucida_Azzurro_003_001.001,Carrozzeria_interna_nera1_003_001.005

[INCLUDE: common/materials_license_plate.ini]
[Material_LicensePlate_Europe]

[Material_Leather_v2]
Materials = CSR2_Interior_Zone1
ApplyTilingFix = 0
Reflectance = 0.0055
ColorSource = DIFFUSE
DetailScale = 60
DetailNormalTexture = leather_seat.dds
DetailNormalIntensity = 2.5
DetailNormalPBRReflectance = 1
DetailNormalPBRSecondaryColor = 1, 1, 1, 0.035
Brightness = 0.5

[Material_Leather_v2]
Materials = 
ApplyTilingFix = 0
Reflectance = 0.0075
ColorSource = DIFFUSE
DetailScale = 60
DetailNormalTexture = leather_seat.dds
DetailNormalIntensity = 2.5
DetailNormalPBRReflectance = 1
DetailNormalPBRSecondaryColor = 1, 1, 1, 0.035
Brightness = 0

[Material_Leather]
Materials=CSR2_InteriorTillingColourZone
BrightnessAdjustment = 0.15

[BRAKEDISC_FX]
ACTIVE = 1             ; set to 0 to disable the whole thing if car uses ksBrakeDisc shader for something else
CERAMIC = 1            ; use ceramic look
CARVED = 0             ; add a bit of carving, radial lines (fast for shader to compute)
CARVED_FREQUENCY = 20  ; increase to make more lines
GLOW_OFFSET = 0.8      ; increase to offset heated and worn center more to the center, decrease to offset it more to the outside area; with 0.5, it would be in the middle

; Patch guesses holes from alpha-channel of txDiffuse. Holes don’t glow or reflect stuff and look dark:
ALPHA_MASK = 0.1, 0.2  ; hole is everything with alpha below 0.1, everything with alpha above 0.2 is not a hole, in-between is a transition

; Patch can also estimate deepenings based on luminance and normal texture. Deepenings glow with a delay (but fully heated, glow more) and are a bit occluded:
LUMINOCITY_MASK = 0.01, 0.02  ; everything darker than 0.01 is a deepening
NORMAL_MASK = 0.5, 0.3        ; everything looking away more than 50% is a deepening

; Patch would try and guess size of brake disc and its inside area from its mesh, but if it fails:
DISC_RADIUS = 0.35           ; radius of a brake disc
DISC_INTERNAL_RADIUS = 0.25  ; radius of an inside part of a brake disc

; Another feature is that patch would mask reflections with rim, stopping brake disc from reflecting sky if looked at a angle. By default it would use rim radius and 60% of wheel width (for the distance between brake disc and exterior part) from “tyres.ini”, could be changed if needed:
RIM_RADIUS = 0.35  ; inside radius of a rim
RIM_HEIGHT = 0.2   ; distance between surface of brake disc and vertical surface of a wheel rim

[INCLUDE: common/custom_emissive.ini]
HeatingMult = 0.5

[CustomEmissive]
Meshes =body_PARTS.004,FOG_LIGHT.001,Object017
@ = CustomEmissive_Rect, Channel = 3, Mirror, Start = 0, Size = 1
@ = TurningLightsFront, Channel = 3, Intensity = 2

[CustomEmissive]
Meshes = 
@ = CustomEmissive_Color, Channel = 3, Mirror, Color = "1, 0.5, 0"
@ = TurningLightsFront, Channel = 3, Intensity = 2, NotCastingLight
PROP_... = fresnelMaxLevel, 1
PROP_... = fresnelEXP, 5
PROP_... = fresnelC, 0.5
PROP_... = extColoredReflection, 1	

[CustomEmissive]
Meshes = 
@ = CustomEmissive_Rect, Channel = 3, Mirror, Start = 0, Size = 1
@ = TurningLightsRear, Channel = 3, Intensity = 2

Meshes = BLOOM_fari004.002,BLOOM_fari004.003
@ = CustomEmissive_Rect, Channel = 1, Start = "0, 0", Size = "0, 0"
@ = ReverseLights, Channel = 1, Intensity = 4

[Material_Glass]
Meshes= glass
IOR = 2.4            ; looks better like this
FilmIOR = $IOR       ; redefine IOR for external film layer to increase reflections
ThicknessMult = 4  ; thicker glass passes less light through
ProfileFix = 0.04    ; adds thickness to glass for glazing angles
MaskPass = 5            ; mask pass opacity
MaskPassColor = 255, 255, 255  ; mask pass color adjustment

[Material_Glass]
Materials = CAR_glass
FilmIOR = 1.9
[INCLUDE: common/materials_glass.ini]
ExteriorGlassFilmedMaterials= 
ExteriorGlassTintedMaterials=  glass_ext
ExteriorGlassHeadlightsMaterials = glass_ext


[INCLUDE: common/materials_glass.ini]
[Material_Glass]
Meshes = LW_WIDESCREEN_ALLEGERITO_001_001,porta_sx_vetri_002_001,BLOOM_vetro_car_002_001,porta_dx_vetro_002_001
ThicknessMult = 2
EXTRA_MASK_PASS = 10
EXTRA_MASK_PASS_OPACITY = 5
MaskPass = 1           ; mask pass opacity
MaskPassColor = 250, 250, 250  ; mask pass color adjustment

[Material_PhotoelasticGlass]
Meshes= BLOOM_vetro_car,BLOOM_vetro_car001

[Material_Glass]
Meshes = glass
ThicknessMult = 3
EXTRA_MASK_PASS = 10
EXTRA_MASK_PASS_OPACITY = 3
MaskPass = 1           ; mask pass opacity
MaskPassColor = 250, 250, 250  ; mask pass color adjustment

[EMISSIVE_EXTRA_A_2]
NAME=FOG_LIGHT,FOG_LIGHT.001
COLOR=100,100,100,2
ACT_AS_HEADLIGHTS=1
BLINK_REPEAT=0
CAST_LIGHT=0
CLUSTER_THRESHOLD=0.5
DIGITAL_INSTRUMENTS_IF_ACTIVE=0
DIGITAL_INSTRUMENTS_IF_ACTIVE_INVERSE=0
INPUT_LAG_DOWN=0
INPUT_LAG_UP=0
INPUT_MOD=0
INPUT_ROUND=0
INPUT_STALLED_LAG=0
INPUT_STALLED_VALUE=nan
INPUT_THRESHOLD_INVERSE=0
LAG=0.8
OFF_COLOR=0, 0, 0
ONLY_WITH_HEADLIGHTS=0
SIMULATE_HEATING=0.4
SYNC_BLINKING=0
TOGGLE_VISIBILITY=0
TOGGLE_VISIBILITY_INVERSE=0
USE_SMOOTH_TRANSITION=0

[Material_InteriorPBRDetail]

[Material_Leather_v2]
Materials = INTERIOR
Reflectance = 0.04
Smoothness = 0.07
DetailScale = 1100
DetailNormalIntensity = 1.3
ColorSource = DIFFUSE
ApplyTilingFix = 1
Brightness = 0.4

[EMISSIVE_LIGHT_...]
NAME=MAIN_LIGHT
COLOR=600,600,600
LAG=0.8
SIMULATE_HEATING=0.6
CAST_LIGHT=1 
LOCATION=FRONT


[SelfLight_Headlights]
MIRROR = 0.656
DIRECTION = 0.2, .8, 1.9
POSITION = 0, 0.606, 2
AFFECTS_TRACK = 1
DIFFUSE_CONCENTRATION = 1
BOUND_TO = light_front
SPOT_SHARPNESS = 0.6
SPOT = 131
COLOR =14,14,15,10
SPECULAR_MULT = 0
RANGE = 0.5

[SelfLight_Headlights]
MIRROR = 0.6
DIRECTION = 02.2, .8, 1.9
POSITION = 0, 0.6, 1.9
AFFECTS_TRACK = 1
DIFFUSE_CONCENTRATION = 1
BOUND_TO = Object001
SPOT_SHARPNESS = 0.5
SPOT = 131
COLOR =14,14,19,15
SPECULAR_MULT = 0
RANGE = 0.5	

[SelfLight_Headlights]
MIRROR = 0
DIRECTION = 02.2, .8, 1.9
POSITION = 0.801, 0.749, 1.72
AFFECTS_TRACK = 1
DIFFUSE_CONCENTRATION = 1
BOUND_TO = Object001
SPOT_SHARPNESS = 0.5
SPOT = 200
COLOR =14,14,19,10
SPECULAR_MULT = 0
RANGE = 0.5	

[SelfLight_Headlights]
MIRROR = 0
DIRECTION = 02.2, .8, 1.9
POSITION = -0.801, 0.749, 1.72
AFFECTS_TRACK = 1
DIFFUSE_CONCENTRATION = 1
BOUND_TO = Object001
SPOT_SHARPNESS = 0.5
SPOT = 200
COLOR =14,14,19,10
SPECULAR_MULT = 0
RANGE = 0.5	

[SelfLight_Headlights]
MIRROR = 0.706
DIRECTION = 0,0,-1
POSITION = 0, 0.783, -1.8
AFFECTS_TRACK = 1
DIFFUSE_CONCENTRATION = 1
BOUND_TO = light_rear
SPOT_SHARPNESS = 0.5
SPOT = 150
COLOR =14,2,0,2
SPECULAR_MULT = 0
RANGE = 0.5

[EMISSIVE_TURNSIGNAL_LEFT_0]
NAME=BLOOM_fari003
COLOR=50,25, 0, 2
OFF_COLOR=25,25,25, 1.8
LAG=0.3
REPEAT_FREQENCY_HZ=2.0
LOCATION=FRONT
REPEAT_FREQENCY_HAZARDS_HZ=50.0
CAST_LIGHT=0

[EMISSIVE_TURNSIGNAL_LEFT_1]
NAME=cofango_fanali_001_001.002
COLOR=50,20, 0, 0.5
LAG=0.3
REPEAT_FREQENCY_HZ=2.0
LOCATION=FRONT
REPEAT_FREQENCY_HAZARDS_HZ=50.0
CAST_LIGHT=0

[EMISSIVE_TURNSIGNAL_LEFT_2]
NAME=BLOOM_fari004.004
COLOR=50,20, 0, 1
LAG=0.3
REPEAT_FREQENCY_HZ=2.0
LOCATION=FRONT
REPEAT_FREQENCY_HAZARDS_HZ=50.0
CAST_LIGHT=0


[EMISSIVE_TURNSIGNAL_RIGHT_0]
NAME=BLOOM_fari003.001
COLOR=50,20, 0, 2
OFF_COLOR=25,25,25, 1.8
LAG=0.3
REPEAT_FREQENCY_HZ=2.0
LOCATION=FRONT
REPEAT_FREQENCY_HAZARDS_HZ=50.0
CAST_LIGHT=0

[EMISSIVE_TURNSIGNAL_RIGHT_1]
NAME=cofango_fanali_001_001.001
COLOR=50,20, 0, 0.5
LAG=0.3
REPEAT_FREQENCY_HZ=2.0
LOCATION=FRONT
REPEAT_FREQENCY_HAZARDS_HZ=50.0
CAST_LIGHT=0

[EMISSIVE_TURNSIGNAL_RIGHT_2]
NAME=BLOOM_fari004.001
COLOR=50,20, 0, 1
LAG=0.3
REPEAT_FREQENCY_HZ=2.0
LOCATION=FRONT
REPEAT_FREQENCY_HAZARDS_HZ=50.0
CAST_LIGHT=0

[EMISSIVE_EXTRA_A_2]
NAME=Leds 2
COLOR=100,100,100,2
ACT_AS_HEADLIGHTS=1
BLINK_REPEAT=0
CAST_LIGHT=0
CLUSTER_THRESHOLD=0.5
DIGITAL_INSTRUMENTS_IF_ACTIVE=0
DIGITAL_INSTRUMENTS_IF_ACTIVE_INVERSE=0
INPUT_LAG_DOWN=0
INPUT_LAG_UP=0
INPUT_MOD=0
INPUT_ROUND=0
INPUT_STALLED_LAG=0
INPUT_STALLED_VALUE=nan
INPUT_THRESHOLD_INVERSE=0
LAG=0.8
OFF_COLOR=0, 0, 0
ONLY_WITH_HEADLIGHTS=0
SIMULATE_HEATING=0.4
SYNC_BLINKING=0
TOGGLE_VISIBILITY=0
TOGGLE_VISIBILITY_INVERSE=0
USE_SMOOTH_TRANSITION=0

[Material_Glass]
Materials = Glass003
FilmIOR = 1.9

[Material_Glass]
Meshes = Glass003
ThicknessMult = 2
EXTRA_MASK_PASS = 10
EXTRA_MASK_PASS_OPACITY = 5
MaskPass = 1           ; mask pass opacity
MaskPassColor = 250, 250, 250  ; mask pass color adjustment

[CustomEmissiveMulti]
Meshes = Object021,Object020     ; target mesh
Resolution = 1024, 512     ;s texture resolution for coordinates to work
@ = AlphaFromTxDiffuse
Intensity = 5

@ = MultiItem, Role = TURNSIGNAL_LEFT, Start = "164.9, 210.5", Size = "16.1, 13.2"
@ = MultiItem, Role = TURNSIGNAL_RIGHT, Start = "702.2, 210.2", Size = "16.1, 13.2"

[INSTRUMENTS]
HAZARDS_G_THRESHOLD = 1.65  ; set G-force for hazards to turn on automatically on sudden braking

;FOG LIGHTS
[EMISSIVE_EXTRA_D_1]
NAME=Coloured.001,Coloured.002
COLOR=1, 1, 1,300
OFF_COLOR=0,0,0
LAG=0.0
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=1
CLUSTER_THRESHOLD=0.5
LOCATION=MIDDLE03:23 03/03/2022


;Left Fog Cast Light
[LIGHT_EXTRA_1] 
BOUND_TO= Coloured.001
COLOR=1,1,1,25
LAG=0.8
DIFFUSE_CONCENTRATION=1
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=100
FADE_SMOOTH=5
MIRROR=0
POSITION=-0.65,0.2,1.9
DIRECTION=-0.7,0,1.7
RANGE=10
RANGE_GRADIENT_OFFSET=0.5
SPECULAR_MULT=3
SPOT=45
SPOT_SHARPNESS=0.1
VOLUMETRIC_LIGHT=0

;Right Fog Cast Light
[LIGHT_EXTRA_2] 
BOUND_TO= Coloured.002
COLOR=1,1,1,25
LAG=0.8
DIFFUSE_CONCENTRATION=1
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=100
FADE_SMOOTH=5
POSITION=0.65,0.2,1.9
DIRECTION=0.7,0,1.7
RANGE=10
RANGE_GRADIENT_OFFSET=0.5
SPECULAR_MULT=3
SPOT=45
SPOT_SHARPNESS=0.1
VOLUMETRIC_LIGHT=0

[AUDIO_VOLUME]
ENGINE_EXT = 1
ENGINE_INT = 1
GEAR_EXT = 0.3
GEAR_INT = 0.3
BODYWORK = 0.3
WIND = 0.3
DIRT = 0.3
DOWN_SHIFT = 0.3
HORN = 1.5
GEAR_GRIND = 0.3
BACKFIRE_EXT = 0.3
BACKFIRE_INT = 0.3
TRACTION_CONTROL_EXT = 0.3
TRACTION_CONTROL_INT = 0.3
TRANSMISSION = 0.3

[EMISSIVE_HIGHBEAM_...]
NAME = BLOOM_fari002
COLOR = 255,255,255
OFF_COLOR = 0, 0, 0 
LOCATION = front 

[ANIMATION_0]
FILE=car_door_L.ksanim
TIME= 1.5
BIND_TO_EXTRA_A=1

[ANIMATION_1]
FILE=car_door_R.ksanim
TIME= 1.5
BIND_TO_EXTRA_B=1

[EMISSIVE_LIGHT_...]
NAME=MAIN_LIGHT
COLOR=600,600,600
LAG=0.8
SIMULATE_HEATING=0.6
CAST_LIGHT=1 
LOCATION=FRONT
	
[INCLUDE: common/selflighting.ini]

[SelfLight_Headlights]
MIRROR = 0.656
DIRECTION = 0.2, .8, 1.9
POSITION = 0, 0.606, 2
AFFECTS_TRACK = 1
DIFFUSE_CONCENTRATION = 1
BOUND_TO = light_front
SPOT_SHARPNESS = 0.6
SPOT = 131
COLOR =14,14,15,10
SPECULAR_MULT = 0
RANGE = 0.5

[SelfLight_Headlights]
MIRROR = 0.6
DIRECTION = 02.2, .8, 1.9
POSITION = 0, 0.6, 1.9
AFFECTS_TRACK = 1
DIFFUSE_CONCENTRATION = 1
BOUND_TO = Object001
SPOT_SHARPNESS = 0.5
SPOT = 131
COLOR =14,14,19,15
SPECULAR_MULT = 0
RANGE = 0.5	

[SelfLight_Headlights]
MIRROR = 0
DIRECTION = 02.2, .8, 1.9
POSITION = 0.801, 0.749, 1.72
AFFECTS_TRACK = 1
DIFFUSE_CONCENTRATION = 1
BOUND_TO = Object001
SPOT_SHARPNESS = 0.5
SPOT = 200
COLOR =14,14,19,10
SPECULAR_MULT = 0
RANGE = 0.5	

[SelfLight_Headlights]
MIRROR = 0
DIRECTION = 02.2, .8, 1.9
POSITION = -0.801, 0.749, 1.72
AFFECTS_TRACK = 1
DIFFUSE_CONCENTRATION = 1
BOUND_TO = Object001
SPOT_SHARPNESS = 0.5
SPOT = 200
COLOR =14,14,19,10
SPECULAR_MULT = 0
RANGE = 0.5	

[SelfLight_Headlights]
MIRROR = 0.706
DIRECTION = 0,0,-1
POSITION = 0, 0.783, -1.8
AFFECTS_TRACK = 1
DIFFUSE_CONCENTRATION = 1
BOUND_TO = light_rear
SPOT_SHARPNESS = 0.5
SPOT = 150
COLOR =14,2,0,2
SPECULAR_MULT = 0
RANGE = 0.5

[SelfLight_Headlights]
POSITION= 0 , 0.593 , 1.72 
BOUND_TO= BLOOM_fari002 
MIRROR= 0.711

[EMISSIVE_...]
INPUT = TRACTIONCONTROL
INPUT_THRESHOLD = 0
NAME = STO
OFF_COLOR = 25, 0, 0
COLOR = 2.5, 2.5, 2.5

[EMISSIVE_...]
INPUT = TRACTIONCONTROL
INPUT_THRESHOLD_UPPER_INC = 1
NAME = Pioggia
COLOR = 25, 0, 0
OFF_COLOR = 2.5, 2.5, 2.5

[EMISSIVE_...]
INPUT = TRACTIONCONTROL
INPUT_THRESHOLD = 1
NAME = trofeo
COLOR = 25, 0, 0
OFF_COLOR = 2.5, 2.5, 2.5

[PARTICLES_FX_EXHAUST_1]
POSITION = -0.360,0.545,-2.2		; self explanatory
DIRECTION = 0, 0.3, -1 			; self explanatory
COLOR = 0.75,0.8,1 			; RGB blend - 0,0,0 is black, 1,1,1 is white
LIFE = 1, 2 				; how long particles last in the air before disappearing
SPEED = 0.5, 1 				; how fast smoke particles fly from the exhaust
SPREAD = 0.25				; initial spread of particles
STARTING_SIZE = 0.04			; initial size of particles
SPAWN_OFFSET = 0.02			; initial spawn point offset (length-wise)
INTENSITY = 0.2, 0.3			; smoke intensity
TEMPERATURE_LAG = 1 			; engine heating up (1 to disable)
SPEED_THRESHOLD = 15, 100 		; speed at which the smoke disappears
	

[PARTICLES_FX_EXHAUST_2]
POSITION = 0.360,0.545,-2.2	; self explanatory
DIRECTION = 0, 0.3, -1 			; self explanatory
COLOR = 0.75,0.8,1 			; RGB blend - 0,0,0 is black, 1,1,1 is white
LIFE = 1, 2 				; how long particles last in the air before disappearing
SPEED = 0.5, 1 				; how fast smoke particles fly from the exhaust
SPREAD = 0.25				; initial spread of particles
STARTING_SIZE = 0.04			; initial size of particles
SPAWN_OFFSET = 0.02			; initial spawn point offset (length-wise)
INTENSITY = 0.2, 0.3			; smoke intensity
TEMPERATURE_LAG = 1 			; engine heating up (1 to disable)
SPEED_THRESHOLD = 15, 100 		; speed at which the smoke disappears

[LIGHT_FLAME_0]
BRIGHTNESS_MULT=1
CAR_BRIGHTNESS_MULT=1.8
CAR_RANGE_MULT=0.2
COLOR=5,1,1,1
DEBUG=0
DIRECTION_MULT=1, 1, 1
FADE_AT=150
FADE_SMOOTH=30
OFFSET=0.2
RANGE=7
RANGE_GRADIENT_OFFSET=0.2
SPOT=238.322
SPOT_SHARPNESS=0.8

[EXHAUST_FLAMES]
ANTILAG=0 ; turbo antilag, i havent tested this yet
ANTILAG_DELAY=0.0 ; how long after antilag trigger do flames start, in seconds
ANTILAG_INTENSITY=10 ; flame size
ANTILAG_INTERVAL_MAX=6000
ANTILAG_INTERVAL_MIN=7000
ANTILAG_TURBO_THRESHOLD=0.0
DAMAGE=0 ; engine damage? idk
DAMAGE_DURATION=0.00
DAMAGE_INTENSITY=0
DAMAGE_PROBABILITY=0
DISCHARGE=1 ; lifting off the throttle
DISCHARGE_CHARGE_TIME=0 ; how long you have to press the throttle to "charge" the flames
DISCHARGE_DELAY=.4 ; delay after throttle lift
DISCHARGE_DURATION=0.05 ; length of flame shooting, in seconds
DISCHARGE_PROBABILITY=1; chance of flame shoot on lift, 1 is guaranteed, 0 is never
DISCHARGE_INTENSITY=10; flame size
DISCHARGE_RPM_THRESHOLD_MAX=7300 ; self explanatory
DISCHARGE_RPM_THRESHOLD_MIN=2000 ; self explanatory
DISCHARGE_WATER_TEMPERATURE_THRESHOLD=60
FLAT_SHIFT=1 ; on upshift
FLAT_SHIFT_COOLDOWN=0 ; after upshift
FLAT_SHIFT_DURATION=0.1 ; length of flame shooting, in seconds
FLAT_SHIFT_GAS_THRESHOLD=50 ; how much gas needs to be pressed on upshift for flame, 100 is wide open
FLAT_SHIFT_INTENSITY=1 ; flame size
FLAT_SHIFT_PROBABILITY=1 ; chance of flame shoot on upshift
FLAT_SHIFT_RPM_THRESHOLD=6500
LIMITER=1 ; on hitting the limiter
LIMITER_DELAY=0.5 ; delay, in seconds
LIMITER_INTENSITY=0.1 ; flame size
LIMITER_RPM_THRESHOLD=8800 ; limiter flames will not shoot below this rpm



[WOBBLY_BIT_...]
NAME = EXHAUST          ; name of the node to move
CONNECTED_TO = 1, 1, 1   ; point to which node is attached to, and around which it will rotate
MAX_RANGE = 0.004                ; max range node can move from its original position
DAMPENING_LAG = 0.9            ; think of it as usual AC lag value, trying to zero node’s speed
G_GAIN = 24                      ; how much G-forces affect node’s speed
GRAVITY_GAIN = 3                ; how much gravity affects node’s speed
OFFSET_GAIN = 2000              ; how strong is returning force
STIFF_AXIS = 1, 1, 0            ; optional higher stiffness axis to reduce movement along it
STIFF_AXIS_STIFFNESS = 1      ; now stiff is optional stiffness axis
G_FILTER = 0                    ; temporal filter for G-forces
DEFAULT_GRAVITY_INCLUDED_ALREADY = 1 ; either `0` or `1`; set it to `1` if you don’t want gravity to skew your stuff when car is in neutral position

