[INCLUDE: common/materials_interior.ini] 
[INCLUDE: common/navigators.ini]
[INCLUDE: common/selflighting.ini]
[INCLUDE: common/no_popup_lights.ini]
[INCLUDE: common/materials_glass.ini]
[INCLUDE: common/materials_interior.ini]
[INCLUDE: common/materials_carpaint.ini]
[INCLUDE: common/gt3_exhaust_glow.ini]
[INCLUDE: common/custom_emissive.ini]
[INCLUDE: navigators_mixins.ini]
[INCLUDE: android_auto/config.ini]
[INCLUDE: pbr_int.ini]
[INCLUDE: pbr_ext.ini]


[LIGHT_HEADLIGHT_0]
AFFECTS_TRACK=1
BOUND_EMISSIVE_MAX=500
BOUND_EXP=0.2
COLOR=8,10,11,0.3
DIFFUSE_CONCENTRATION=0.88
DIRECTION=0, -0.2, 1
EXTERIOR_ONLY=0
FADE_AT=450
FADE_SMOOTH=50
INTERIOR_ONLY=0
LOWBEAM_RANGE_MAX=200
LOWBEAM_RANGE_MULT=1l
LOWBEAM_RANGE_ONCOMING_MULT=0.4
MIRROR=0.41
MIRROR_DIRECTION=1
OFF_FADE_MULT=0.3
OFF_MIRROR=0.41
OFF_MULT=0
OFF_POSITION=0, 0.5, 1.74877
OFF_RANGE_MULT=0.3
POPUP_ENABLED=0
POSITION=0, 0.5, 2.30
RANGE=220
RANGE_GRADIENT_OFFSET=0
SECOND_SPOT=80
SECOND_SPOT_INTENSITY=1
SECOND_SPOT_RANGE=20
SECOND_SPOT_SHARPNESS=0.0
SECOND_SPOT_SKIP=0.0
SPECULAR_MULT=1
SPOT=65
SPOT_EDGE=0.0922464, 0.0919776, 0.09144
SPOT_EDGE_SHARPNESS=21.2
SPOT_SHARPNESS=0
SPOT_UP=0.02, 0.999847, 0

[LIGHT_BRAKE_0]
AFFECTS_TRACK=1
COLOR=1, 0, 0, 3
DIFFUSE_CONCENTRATION=0.88
DIRECTION=0, 0, -1
EXTERIOR_ONLY=1
FADE_AT=120
FADE_SMOOTH=30
INTERIOR_ONLY=0
MIRROR=0.468203
OFF_COLOR=1, 0.0911936, 0.0265662, 1.35
OFF_FADE_MULT=0.674586
OFF_MIRROR=0.549986
OFF_MULT=0.1
OFF_POSITION=0, 0.54357, -1.98224
OFF_RANGE_MULT=0.767561
POSITION=0, 0.547034, -1.98224
RANGE=3
RANGE_GRADIENT_OFFSET=0.4
SPECULAR_MULT=1
SPOT=165.5
SPOT_EDGE=0.582, 0.582, 0.582
SPOT_EDGE_SHARPNESS=10
SPOT_SHARPNESS=0.3475

[LIGHT_REVERSE_0]
AFFECTS_TRACK=1
COLOR=1, 1, 1, 1
DIFFUSE_CONCENTRATION=0.88
DIRECTION=0, 0, -1
EXTERIOR_ONLY=1
FADE_AT=120
FADE_SMOOTH=30
INTERIOR_ONLY=0
MIRROR=0
OFF_FADE_MULT=0.3
OFF_MIRROR=0
OFF_POSITION=0, 0.635145, -2.07249
OFF_RANGE_MULT=0.5
POSITION=0, 0.635145, -2.07249
RANGE=3
RANGE_GRADIENT_OFFSET=0.5
SPECULAR_MULT=1
SPOT=165.5
SPOT_EDGE=0.582, 0.582, 0.582
SPOT_EDGE_SHARPNESS=0
SPOT_SHARPNESS=0.3475

------------------------------MIRRORS------------------------------------------------


[REAL_MIRROR_0]
ASPECT_MULT=0.780000
FLIP=0
FOV=13.890000
IS_MONITOR=0
MONITOR_SHADER_TYPE=1.000000
ROTATION=0.160000,-0.010000

[REAL_MIRROR_1]
ASPECT_MULT=1.150000
FLIP=0
FOV=13.060000
IS_MONITOR=0
MONITOR_SHADER_TYPE=1.000000
ROTATION=0.000000,0.000000

[REAL_MIRROR_2]
ASPECT_MULT=0.740000
FLIP=0
FOV=10.000000
IS_MONITOR=0
MONITOR_SHADER_TYPE=1.000000
ROTATION=-0.000000,-0.010000

-----------------------------INSTRUMENTS---------------------------------------------------------------

[INSTRUMENTS]
FUEL_SPLASH_MULT=0
HAZARDS_G_THRESHOLD=1.5
SPEED_FIX=1
SPEED_LAG=0.92
SPEED_LIMIT=

[INSTRUMENTS]
RPM_VINTAGE =1 ; set to 1 to enable the whole thing
RPM_VINTAGE_ROUND_TO = 0 ; to what RPMs needle should snap
RPM_VINTAGE_DELAY = 0.11 ; delay between updates
RPM_VINTAGE_SPEED_LAG = 0.80 ; inertia value, from 0 to 1 (needle won’t move with 1)
RPM_VINTAGE_LIMIT = 0 ; set to some

---------------------EXTERIOR PBR SHADERS------------------------------------------------------------- 


[REFLECTIONS_FX]
ALLOW_INTERIOR_SSAO=0
ALLOW_INTERIOR_SSGI=0
AUTOFIX=1
MASK_CUBEMAP_ENABLED=1
MASK_CUBEMAP_OFFSET=0, -0.1, 0.2
MASK_CUBEMAP_TWEAK=0.5

[SMART_MIRROR]
DISALLOW_MAPPING_NORMALIZATION=0
DISALLOW_REAR_MIRROR=0
DISALLOW_REFLECTION_TILTING=0
SHAKING=0

[STATUS_BATTERY]
BASE_VOLTAGE=12.4
MAX_VOLTAGE=13.6
RPM_LAG=0.98

[STATUS_OIL]
PRESSURE_BASE=1
PRESSURE_LAG_DOWN=0.9985
PRESSURE_LAG_UP=0.998
PRESSURE_STEP=0.7
TEMPERATURE_LAG_DOWN=0.995
TEMPERATURE_LAG_UP=0.995
TEMPERATURE_MULT=1
TEMPERATURE_OFFSET=0
TEMPERATURE_RPM_FACTOR=0.03

[BRAKEDISC_FX]
ACTIVE = 1   
REFRESH = 1          ; set to 0 to disable the whole thing if car uses ksBrakeDisc shader for something else
CERAMIC = 0         ; use ceramic look
CARVED = 30              ; add a bit of carving, radial lines (fast for shader to compute)
CARVED_FREQUENCY = 10  ; increase to make more lines
GLOW_OFFSET = 0.5   ; 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
DEBUG = 0
DISC_INTERNAL_RADIUS = 0.110
DISC_RADIUS = 0.200
ALPHA_MASK = 0.012, 0.07
LUMINOCITY_MASK = 0.08 0.3
WEAR_FORCE = 0.6
;GLOW_FORCE = 0.0

--------------------------------WIPERS---------------------------------------------------------------------------------

[WIPERS] ; Wiper Shake 
FRONT_0= 
FRONT_1= 
REAR_0= 
WIND_THRESHOLDS_MPH = 60, 200 ; speed for wipers to start vibrating and for maximum vibration
WIND_AMPLITUDE_MULT = 1 ; multiplier for amplitude
WIND_FREQUENCY_MULT = 1 ; multiplier for frequency
WIND_OFFSET = 0.03 ; base animation 

[ANIMATED_WIPER_...]
MESHES = m235_439
UNDERLYING_SURFACE = windscreen
DEBUG = 0 ; remove when everything is ready
[ANIMATED_WIPER_0]
DEBUG = 1
MESHES = m235_439
UNDERLYING_SURFACE = windscreen
GROUP_0 = 'm235_439@A=3-4,12-17'
GROUP_0_ANGLE_TO = 80.9
GROUP_0_AXIS = -0.42088214, 0.6255099, 0.65695924
GROUP_0_AXIS_OFFSET_0 = 0, 0.70710677, 0.70710677
GROUP_0_AXIS_OFFSET_1 = 0, 0.70710677, 0.70710677
GROUP_0_END = -0.7096338, 0.99573517, 0.96928513
GROUP_0_PIVOT = 0.087276936, 0.8827194, 1.1724138
GROUP_0_RUBBER_FROM = 0.06437615, 0.9585937, 1.1047081
GROUP_0_RUBBER_OFFSET_AMOUNT = 0.0081
GROUP_0_RUBBER_OFFSET_POS = 0.738717
GROUP_0_RUBBER_TO = -0.6705644, 0.97325087, 0.91104555
GROUP_0_BASE_AXIS = -0.42088214, 0.6255099, 0.65695924
GROUP_0_BASE_PIVOT = 0.087276936, 0.8827194, 1.1724138
GROUP_1 = 'm235_439@A=1-2,5-11'
GROUP_1_ANGLE_TO = 77.3
GROUP_1_AXIS = 0, 0.70710677, 0.70710677
GROUP_1_AXIS_OFFSET_0 = 0, 0.70710677, 0.70710677
GROUP_1_AXIS_OFFSET_1 = 0, 0.70710677, 0.70710677
GROUP_1_END = -0.20840311, 0.98587674, 1.0578678
GROUP_1_PIVOT = 0.59580547, 0.86222976, 1.1026698
GROUP_1_SCALE_LUT = '(|0.000=1.000|0.994=0.975|)'


[MESH_ADJUSTMENT_...]
MESHES = 
MOVE_TO = modelRoot:y

[BASIC]
DISABLE_WIPER_KSANIM = 1

---------------------------EMISSIVE_BRAKE------------------------------------------------------------------------------

[EMISSIVE_BRAKE_0]  
NAME=f30_30,f30_32
COLOR=200,10,10
FALLBACK_HEADLIGHTS_COLOR=0,0,0
FALLBACK_BRAKES_COLOR=280,10,10
FALLBACK_BRAKES_COLOR_HIGHER=1
BIND_TO_HEADLIGHTS=0
LAG=0.8
SIMULATE_HEATING=0
LOCATION=REAR
CAST_LIGHT=1

[EMISSIVE_BRAKE_1]  
NAME=f30_26
COLOR=200,0,0
FALLBACK_HEADLIGHTS_COLOR=0,0,0
FALLBACK_BRAKES_COLOR=350,0,0
FALLBACK_BRAKES_COLOR_HIGHER=1
BIND_TO_HEADLIGHTS=0
LAG=0.8
SIMULATE_HEATING=0
LOCATION=REAR
CAST_LIGHT=1

[EMISSIVE_BRAKE_2]  
NAME=
COLOR=0,0,0
FALLBACK_HEADLIGHTS_COLOR=0,0,0
FALLBACK_BRAKES_COLOR=0,0,0
FALLBACK_BRAKES_COLOR_HIGHER=1
BIND_TO_HEADLIGHTS=0
LAG=0.8
SIMULATE_HEATING=0
LOCATION=REAR
CAST_LIGHT=1
---------------------------EMISSIVE_LIGHT-----------------------------------------------------------------------------

[EMISSIVE_LIGHT_...]
NAME=boost_0,boost_1,boost_2,boost_3,boost_4,boost_5,boost_6,boost_7,boost_8,boost_9,boost_10,boost_11,boost_12,boost_13,boost_14,boost_15,boost_16,boost_17,boost_18,boost_19,boost_20,boost_21,boost_22,boost_23,boost_24,boost_25,boost_26,boost_27,boost_28,boost_29,boost_30,boost_31,boost_32,boost_33,boost_34,boost_35,boost_36,boost_37,boost_38,boost_39,boost_40,boost_41,boost_42,boost_43,boost_44,boost_45,boost_46,boost_47,boost_48,boost_49,boost_50,boost_51,boost_52,boost_53,boost_54,boost_55,boost_56,boost_57,boost_58,boost_59,boost_60,boost_61,boost_62,boost_63,boost_64,boost_65,boost_66,boost_67,boost_68,boost_69,boost_70,boost_71,boost_72,boost_73,boost_74,boost_75,boost_76,boost_77,boost_78,boost_79,boost_80,boost_81,boost_82,boost_83,boost_84,boost_85,boost_86,boost_87,boost_88,boost_89,boost_90,boost_91,boost_92,boost_93,boost_94,boost_95
COLOR=2,2,2
LAG=0.9
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=0

[EMISSIVE_LIGHT_...]
NAME=rpm_0,rpm_1,rpm_2,rpm_3,rpm_4,rpm_5,rpm_6,rpm_7,rpm_8,rpm_9,rpm_10,rpm_11,rpm_12,rpm_13,rpm_14,rpm_15,rpm_16,rpm_17,rpm_18,rpm_19,rpm_20,rpm_21,rpm_22,rpm_23,rpm_24,rpm_25,rpm_26,rpm_27,rpm_28,rpm_29,rpm_30,rpm_31,rpm_32,rpm_33,rpm_34,rpm_35,rpm_36,rpm_37,rpm_38,rpm_39,rpm_40,rpm_41,rpm_42,rpm_43,rpm_44,rpm_45,rpm_46,rpm_47,rpm_48,rpm_49,rpm_50,rpm_51,rpm_52,rpm_53,rpm_54,rpm_55,rpm_56,rpm_57,rpm_58,rpm_59,rpm_60,rpm_61,rpm_62,rpm_63,rpm_64,rpm_65,rpm_66,rpm_67,rpm_68,rpm_69,rpm_70,rpm_71,rpm_72,rpm_73,rpm_74,rpm_75,rpm_76,rpm_77,rpm_78,rpm_79,rpm_80,rpm_81,rpm_82,rpm_83,rpm_84,rpm_85,rpm_86,rpm_87,rpm_88,rpm_89,rpm_90,rpm_91,rpm_92,rpm_93,rpm_94,rpm_95
COLOR=3,3,3
LAG=0.9
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=0


[LIGHT_EXTRA_1]
BIND_TO_HEADLIGHTS=1
BOUND_TO=Warning_Handbrake
COLOR=150,150,150
DIFFUSE_CONCENTRATION=0.88
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=50000
FADE_SMOOTH=50
MIRROR=0
POSITION=0.343, 0.875, 0.67
DIRECTION=0.02 , 0 , -9000
RANGE=0.1
RANGE_GRADIENT_OFFSET=0.3
SPECULAR_MULT=0
SPOT=80
SPOT_SHARPNESS=0.5


!TC
[LIGHT_EXTRA_2]
BIND_TO_HEADLIGHTS=0
BOUND_TO=Warning_TC_OFF
COLOR=10000,9000,0
DIFFUSE_CONCENTRATION=0.88
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=50000
FADE_SMOOTH=50
MIRROR=0
POSITION=0.355, 0.96, 0.67
DIRECTION=0.02 , 6000 , -9000
RANGE=0.1
RANGE_GRADIENT_OFFSET=0.3
SPECULAR_MULT=0
SPOT=50
SPOT_SHARPNESS=0.5

!El Freni
[LIGHT_EXTRA_...]
BIND_TO_HEADLIGHTS=1
BOUND_TO=Warning_Handbrake
COLOR=550,0,0
DIFFUSE_CONCENTRATION=0.88
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=50000
FADE_SMOOTH=50
MIRROR=0
POSITION=0.2, 0.898, 0.687
DIRECTION=0.02 , 6000 , -9000
RANGE=0.13
RANGE_GRADIENT_OFFSET=0.3
SPECULAR_MULT=0
SPOT=20
SPOT_SHARPNESS=0.2

[EMISSIVE_HANDBRAKE_0]
NAME=Warning_Handbrake
TOGGLE_VISIBILITY = 1
COLOR=40,4,4,1
LAG=0.2
Warning_light

[EMISSIVE_ABS_0]
NAME=Warning_ABS
TOGGLE_VISIBILITY = 1
COLOR=0
OFF_COLOR=40,20,4,1
LAG=0.2

[EMISSIVE_...]
NAME=Warning_Tires_press
TOGGLE_VISIBILITY = 1
COLOR=40,20,4,1
INPUT=TYRE_PRESSURE
INPUT_THRESHOLD = 35
INPUT_SELECTOR=MAX
INPUT_SELECTOR_PIVOT=5
LAG=0.2

[EMISSIVE_TRACTIONCONTROL_0]
NAME=Warning_TC_OFF
TOGGLE_VISIBILITY = 1
COLOR=0
OFF_COLOR=40,20,4,1

[EMISSIVE_LIGHT_3]
NAME=ghost_dashboard
COLOR=1,1,1,1.5
BIND_TO_HEADLIGHTS=1
LAG=0.5
SIMULATE_HEATING=0
LOCATION=NONE
CAST_LIGHT=1

[EMISSIVE_LIGHT_4]
NAME=artur_f30_int_02
COLOR=0,1,5,6
BIND_TO_HEADLIGHTS=1
LAG=0.5
SIMULATE_HEATING=0
LOCATION=NONE
CAST_LIGHT=1

[EMISSIVE_LIGHT_5]
NAME=Object006
COLOR=1,0.5,3,6
BIND_TO_HEADLIGHTS=1
LAG=0.5
SIMULATE_HEATING=0
LOCATION=NONE
CAST_LIGHT=1

[EMISSIVE_LIGHT_6]
NAME=LOWBEAM
COLOR=0,0,10,20
BIND_TO_HEADLIGHTS=1
LAG=0.5
SIMULATE_HEATING=0
LOCATION=NONE
CAST_LIGHT=1

[EMISSIVE_LIGHT_7]
NAME=f30_16
COLOR=60,2,2,1
BIND_TO_HEADLIGHTS=1
LAG=0.5
SIMULATE_HEATING=0
LOCATION=NONE
CAST_LIGHT=1

[EMISSIVE_LIGHT_8]
NAME=
COLOR=3,0,3,50
BIND_TO_HEADLIGHTS=1
LAG=0.5
SIMULATE_HEATING=0
LOCATION=NONE
CAST_LIGHT=1

[EMISSIVE_LIGHT_9]
NAME=
COLOR=3,0,3,5
BIND_TO_HEADLIGHTS=1
LAG=0.5
SIMULATE_HEATING=0
LOCATION=NONE
CAST_LIGHT=1

[EMISSIVE_HIGHBEAM_...]
NAME = wt_516_i1_n0_c1_m1_p003,wt_516_i1_n0_c1_m1_p001,wt_516_i1_n0_c1_m1_p0,wt_516_i1_n0_c1_m1_p002
COLOR= 60,60,75,30
LAG = 0.5
LOCATION = FRONT


[EMISSIVE_REVERSE_0]
NAME=f30_37
COLOR=60, 65, 70
LAG=0.8
SIMULATE_HEATING=0.3


[LIGHT_LICENSEPLATE]
MESHES= Rear_Lincense_Plate
OFFSET=0.01, 0.03, -0.01
RANGE=0.4
RANGE_GRADIENT_OFFSET=0
SPOT=200
SPOT_SHARPNESS=0.2
COLOR=2,2,2
FALLBACK_EMISSIVE=1,0.7,0.3,0.9
LAYOUT=TWO_ON_TOP
FADE_AT=100
---------------------------EMISSIVE_EXTRA_LIGHT--------------------------------------------------------------------------

[EMISSIVE_EXTRA_A_1]
BIND_TO_EXTRA_A=1
BIND_TO_HEADLIGHTS=0
NAME=wt_694_i1_n0_c1_m1_p0,wt_694_i1_n0_c1_m1_p001,Object011,Object012
COLOR=20, 20, 35, 45
LAG=0.1
SIMULATE_HEATING=0.1
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=0.5

[LIGHT_EXTRA_0]     ; lightcone Foglight_L for players car only
BIND_TO_EXTRA_A=1   ; if "1" on/off with "Alt+NUMPAD7" for players car only;
COLOR=5,5,9,0.3
DIFFUSE_CONCENTRATION=0.88
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=200;5
FADE_SMOOTH=5
MIRROR=0.8211218
POSITION=0.0,0.77279,2.935648
DIRECTION=0.0,-0.428353,0.8567059  ;0,-0.6,1
RANGE=15;1.25
RANGE_GRADIENT_OFFSET=0.5
SPECULAR_MULT=3
SPOT=90;120
SPOT_SHARPNESS=0

[EMISSIVE_EXTRA_B_1]
BIND_TO_EXTRA_B=1
BIND_TO_HEADLIGHTS=0
NAME=Foglight_Reflector,Foglight_Halogen,Foglight_Left,Foglight_Glass,Foglight_Right
COLOR=10, 10, 20, 35
LAG=0.1
SIMULATE_HEATING=0.1
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=0.5

[EMISSIVE_EXTRA_B_2]
BIND_TO_EXTRA_B=2
BIND_TO_HEADLIGHTS=0
NAME=Warning_light
COLOR=0, 5, 5, 5
LAG=0.1
SIMULATE_HEATING=0.1
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=0.5



[LIGHT_EXTRA_1]     ; lightcone Foglight_L for players car only
BIND_TO_EXTRA_B=1   ; if "1" on/off with "Alt+NUMPAD7" for players car only;
COLOR=5,5,9,0.5
DIFFUSE_CONCENTRATION=0.88
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=200;5
FADE_SMOOTH=5
MIRROR=0.8211218
POSITION=0.0,0.77279,2.935648
DIRECTION=0.0,-0.428353,0.8567059  ;0,-0.6,1
RANGE=15;1.25
RANGE_GRADIENT_OFFSET=0.5
SPECULAR_MULT=3
SPOT=90;120
SPOT_SHARPNESS=0

[EMISSIVE_EXTRA_C_1]
BIND_TO_EXTRA_C=1
BIND_TO_HEADLIGHTS=0
NAME=RDL_Inner_Right,RDL_Right_Inner,RDL_Inner_Left,RDL_Left_Inner
COLOR=10, 10, 0, 10
LAG=0.1
SIMULATE_HEATING=0.1
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=0.5

[LIGHT_EXTRA_2]     ; lightcone Foglight_L for players car only
BIND_TO_EXTRA_C=1   ; if "1" on/off with "Alt+NUMPAD7" for players car only;
COLOR=5,5,0,1
DIFFUSE_CONCENTRATION=0.88
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
FADE_AT=200;5
FADE_SMOOTH=5
MIRROR=0.8211218
POSITION=0.0,0.77279,2.935648
DIRECTION=0.0,-0.428353,0.8567059  ;0,-0.6,1
RANGE=15;1.25
RANGE_GRADIENT_OFFSET=0.5
SPECULAR_MULT=3
SPOT=90;120
SPOT_SHARPNESS=0

[EMISSIVE_EXTRA_D_1]
BIND_TO_EXTRA_D=1
BIND_TO_HEADLIGHTS=0
NAME=
COLOR=1, 1, 1, 1
LAG=0.1
SIMULATE_HEATING=0.1
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=0.5

[EMISSIVE_EXTRA_E_1]
BIND_TO_EXTRA_E=1
BIND_TO_HEADLIGHTS=0
NAME=
COLOR=120, 122, 40, 0.1
LAG=0.1
SIMULATE_HEATING=0.1
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=0.5

-------------------------------------ANIMATION---------------------------------------------------------------------------------

[ANIMATION_0]
FILE=Spotify.ksanim
TIME= 0.1
BIND_TO_EXTRA_D=1

[ANIMATION_1]
FILE=sunroofknk.ksanim
TIME= 1.0
BIND_TO_EXTRA_E=1


[ANIMATION_2]
FILE=camlar.ksanim
TIME= 3.0
BIND_TO_EXTRA_F=1

[ANIMATION_3]
FILE=aynalar.ksanim
TIME= 1
BIND_TO_GEAR_N=1
INPUT_THRESHOLD_INVERSE = 0

---------------------------EMISSIVE_TURNSIGNAL_LEFT---------------------------------------------------------------------------

[EMISSIVE_TURNSIGNAL_LEFT_0]
NAME=Warning_L
COLOR=0,50,0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=INTERIOR

[EMISSIVE_TURNSIGNAL_LEFT_1]
NAME=f30_046
COLOR=120,80,0
FALLBACK_HEADLIGHTS_COLOR=0,0,0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_LEFT_2]
NAME=lights_ok001_SUB2_SUB0
COLOR=100,60,0
FALLBACK_HEADLIGHTS_COLOR=20,20,1
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_LEFT_3]
NAME=RDL_Outer_Left,RDL_Left_Outer,RDL_Left
COLOR=120,60,0
FALLBACK_HEADLIGHTS_COLOR=100,100,5
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_LEFT_4]
NAME=f30_048
COLOR=100,60,0
FALLBACK_HEADLIGHTS_COLOR=0,0,0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=REAR

---------------------------EMISSIVE_TURNSIGNAL_RIGHT-------------------------------------------------------------------------

[EMISSIVE_TURNSIGNAL_RIGHT_0]
NAME=Warning_R
COLOR=0,50,0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=INTERIOR

[EMISSIVE_TURNSIGNAL_RIGHT_1]
NAME=RDL_Right_Outer,RDL_Outer_Right,RDL_Right
COLOR=120,80,0
FALLBACK_HEADLIGHTS_COLOR=100,100,5
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_RIGHT_2]
NAME=lights_ok001_SUB2.009_SUB0
COLOR=100,60,0
FALLBACK_HEADLIGHTS_COLOR=20,20,1
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_RIGHT_3]
NAME=f30_34
COLOR=120,60,0
FALLBACK_HEADLIGHTS_COLOR=0,0,0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_RIGHT_4]
NAME=f30_31
COLOR=100,60,0
FALLBACK_HEADLIGHTS_COLOR=0,0,0
LAG=0.9
SIMULATE_HEATING=0.0
LOCATION=REAR

---------------------------CAR_STEREO-----------------------------------------------------------------------------

[CAR_STEREO_0]
ACTIVE = $" read('csp/version', 0) >= 1279 "

MESHES = artur_f30_int_15
RESOLUTION = 950, 384
DISPLAY_POS = 388, 45
DISPLAY_SIZE = 562, 339
COLOR = 1, 1, 1
FADE_WHEN_INACTIVE = 0.95
DITHERING = 2

; artist text
TEXT_CSP_0 = "{Artist}"
TEXT_CSP_0_NOALBUM = "{Artist}"
TEXT_CSP_0_NOARTIST = "{Track}"
TEXT_CSP_0_FALLBACK = ""
TEXT_CSP_0_ALIGN_LAYOUT = 0
TEXT_CSP_0_START = 210, 21
TEXT_CSP_0_SIZE = 330, 80
TEXT_CSP_0_FONT_TYPE = ITALIC
TEXT_CSP_0_Z_INDEX = 10
TEXT_CSP_0_SCALE = 1, 1
TEXT_CSP_0_BOLD = 1

; track text
TEXT_CSP_3 = "{Track}"
TEXT_CSP_3_NOALBUM = "{Track}"
TEXT_CSP_3_NOARTIST = "{Track}"
TEXT_CSP_3_FALLBACK = ""
TEXT_CSP_3_ALIGN_LAYOUT = 0
TEXT_CSP_3_START = 210, 65
TEXT_CSP_3_SIZE = 330, 80
TEXT_CSP_3_FONT_TYPE = ITALIC
TEXT_CSP_3_Z_INDEX = 10
TEXT_CSP_3_SCALE = 1, 1
TEXT_CSP_3_BOLD = 1

; album text
TEXT_CSP_4 = "{Album}"
TEXT_CSP_4_NOALBUM = "{Album}"
TEXT_CSP_4_NOARTIST = "{Album}"
TEXT_CSP_4_FALLBACK = ""
TEXT_CSP_4_ALIGN_LAYOUT = 0
TEXT_CSP_4_START = 210, 135
TEXT_CSP_4_SIZE = 330, 80
TEXT_CSP_4_FONT_TYPE = ITALIC
TEXT_CSP_4_Z_INDEX = 10
TEXT_CSP_4_SCALE = 1, 1
TEXT_CSP_4_BOLD = 1

; track position
TEXT_CSP_1 = "{Position:%02d:%02d//--:--}"
TEXT_CSP_1_ALIGN_LAYOUT = 0
TEXT_CSP_1_START = 20, 222
TEXT_CSP_1_SIZE = 460, 48
TEXT_CSP_1_FONT_TYPE = MONOSPACE
TEXT_CSP_1_Z_INDEX = 10
TEXT_CSP_1_SCALE = 0.8
TEXT_CSP_1_BOLD = 1

; track duration
TEXT_CSP_2 = "{Duration:%02d:%02d//--:--}"
TEXT_CSP_2_ALIGN_LAYOUT = 1, 0
TEXT_CSP_2_START = 55, 222
TEXT_CSP_2_SIZE = 460, 48
TEXT_CSP_2_FONT_TYPE = MONOSPACE
TEXT_CSP_2_Z_INDEX = 10
TEXT_CSP_2_SCALE = 0.8
TEXT_CSP_2_BOLD = 1

; progress bar background
RECT_5 = 1
RECT_5_START = 100, 230
RECT_5_SIZE = 330, 5
RECT_5_Z_INDEX = 11
RECT_5_COLOR = 0.2, 0.2, 0.2, 0.5

; progress bar background
RECT_6 = 1
RECT_6_START = 100, 230
RECT_6_SIZE = 330, 5
RECT_6_Z_INDEX = 12
RECT_6_COLOR = 0.8, 0.8, 0.8, 1
RECT_6_SCALE_WITH_PROGRESS = 1, 0

; album cover in the middle
ALBUM_COVER_0 = 1
ALBUM_COVER_0_START = -5, 20
ALBUM_COVER_0_SIZE = 180, 180
ALBUM_COVER_0_Z_INDEX = -1
ALBUM_COVER_0_FALLBACK = MUSIC
ALBUM_COVER_0_FALLBACK_COLOR = 1.5, 1.5, 1.5, 0.5
ALBUM_COVER_0_FALLBACK_BACKGROUND = 0.05, 0.05, 0.05, 1
ALBUM_COVER_0_FALLBACK_SIZE = 28

; animation below album cover
ANIMATION_0 = 16, 4
ANIMATION_0_START = 70, 290
ANIMATION_0_BLOCK = 20, 2
ANIMATION_0_MARGIN = 6, 3
ANIMATION_0_BASE_ROW = BUTTOM

DYNAMIC_OPACITY = 0  ; disabling component from the start, relying on scriptable display to activate it when needed

[CAR_STEREO_1]
ACTIVE = $" read('csp/version', 0) >= 1279 "

MESHES =artur_f30_int_15
RESOLUTION = 950, 384
DISPLAY_POS = 388, 45
DISPLAY_SIZE = 562, 339
COLOR = 1, 1, 1
FADE_WHEN_INACTIVE = 0.95
DITHERING = 2

; animation below album cover
ANIMATION_0 = 18, 7
ANIMATION_0_START = 120, 40
ANIMATION_0_BLOCK = 20, 7
ANIMATION_0_MARGIN = 3, 3
ANIMATION_0_BASE_ROW = BOTTOM
ANIMATION_0_COLOR = 1,1,1,1
ANIMATION_0_Z_INDEX = 0

ANIMATION_1 = 18, 7
ANIMATION_1_START = 120, 50
ANIMATION_1_BLOCK = 20, 7
ANIMATION_1_MARGIN = 3, 3
ANIMATION_1_BASE_ROW = BOTTOM
ANIMATION_1_COLOR = 1,0,0,1
ANIMATION_1_Z_INDEX = 1

ANIMATION_2 = 18, 7
ANIMATION_2_START = 120, 60
ANIMATION_2_BLOCK = 20, 7
ANIMATION_2_MARGIN = 3, 3
ANIMATION_2_BASE_ROW = BOTTOM
ANIMATION_2_COLOR = 0,0.5,1,1
ANIMATION_2_Z_INDEX = 2

ANIMATION_3 = 18, 7
ANIMATION_3_START = 120, 270
ANIMATION_3_BLOCK = 20, -7
ANIMATION_3_MARGIN = 3, -3
ANIMATION_3_BASE_ROW = BOTTOM
ANIMATION_3_COLOR = 1,1,1,1
ANIMATION_3_Z_INDEX = 3

ANIMATION_4 = 18, 7
ANIMATION_4_START = 120, 260
ANIMATION_4_BLOCK = 20, -7
ANIMATION_4_MARGIN = 3, -3
ANIMATION_4_BASE_ROW = BOTTOM
ANIMATION_4_COLOR = 0,0,1,1
ANIMATION_4_Z_INDEX = 4

ANIMATION_5 = 18, 7
ANIMATION_5_START = 120, 250
ANIMATION_5_BLOCK = 20, -7
ANIMATION_5_MARGIN = 3, -3
ANIMATION_5_BASE_ROW = BOTTOM
ANIMATION_5_COLOR = 0,0.5,1,1
ANIMATION_5_Z_INDEX = 5

; progress bar background
RECT_5 = 1
RECT_5_START = 120, 140
RECT_5_SIZE = 410, 30
RECT_5_Z_INDEX = 11
RECT_5_COLOR = 1, 1, 1, 1

; progress bar background
RECT_6 = 1
RECT_6_START = 120, 140
RECT_6_SIZE = 410, 30
RECT_6_Z_INDEX = 12
RECT_6_COLOR = 0, 0, 1, 1
RECT_6_SCALE_WITH_PROGRESS = 1, 0

; album cover in the middle
ALBUM_COVER_0 = 1
ALBUM_COVER_0_START = 10, 100
ALBUM_COVER_0_SIZE = 100, 100
ALBUM_COVER_0_Z_INDEX = -1
ALBUM_COVER_0_FALLBACK = MUSIC
ALBUM_COVER_0_FALLBACK_COLOR = 1.5, 1.5, 1.5, 0.5
ALBUM_COVER_0_FALLBACK_BACKGROUND = 0.05, 0.05, 0.05, 1
ALBUM_COVER_0_FALLBACK_SIZE = 28

; background
RECT_4 = 1
RECT_4_START = 0, 0
RECT_4_SIZE = 562, 339
RECT_4_COLOR = 0, 0, 0, 1
RECT_4_Z_INDEX = -1000

DYNAMIC_OPACITY = 0  ; disabling component from the start, relying on scriptable display to activate it when needed

Racing
Sygic 
ModernDark
SimpleDark
Navitel

[INCLUDE: common/navigators.ini]
[NAVIGATOR_0 : Navigator_StyleSygic]
ACTIVE = $" read('csp/version', 0) >= 950"
Meshes = artur_f30_int_15
@ = Navigator_Size, Resolution = "950, 384", Size = "562, 339", Offset = "388, 45",    
RESOLUTION_LIMIT = 950, 384
DYNAMIC_OPACITY = 0  ; disabling component from the start, relying on scriptable display to activate it when needed

[NAVIGATOR_0]
; Slightly alter template to remove dark bar on the left
@ = Navigator_Size, Resolution = "950, 384", Size = "562, 339", Offset = "388, 45", 
@ = Navigator_Component, ComponentID = CURRENT_TRACK
@ = Navigator_FadingComponent, Up
@ = Navigator_ComponentLayout, Left = 100, Right = 70, Top = 296, Height = 40,\
	Padding = "52, 5, 20", Align = "0, 0.5", IconCenter = "28, 50%", IconSize = 20
TIME_SIZE = 0, 0
BTN_PHONE_ENABLED = 0
MAP_POS = 0, 0
MAP_SIZE = 562, 339

[RENDERING_CAMERA_0]
DYNAMIC_TEXTURE_ID = camera_rear ; here, we will create “dynamic::camera_rear” texture
POSITION = 0, 0.969, -2.47
DIRECTION = -0, -0.4, -1
INCLUDE_CAR = 1
REFRESH_RATE = 20  ; doesn’t need to update too often, those in-car cameras are usually pretty nasty
INTERIOR_ONLY = 0  ; 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 = 2048, 1236 ; and massive resolution too
ACTIVE_BY_DEFAULT = 0 ; inactive by default, activated by a script
WITH_LIGHTING = 1
DYNAMIC_OPACITY = 0  ; disabling component from the start, relying on scriptable display to activate it when needed
;RELATIVE_TO = GEAR_R

; 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 = 950, 384 ; 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.5   ; intensity of fisheye effect, adjusted for 170° FOV
EXPOSURE = 0.56      ; this value activates tonemapping to get image from HDR to LDR space
BRIGHTNESS = 0.7  ; a bit dimmer
DYNAMIC_OPACITY = 0  ; disabling component from the start, relying on scriptable display to activate it when needed

[SCRIPTABLE_DISPLAY_...]
; Example of scriptable display
MESHES = artur_f30_int_15
KEEP_BACKGROUND = 1 ; Stop CSP from painting original texture as background to get stereo and navigator 
  ; to work. Script will need to reset background manually or things will leave trails.
INTERACTIVE = 1 ; Keep track of mouse position over the display (adds extra cost, especially on high poly meshes)
FORCE_UPDATE_AFTER = NAVIGATOR_0
SCRIPT = '
local colorCover = rgbm(0, 0, 0, 1)
local colorWhite = rgbm(1, 1, 1, 1)

local buttons = {
  { points = { vec2(159, 272), vec2(389, 272), vec2(389, 308), vec2(159, 308) }, title = "Created by B. Gili (MNBA)" },
  { points = { vec2(159, 90), vec2(389, 90), vec2(389, 126), vec2(159, 126) }, screen = "CAR_STEREO_0" },
  { points = { vec2(159, 199), vec2(389, 199), vec2(389, 235), vec2(159, 235) }, title = "no apps installed" },
  { points = { vec2(159, 163), vec2(389, 163), vec2(389, 199), vec2(159, 199) }, screen = "NAVIGATOR_0" },
  { points = { vec2(159, 54), vec2(389, 54), vec2(389, 90), vec2(159, 90) }, screen = "CAR_STEREO_1" },
  { points = { vec2(159, 308), vec2(389, 308), vec2(389, 344), vec2(159, 344) } },
  { points = { vec2(159, 125), vec2(389, 125), vec2(389, 165), vec2(159, 165) }, title = "no phone connected" },

}

local startingMode = tonumber(ac.loadDisplayValue("startingMode", 4)) or 1
local previousSection = startingMode
local currentSection = startingMode
local activationProgress = 0
local gearsGrowth = {}

function update(dt)
  -- Updating state
  if currentSection ~= previousSection then
    activationProgress = math.max(0, activationProgress - dt * 3)
    if activationProgress == 0 then
      ac.setDynamicTextureShift(buttons[previousSection].screen, 0)
      previousSection = currentSection
    end
  elseif activationProgress < 1 then
    activationProgress = math.min(1, activationProgress + dt * 3)
  end
  ac.setDynamicTextureShift(buttons[previousSection].screen, activationProgress)

  -- A bit of a placeholders (temporary?) for missing sections
  if buttons[previousSection].screen == nil then
    -- Restoring original background
    display.image{ image = "car::bmw_radio1.png", pos = vec2(), size = vec2(950, 384) }

    if previousSection == 6 then
      settings()
    elseif buttons[previousSection].title ~= nil then
      ui.pushStyleVar(ui.StyleVar.Alpha, activationProgress)
      display.rect{ pos = vec2(), size = vec2(950, 384), color = rgbm(0, 0, 0, 0.8) }
      display.text{ 
        text = buttons[previousSection].title, 
        pos = vec2(450, 150), 
        letter = vec2(20, 40),
        font = "sls",
        width = 400,
        alignment = 0.5
      }
      ui.popStyleVar()
    end
  end


  -- Buttons, also useful to recreate the curved mask
  local hoveredButton = 0
  ui.beginTextureSaturationAdjustment()         -- adjusting texture to hide original selection
  ui.setShadingOffset(1, 0)                  -- this one is for color×2-0.5, along with desaturation hides selection
  ui.beginTextureShade("car::bmw_radio1.png")  -- all shapes drawn here will get a texture mapped on top of them
  for i = 1, #buttons do
    local btn = buttons[i].points
    if ui.rectHovered(btn[1], btn[3]) then
      hoveredButton = i
      if ui.mouseClicked() then currentSection = i end
    end
    ui.drawQuadFilled(btn[1], btn[2], btn[3], btn[4], colorWhite)
  end
  ui.endTextureSaturationAdjustment(0)
  ui.endTextureShade(vec2(), vec2(950, 384))
  ui.setShadingOffset()

  -- Highlight for selected button
  if currentSection ~= 0 then
    local btn = buttons[currentSection].points
    ui.beginGradientShade()
    ui.drawQuadFilled(btn[2] - vec2(230, 0), btn[2], btn[3], btn[3] - vec2(230, 0), rgbm(0.1, 0, 0, 0.5))
    ui.endGradientShade(btn[2] - vec2(230, 0), btn[3], rgbm(1, 0, 0, 1), rgbm(0.1, 0, 0, 1))
  end

  -- Highlight for hovered button
  if hoveredButton ~= 0 and hoveredButton ~= currentSection then
    local btn = buttons[hoveredButton].points
    ui.beginGradientShade()
    ui.drawQuadFilled(btn[2] - vec2(230, 0), btn[2], btn[3], btn[3] - vec2(230, 0), rgbm(1, 0.2, 0, 0.5))
    ui.endGradientShade(btn[2] - vec2(230, 0), btn[3], rgbm(1, 0.2, 0, 1), rgbm(0.1, 0.0, 0, 1))
  end

  -- Reception indicator to reduce in tunnels or with bad weather
  local satelliteOcclusion = ac.estimateSatelliteOcclusion()
  if satelliteOcclusion < 0.25 then
    display.rect{ pos = vec2(340.8, 382.4), size = vec2(16.8, 19.8), color = colorCover }
  elseif satelliteOcclusion < 0.5 then
    display.rect{ pos = vec2(346.1, 382.1), size = vec2(11.7, 19.4), color = colorCover }
  elseif satelliteOcclusion < 0.75 then
    display.rect{ pos = vec2(351.5, 382.4), size = vec2(5.7, 19.1), color = colorCover }
  end

  if car.gear ~= -1 then  
    -- If gear is not reverse, activate navigator:
    ac.setRenderingCameraActive("RENDERING_CAMERA_0", true)  -- 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.setDynamicTextureShift("CAR_STEREO_0", 0)  -- let’s stop navigator
  ac.setDynamicTextureShift("CAR_STEREO_1", 0)  -- let’s stop navigator
  ac.setRenderingCameraActive("RENDERING_CAMERA_0", 0)  -- activate rendering camera
  display.image{pos = vec2(388, 45), size = vec2(562,339), 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(450, 320)  -- one thing to note: I haven’t really properly calibrated those lines yet
  local startR = vec2(890, 320)
  local direction = vec2(25, -25):normalize()
  local lineLen = 200
  local steps = 10
  local steerOffset = -car.steer * 0.20
  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(470, 76), size = vec2(396, 32), color = rgbm(0, 0, 0, 0.8 )}
  display.text{pos = vec2(470, 86), letter = vec2(12, 20), text = "Check surroundings for safety", font = "aria", width = 396, alignment = 0.5 }
end

function settings()
  local whiteColor = rgbm(1, 1, 1, 1)
  local accentColor = rgbm(1, 0.1, 0.1, 1)

  function radioButton(text, pos, mode)
    display.text{ text = text, pos = pos, letter = vec2(11, 22), font = "sls" }

    local circlePos = pos + vec2(-20, 10)
    ui.drawCircleFilled(circlePos, 10, whiteColor, 20)

    local hovered = ui.rectHovered(circlePos - 10, circlePos + vec2(110, 10))
    if startingMode == mode then
      ui.drawCircleFilled(circlePos, 8, accentColor)
    elseif hovered then
      ui.drawCircleFilled(circlePos, 8, rgbm(0.4, 0.4, 0.4, 1))
      if ui.mouseClicked() then
        startingMode = mode
        ac.saveDisplayValue("startingMode", mode)
      end
    end
  end 

  ui.pushStyleVar(ui.StyleVar.Alpha, activationProgress)
  display.rect{ pos = vec2(), size = vec2(950, 384), color = rgbm(0, 0, 0, 0.8) }
  display.text{ text = "Starting mode:", pos = vec2(430, 60), letter = vec2(15, 40), font = "sls" }
  radioButton("Navigator", vec2(700, 70), 4)
  radioButton("Radio", vec2(700, 120), 2)
  radioButton("Equalizer", vec2(700, 170), 5)
 radioButton("App", vec2(700, 220), 3)
  radioButton("Info", vec2(700, 270), 1)
  radioButton("Phone", vec2(700, 320), 7)
  ui.popStyleVar()
end'

######################################## ANDROID AUTO ########################################


[INCLUDE: android_auto/config.ini]
[Display_AndroidAuto]
Meshes = Spotify_screen               ; display mesh
Resolution = 720, 480   ; texture resolution
Size = 710, 480           ; size of the screen area
Offset = 5, 5              ; left top corner of screen area
Scale = 1.0                  ; might need adjusting to get the scale right
RearCameraPosition = 0, 0.75, -3.15  ; position of rear view camera
aftermarketComponent = 1


# Pioneer Android Auto

[EMISSIVE_LIGHT_...]
NAME=
COLOR=0.7, 0.7, 0.7

---------------------------CAR_PAINT-----------------------------------------------------------------------------

[INCLUDE: common/materials_carpaint.ini]


[Material_CarPaint_Solid]
CarPaintMaterial =
FresnelMax = 0.5
FresnelC = 0.02
FlakesK = 0.0
AmbientSpecular = 0.01
SpecularBase = 1.0, 125

[Material_CarPaint_Metallic]
CarPaintMaterial =
CarPaintVersionAware = 2
ClearCoatThickness=0.18
SpecularColor=1
SpecularMult=0.3
FresnelMax=0.8
FresnelC=0.1
FlakesK= 2

[SHADOWED_WHEELS]
DISTANCE=3
WIDTH=0.2
OPACITY=0.3



---------------------------MATERIALS_INTERIOR_EXTERIOR-----------------------------------------------------------------------------

[INCLUDE: common/materials_interior.ini] 

[Material_Leather_v2]
Materials =
BrightnessAdjustment = 0.31
Smoothness = 0.55
Reflectance = 0.37
DetailNormalTexture = common/pbr_leather_spotty.dds
DetailNormalIntensity = 1
DetailNormalPBRSecondaryColor = 0, 0, 0, 1.95
DetailNormalBlend = 1

[Material_Leather_v2]
Materials = 
BrightnessAdjustment = 0.41
Smoothness = 0.41
Reflectance = 0.17
DetailNormalTexture = common/pbr_leather_spotty.dds
DetailNormalIntensity = 0.1
DetailNormalPBRSecondaryColor = 5.0, 5.0, 5.0, 0.45
DetailNormalBlend = 1


[Material_Carbon] ; Smooth Carbon with clear coat
Meshes = ; Put object name here
HasDetailNormals = 1 ; Value 1 is to call the carbon.png file as the main texture.
Smoothness = 1 ; How smooth the texture applied, there's big smoothness difference betwenn 0.99 and 1. Value 1 is highly reflective
Reflectance = 0.34 ; How reflective is the texture applied.
CubemapReflectionBlur = 0.05 ; Control the blur of the reflection, make it higher to have blurred reflection.
BrightnessAdjustment = 0.02 ; Adjust the value higher to make it brighter, works with value more than 1.0
UseClearCoat = 1 ; 1 is applying clear coat on the surface
ClearCoatSmoothness = 1 ; Smoothness of the clear coat.
ClearCoatIntensity = 1.45 ; How thick is the clear coat
DetailTexture = common/carbon.png ; default Kunos carbon texture
DetailNormalTexture = common/carbon_nm.png ; normal mapping
DetailNormalBlend = 1 ; Consider this as the opacity, try 0.65 or less to make it subtle.
DetailScale = 165 ; DetailScale is not a fixed number, sometimes lower value than 1 is already make the texture pattern looks big. This is dependant to the mapping of the 3D model. Play around with it to get the perfect value you want.

[Material_Carbon] ; Smooth Carbon Panel 
Meshes = 
HasDetailNormals = 1
Smoothness = 1
Reflectance = 0.21
CubemapReflectionBlur = 0.10
BrightnessAdjustment =0.05
UseClearCoat = 0
ClearCoatSmoothness = 300
ClearCoatIntensity = 0.15
DetailTexture = common/carbon.png
DetailNormalTexture = common/carbon_nm.png
DetailNormalBlend =1
DetailScale = 0


[Material_Aluminium_v2] ; ROLLCAGE
Meshes=
Metalness = 0.24
Reflectance = 0.05
Smoothness = 1
BrightnessAdjustment = 0.124
DetailTexture = 1
DetailNormalTexture = common/pbr_metal.dds
DetailNormalPBRSecondaryColor = 0.9, 0.55, 0.16, 1.7 ; (yellow)
DetailScale = 0.00133
DetailNormalBlend =1
DetailNormalPBRSmoothnessGamma = 1
CubemapReflectionBlur = 0.05

[Material_Carbon]
Materials =
HasDetailNormals = 1
Smoothness = 0.35
Reflectance = 1.05
CubemapReflectionBlur = 0.05
BrightnessAdjustment = 0.05
UseClearCoat = 1
ClearCoatSmoothness = 0.20
ClearCoatIntensity = 0.15
DetailTexture = common/carbon.png
DetailNormalTexture = common/carbon_nm.png
DetailNormalBlend = 1
DetailScale = 365

[Material_Carbon]
Materials = 
HasDetailNormals = 0
Smoothness = 1000
Reflectance = 0.005
CubemapReflectionBlur = 0.0
BrightnessAdjustment = 0.05
UseClearCoat = 0.0
ClearCoatSmoothness = 0.30
ClearCoatIntensity = 0.50
DetailTexture = common/carbon.png
DetailNormalTexture = common/carbon_nm.png
DetailNormalBlend = 0.01
DetailScale = 0.1

[Material_Aluminium_v2]
Materials =
Metalness = 0.84
Reflectance = 0.85
Smoothness = 0.95
BrightnessAdjustment = 0.924
DetailTexture = 1
DetailNormalTexture = common/pbr_metal.dds
DetailNormalPBRSecondaryColor = 0, 0, 0, 1.7
DetailScale = 0
DetailNormalBlend = 1
DetailNormalPBRSmoothnessGamma = 1
CubemapReflectionBlur = 0.35

[Material_Metal_v2]
Meshes=
Metalness=0.44
Smoothness=0.84
Reflectance = 0.84
DetailNormalPBRSecondaryColor = 0, 0, 0, 1.5
DetailNormalBlend = 0.5
DetailNormalTexture = common/pbr_metal.dds
DetailNormalPBRSmoothnessGamma = 1.6
DetailTextureBlur = 1

[Material_Aluminium_v2]
Materials = 
Metalness = 0.43
Reflectance = 0.44
Smoothness = 0.03
BrightnessAdjustment = 1.7
LocalReflectionsSharpness = 1
DetailTexture = 1
DetailNormalTexture = common/pbr_metal.dds
DetailNormalPBRSecondaryColor = 0.7,0.7,0.7,8.5
DetailScale = 8
DetailNormalBlend = 1
DetailNormalPBRSmoothnessGamma = 1
CubemapReflectionBlur = 0.25

[Material_Plastic_v2]
Materials = 
HasDetailNormals = 1
Smoothness = 0
Reflectance = 0.32
CubemapReflectionBlur = 0.112
UseClearCoat = 0
ClearCoatSmoothness = 0.50
ClearCoatIntensity = 0.15
DetailNormalBlend = 1
DetailScale = 50

;INT PLASTIC GLOSSY
[Material_Plastic_v2]
Materials = 
Reflectance = 0.2
DetailNormalPBRSecondaryColor = 0, 0, 0, 0.5
DetailNormalBlend = 0.5
DetailNormalTexture = common/pbr_plastic.dds
DetailNormalPBRSmoothnessGamma = 1
DetailTextureBlur = 1
OcclusionMult = 1.2
BrightnessAdjustment = 0.35

;INT VELVET
[Material_Velvet_v2]
Materials = 
DetailNormalTexture = common/pbr_carpet.dds
DetailNormalPBRSecondaryColor = .05,.05,.05,1.5
UseClothShading = 1
Reflectance = 0.005
DetailScale = 55
ClothSheenColor = 1,1,1

;INT SW CLOTH
[Material_Velvet_v2]
Materials = 
DetailNormalTexture = common/pbr_carpet.dds
DetailNormalPBRSecondaryColor = 0.1,0.1,0.1,1
UseClothShading = 1
Reflectance = 0.5
DetailScale = 6
ClothSheenColor = 1,1,1

---------------------------WINDOW_TINT-----------------------------------------------------------------------------

[INCLUDE: common/materials_glass.ini]
[Material_Glass]
Materials =
ThicknessMult = 4
FilmIOR=1

[INCLUDE: common/materials_glass.ini]
[Material_Glass]
Materials = 
ThicknessMult = 2.5
FilmIOR=1

[INCLUDE: common/materials_glass.ini]
[Material_Glass] ; front
Meshes =
IOR = 1.5            ; index of refraction for glass, usualy, 1.5
FilmIOR = 0.42       ; redefine IOR for external film layer to increase reflections
ThicknessMult = 3.05  ; thicker glass passes less light through
ProfileFix = 0.00    ; adds thickness to glass for glazing angles
BrightnessAdjustment = 0.05


[Material_Glass] ; side & rear
Meshes =
IOR = 1.5           ; index of refraction for glass, usualy, 1.5
FilmIOR = 0.5       ; redefine IOR for external film layer to increase reflections
ThicknessMult = 9.42  ; thicker glass passes less light through
ProfileFix = 0.00    ; adds thickness to glass for glazing angles
BrightnessAdjustment = 0.15

[Material_Glass] ; motec display
Meshes =
IOR = 1.5            ; index of refraction for glass, usualy, 1.5
FilmIOR = 0.43     ; redefine IOR for external film layer to increase reflections
ThicknessMult = 0.05  ; thicker glass passes less light through
ProfileFix = 0.00    ; adds thickness to glass for glazing angles
BrightnessAdjustment = 0.41

[Material_PhotoelasticGlass]
Meshes = 
FilmIOR = 0.23
PhotoelasticityMult = 0.35 ; doesn’t look good if too high
ThicknessMult = 1.5
BrightnessAdjustment = 0.31
ExtraLightsAdjustment = 0.015
; Ideally, there would be a texture for that, but we’re not going to draw
; all those textures for Kunos cars, so here are some parameters for perlin noise
; instead
PhotoelasticityBaseScale = 0.026    ; this parameter alters scale in general
PhotoelasticityNoiseScale = 0.0248  ; deeply affects randomization process, careful with it
PhotoelasticitySpotsScale = 0.0000325   ; spots for limiting effect to some areas
PhotoelasticitySpotsOffset = 0.024  ; offset for spots, to try and fit effect nice on existing meshes
PhotoelasticityStripesScale = 3.5   ; how many stripes are there
ProfileFix = 0.02

---------------------------AUDIO_PITCH_VOLUME-----------------------------------------------------------------------------

[AUDIO_PITCH] ;
ENGINE_EXT = 0.90 
ENGINE_INT = 0.90
GEAR_EXT = 1.0
GEAR_INT = 1.0
BODYWORK = 1.0
WIND = 1.0
DIRT = 1.0
DOWN_SHIFT = 1.0
HORN = 1.0
GEAR_GRIND = 1.0
BACKFIRE_EXT = 1
BACKFIRE_INT = 0
TRACTION_CONTROL_EXT = 1.0
TRACTION_CONTROL_INT = 1.0
TRANSMISSION = 1.0
LIMITER = 1
TURBO = 1
HIT = 1.0
SCRAPE = 1.0
WHEEL = 0.5
SKID_EXT = 1.65
SKID_INT = 1.65

[AUDIO_VOLUME]
ENGINE_EXT = 4.5
ENGINE_INT = 1.5
GEAR_EXT = 1.0
GEAR_INT = 1.0
BODYWORK = 1.0
WIND = 1.0
DIRT = 1.0
DOWN_SHIFT = 1.0
HORN = 1.0
GEAR_GRIND = 1.0
BACKFIRE_EXT = 15
BACKFIRE_INT = 5.5
TRACTION_CONTROL_EXT = 1.0
TRACTION_CONTROL_INT = 1.0
TRANSMISSION = 1.0
LIMITER = 1.0
TURBO = 15.0
HIT = 1.0
SCRAPE = 1.0
WHEEL = 1.0
SKID_EXT = 6.0
SKID_INT = 2.0

;Additional sound customization: 

[AUDIO_PROPERTIES]
ENGINE_EXT_BOOST=1
ENGINE_INT_BOOST=1
TURBO_THROTTLE=1

---------------------------EXHAUST_FLAMES-----------------------------------------------------------------------------

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

[STATUS_EXHAUST]
TEMPERATURE_BOOST=400
TEMPERATURE_IDLE=400
TEMPERATURE_LAG_DOWN=0.995
TEMPERATURE_LAG_UP=0.995
TEMPERATURE_RPM=100

[EMISSIVE_WATER_TEMP_0_EXHAUST_GLOW] ; Exhaust Glow
MESHES = exh
COLOR = 25, 3, 0, 3
USE_SMOOTH_TRANSITION = 1
INPUT_MIN = 50
INPUT_MAX = 60
INPUT_LUT = (| 84 = 0 | 95 = 1 |)
AFFECTS_TRACK = 1
SPECULAR_MULT = 3

[LIGHT_FLAME_0] ; Flame Brightness
BRIGHTNESS_MULT=1
CAR_BRIGHTNESS_MULT=1
CAR_RANGE_MULT=1
COLOR=5,1,1,0.5
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.0

[PARTICLES_FX]
BODYSPARKS_AMOUNT=0.25
BODYSPARKS_INTENSITY=0.2
BODYSPARKS_LIFETIME=0.4
BODY_SPARKS_COLOR=1, 0.5, 0, 10
COLLIDER_0SPARKS_AMOUNT=0.25
COLLIDER_0SPARKS_INTENSITY=0.2
COLLIDER_0SPARKS_LIFETIME=0.4
COLLIDER_0_SPARKS_COLOR=1, 0.5, 0, 10
DRAG_MULT=2
INTERIOR_BOUNDS_CHECK=1
INTERIOR_BOUNDS_HEIGHT=0.644874
LIFT_MULT=0.1
SPARKS_AMOUNT_MULT=2
SPARKS_COOLDOWN_LAG=0.96
SPARKS_DEPTH_EXP=4
SPARKS_MAX_DEPTH=0.0025
SPARKS_OVERLOAD_LAG=0.7
TRACES_LIGHTS_POS=0.655593, 0.825127, -2.15187

----------------------------SHAKING_EXHAUST-----------------------------------------------------------------------------

[SHAKING_EXHAUST_...]
MESHES =GEO_Chassis_SUB6,GEO_Chassis_SUB8,GEO_Chassis_SUB9 
POINT_1 = 0.27, 0.28, -1.8
POINT_1_RADIUS = 1.0
POINT_1_EXP = 3.5
POINT_1_SCALE = 0.6






