[INCLUDE]
[INCLUDE: common/no_popup_lights.ini]
[INCLUDE: common/selflighting.ini]
[INCLUDE: common/materials_glass.ini]
[INCLUDE: common/materials_carpaint.ini]
[INCLUDE: common/materials_interior.ini]
[INCLUDE: lights.ini]
[INCLUDE: PBR.ini]
[INCLUDE: refraction.ini]
[INCLUDE: analog_indicators.ini]
[INCLUDE: exhaust.ini]



; High Beam

[EMISSIVE_HIGHBEAM_...]
NAME=int_cluster_highbeam
COLOR=8,16,128,10
LAG=0.3
CAST_LIGHT=0


; Supermade Headlight

[SelfLight]
POSITION= 0, 0.492, 1.92
SPOT= 180
RANGE= 0.15
COLOR = 150, 180, 220, 20
BOUND_TO = supermade_em_2
DIRECTION = -1, -50, 1
MIRROR= 0.55

[SelfLight]
POSITION= 0, 0.50, 1.925
SPOT= 102
RANGE= 0.23
COLOR = 240, 180, 100, 5
BOUND_TO = supermade_em_1
DIRECTION = 0,0,1
MIRROR= 0.46, 0, 0

[EMISSIVE_HIGHBEAM_...]
NAME = supermade_em_1
COLOR = 240, 180, 100, 5
LAG = 0.9
SIMULATE_HEATING = 3
LOCATION = FRONT

[EMISSIVE_LIGHT_...]
NAME = supermade_em_2
COLOR = 150, 180, 220, 5
LAG = 0.9
SIMULATE_HEATING = 3
LOCATION = FRONT

[LIGHT_HEADLIGHT_0]
DIRECTION = 0, -0.2, 1
MIRROR = 0.55
POSITION = 0, 0.46, 2.1
COLOR = 150, 180, 220, 0.2

; Tail Lights

[EMISSIVE_BRAKE_...]
NAME= RYO_TAIL_STOP_BULB
COLOR=20,1,0, 70
FALLBACK_HEADLIGHTS_COLOR=20,0,0, 15
LAG=0.73
SIMULATE_HEATING=1
LOCATION=REAR
CAST_LIGHT=1

[EMISSIVE_BRAKE_...]
NAME=RYO_TAIL_EMMISIVE_STOP
TOGGLE_VISIBILITY = 1
COLOR=20,0,0, 150
FALLBACK_HEADLIGHTS_COLOR=20,0,0, 45
LAG=0.73
SIMULATE_HEATING=0
LOCATION=REAR
CAST_LIGHT=0
CLUSTER_THRESHOLD=0


[EXTRA_FX_EMISSIVE_...]
DIGITAL_INSTRUMENTS = ?  ; filters for digital instruments (for most of them,
MESHES = RYO_TAIL_STOP_BULB           ; list of meshes
    ; names of sections in “digital_instruments.ini”), only for cars
RANGE = 0.1              ; range in meters (by default 0.08 for cars and 5 for tracks)
COLOR = 255,0,0,0.01          ; optional brightness multiplier (could be an RGBA value)
DIRECTED = 0         ; set for 0 for point light and 1 for directed light, or to 
    ; something in-between (by default guessed based on mesh shape)

; Optional optimization flags for cars:
INTERIOR_ONLY = 0        ; show up for interior views only
EXTERIOR_ONLY = 1        ; show up for exterior views only

; Optional advanced tweaks for more complex cases
EMISSIVE_TWEAK = 1       ; extra tonemapping for emissive color to balance things out
    ; (set to 0 to disable, set above 1 to further reduce effect or large emissive value)
MIP_BIAS = 0             ; MIP bias for texture (increase for smoother light)
IGNORE_TEXTURE_COLOR = 0 ; set to 1 to use COLOR and emissive color only

; Optional distribution settings (can affect performance):
COVERAGE = 3.5         ; samples density, by default 3 for cars and 2 for tracks (actual
    ; number of samples is controlled by mesh area, light range and coverage)
SAMPLES_LIMIT = 100      ; upper limit for number of samples to make sure generation won’t
    ; take huge amount of time, by default 400 for tracks
SPLIT_ELEMENTS = 0       ; split meshes into elements before generating samples, 
    ; by default 1 for tracks
SPLIT_THRESHOLD = …      ; set to something above 0 to weld vertices within that distance
    ; before splitting elements
NORMAL_SHIFT = 0         ; increase to move light producing samples away from surface alogn
    ; normals (use it if surroundings are too dark)
COVERED_BY = …           ; stop emissive if a mesh with given name is visible

[EMISSIVE_TURNSIGNAL_LEFT_...]
NAME= RYO_TAIL_TURN_BULB_L
COLOR=20,10,0, 23
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_LEFT_...]
NAME= RYO_TAIL_EMMISIVE_TURN_L
TOGGLE_VISIBILITY = 1
COLOR=40,4,0, 100
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=0

[EMISSIVE_TURNSIGNAL_RIGHT_...]
NAME= RYO_TAIL_TURN_BULB_R
COLOR=20,10,0, 23
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_RIGHT_...]
NAME= RYO_TAIL_EMMISIVE_TURN_R
TOGGLE_VISIBILITY = 1
COLOR=40,4,0, 100
LAG=0.2
SIMULATE_HEATING=0
LOCATION=FRONT
CAST_LIGHT=0
CLUSTER_THRESHOLD=0


[EMISSIVE_REVERSE_...]
NAME = RYO_TAIL_REVERSE_BULB       
COLOR = 20, 20, 20 , 1   
LAG = 0.9                
SIMULATE_HEATING = 3     
LOCATION = REAR           
ACT_AS_HEADLIGHTS = 1   
CAST_LIGHT=1   

[EMISSIVE_REVERSE_...]
NAME = RYO_TAIL_EMMISIVE_REVERSE         
TOGGLE_VISIBILITY = 1
COLOR = 20, 20, 20, 20    
LAG = 0.9
SIMULATE_HEATING = 3     
LOCATION = REAR             
ACT_AS_HEADLIGHTS = 1     
CAST_LIGHT=0
CLUSTER_THRESHOLD=0


; Turnsignal

[EMISSIVE_TURNSIGNAL_LEFT_...]
NAME=int_cluster_left
COLOR=0,64,0,10
LAG=0.3

[EMISSIVE_TURNSIGNAL_RIGHT_...]
NAME=int_cluster_right
COLOR=0,64,0,10
LAG=0.3

; Cluster

[EMISSIVE_HANDBRAKE_...]
NAME=int_cluster_parkingbrake
COLOR=255,0,0,8
LAG=0.3
[EMISSIVE_ABS_INACTION_...]
NAME=int_cluster_abs
COLOR=255,128,0,8
LAG=0.3

[EMISSIVE_BATTERY_...]
NAME=int_cluster_battery
COLOR=255,0,0,8
LAG=0.3

[EMISSIVE_OPENDOORS_...]
NAME=int_cluster_doors
COLOR=255,0,0,8
LAG=0.3
[EMISSIVE_SEATBELT_...]
NAME=int_cluster_seatbelt
COLOR=255,0,0,8
LAG=0.3
[EMISSIVE_OIL_...]
NAME=int_cluster_oil
COLOR=255,0,0,0
LAG=0.3

; Custom Emissive

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

[CustomEmissive_...]
Meshes = sidemarkers

@MIXIN = TurningLightsFrontCorner, Channel = 3


; Emissive Extra

[EMISSIVE_LIGHT_...]
NAME = int_gauge_em
COLOR = 1,1,1,3
OFF_COLOR = 1,1,1,5
LAG = 0.9

[EMISSIVE_LIGHT_...]
NAME = int_decals
COLOR = 1,1,1,3
LAG = 0.9

[EMISSIVE_EXTRA_A_...]
NAME = 155_T
COLOR =35,35,35, 0.1
LAG = 0.1
SIMULATE_HEATING = 0
LOCATION = FRONT
CAST_LIGHT=0

[EMISSIVE_EXTRA_B_...]
NAME = int_light
COLOR = 35,35,35, 2
LAG = 0.1
SIMULATE_HEATING = 0
LOCATION = FRONT
CAST_LIGHT=0


[EMISSIVE_EXTRA_A_...]
NAME = int_gauge
COLOR = 10,10,13,2
FALLBACK_HEADLIGHTS_COLOR = 10,10,13,2
LAG = 0.3
BIND_TO_HEADLIGHTS = 1
CAST_LIGHT = 1
CLUSTER_THRESHOLD = 0.5

[EMISSIVE_EXTRA_A_...]
NAME = petrol_needle, speed_needle, rpm_needle, temp_needle, 
COLOR=5,5,5
FALLBACK_HEADLIGHTS_COLOR=5,5,5
LAG = 0.3
BIND_TO_HEADLIGHTS = 1
CAST_LIGHT = 1
CLUSTER_THRESHOLD = 0.5

[EMISSIVE_EXTRA_A_...]
NAME = int_cluster_misc, int_cluster_clock 
COLOR=6,2,2.5
FALLBACK_HEADLIGHTS_COLOR=6,2,2.5
LAG = 0.3
BIND_TO_HEADLIGHTS = 1
CAST_LIGHT = 1
CLUSTER_THRESHOLD = 0.5

[EMISSIVE_EXTRA_A_...]
NAME = GaugeFuelPressDecals, GaugeOilPressDecals, GaugeOilTempDecals, GaugeWaterTempDecals, GaugeTurboDecals
COLOR = 1,8,4, 15
OFF_COLOR = 1,8,4, 15
LAG = 0.3
CAST_LIGHT = 1
CLUSTER_THRESHOLD = 0.5

[EMISSIVE_EXTRA_A_...]
NAME = ARROW_FUEL_PRESS1, ARROW_OIL_PRESS1, ARROW_OIL_TEMP1, ARROW_WATER_TEMP1, ARROW_TURBO1
COLOR = 20,1,1, 10
OFF_COLOR = 2.5,0.9,1, 10
LAG = 0.3
CAST_LIGHT = 1
CLUSTER_THRESHOLD = 0.5

[EMISSIVE_LIGHT_...]
NAME = HKS_GREDDY_BOX_THINGOS
COLOR = 1,1,1,5

[EMISSIVE_LIGHT_...]
NAME = Object534
COLOR = 1,1,1,5

[CustomEmissiveMulti]
Meshes = int_decals
Intensity = 0.5
PROP_...=emAlphaFromDiffuse,1
Resolution = 512, 512
@ = DashHighlight
@ = MultiItem, Input = HAZARD, Color = "1, 0, 0, 5", Start = "268, 47", Size = "80, 91"
@ = MultiItem, Input = LIGHT, Color = "5, 5, 5, 1", Start = "1, 3", Size = "258, 83"

[CustomEmissiveMulti]
Meshes = int_cluster_info
Intensity = 2
PROP_...=emAlphaFromDiffuse,1
Resolution = 256, 256
@=DashHighlight
@=MultiItem, Input = HANDBRAKE, Color="1, 0, 0, 200", Start = "39, 166", Size = "44, 35"
@=MultiItem, Input = LIGHT, Color = "6,2,2.5", Start = "43, 208", Size = "213, 43"
@=MultiItem, Input = LIGHT, Color = "6,2,2.5", Start = "39, 79", Size = "217, 81"
@=MultiItem, Input = HIGHBEAM, Color = "0, 0.2, 1, 200", Start = "98, 11", Size = "59, 57"
@=MultiItem, Input = TURNSIGNAL_LEFT, Color = "1, 10, 0, 20", Start = "32, 18", Size = "46, 44"
@=MultiItem, Input = TURNSIGNAL_RIGHT, Color = "1, 10, 0, 20", Start = "175, 13", Size = "46, 53"

-----------------CONFIG FOR THE GAUGES-----------------


[STATUS_OIL]
; similar thing, overly simplified estimation for instruments
PRESSURE_BASE = 1.0         ; base oil pressure for idling engine
PRESSURE_STEP = 0.50         ; oil pressure increase for each 1000 RPM
PRESSURE_LAG_UP = 0.9   ; oil pressure increase lag
PRESSURE_LAG_DOWN = 0.9  ; oil pressure decrease lag

TEMPERATURE_MULT = 1.0         ; relation of oil temperature to water temperature
TEMPERATURE_RPM_FACTOR = 0.03  ; extra increase of oil temperature for each 1000 RPM
TEMPERATURE_LAG_UP = 0.995     ; oil temperature increase lag
TEMPERATURE_LAG_DOWN = 0.995   ; oil temperature decrease lag

[ANALOG_INDICATOR_...]
BIND_TO=OIL
NAME=ARROW_OIL_PRESS
USE_BAR=1
MIN_VALUE=3.7
MAX_VALUE=90.0
INPUT_LAG_UP=0.0
INPUT_LAG_DOWN=0.5
LUT=(0=0|2.0=40|4.0=100|10.0=300)

[ANALOG_INDICATOR_...]
BIND_TO=OIL_TEMP
NAME=ARROW_OIL_TEMP
MIN_VALUE=50
MAX_VALUE=150
LUT=(20=120|80=185|110=230|130=280|150=300)

[ANALOG_INDICATOR_...]
BIND_TO=WATER_TEMP
NAME=ARROW_WATER_TEMP
MIN_VALUE=50
MAX_VALUE=150
LUT=(0=0|80=140|130=200|160=260|175=300)


[ANALOG_INDICATOR_...]
BIND_TO=OIL
NAME=ARROW_FUEL_PRESS
USE_BAR=1
MIN_VALUE=2.6
MAX_VALUE=50
INPUT_LAG_UP=0.
INPUT_LAG_DOWN=0.5
LUT=(0=0|2.0=72|4.0=135|10.0=350)

[Material_Glass]
Materials = int_sportcomp_glass
BrightnessAdjustment = 2
IOR = 1.460
FilmIOR = 1.7

[Material_Metal_v2]
Materials = int_sportcomp_blink
Brightness = 0.5
DetailScale = 0
Metalness = 0.2
Reflectance = 0.1
LocalReflectionsSharpness = 0.1
CubemapReflectionBlur = -1
OcclusionMult = 0.6
DetailNormalPBRSecondaryColor = 255, 0, 0, 1

[Material_Plastic_v2]
Meshes = int_sportcomp_yellow
DetailScale = 0
DetailNormalBlend = 0
Reflectance = 0.1
Smoothness = 1
Brightness = 0.4
OcclusionMult = 0.9


[Material_Metal_v2]
Materials = int_sportcomp_metal
Brightness = 0.5
DetailScale = 0
Metalness = 0.2
Reflectance = 0.1
LocalReflectionsSharpness = 0.1
CubemapReflectionBlur = -1
OcclusionMult = 0.6





[EMISSIVE_EXTRA_A_...]
NAME = int_sportcomp_gauge
COLOR = 10,10,13,2
FALLBACK_HEADLIGHTS_COLOR = 10,10,13,2
LAG = 0.3
BIND_TO_HEADLIGHTS = 1
CAST_LIGHT = 1
CLUSTER_THRESHOLD = 0.5

[EMISSIVE_EXTRA_A_...]
NAME = int_sportcomp_needle
COLOR = 10,10,7,5
FALLBACK_HEADLIGHTS_COLOR = 10,10,7,5
LAG = 0.3
BIND_TO_HEADLIGHTS = 1
CAST_LIGHT = 1
CLUSTER_THRESHOLD = 0.5



[ANALOG_INDICATOR_...]
BIND_TO = RPM
NAME = ARROW_SPORTCOMPRPM
ZERO = 0.000
MIN_VALUE = 0
STEP = 0.02634146
INPUT_LAG = 0.9
LUT = (0=0|1000=24|2000=49|3000=74.5|4000=99.5|5000=124|6000=149|7000=174|8000=198|9000=222|10000=246|)




~ Strobo pra pocar nos bailão

[EMISSIVE_EXTRA_E_0]
NAME= supermade_em_1, RYO_TAIL_REVERSE_BULB
COLOR=50,50,90,40
LAG=0
BLINK_FREQENCY_HZ=600
BLINKING_PATTERN=(|0=0|0.5=0|0.542=0|0.583=1|0.625=0|0.667=0|0.708=0|0.75=1|0.792=0|0.833=0|0.875=0|0.917=0|0.958=0|1=0|)
BLINKING_DURATION=0.35	
SIMULATE_HEATING=0
LOCATION=FRONT
FADE_AT=0

[EMISSIVE_EXTRA_E_1]
AFFECTS_TRACK=1
NAME= RYO_TAIL_TURN_BULB_R, RYO_TAIL_TURN_BULB_L
COLOR=50,50,90,40
LAG=0
BLINK_FREQENCY_HZ=600
BLINKING_PATTERN=(|0=0|0.5=0|0.542=0|0.583=1|0.625=0|0.667=0|0.708=0|0.75=1|0.792=0|0.833=0|0.875=0|0.917=0|0.958=0|1=0|)
BLINKING_DURATION=0.3	
SIMULATE_HEATING=0
LOCATION=FRONT
FADE_AT=0

[EMISSIVE_EXTRA_E_2]
AFFECTS_TRACK=1
NAME= RYO_TAIL_STOP_BULB, RYO_TAIL_BLACK
COLOR=50,50,90,40
LAG=0
BLINK_FREQENCY_HZ=600
BLINKING_PATTERN=(|0=0|0.5=0|0.542=0|0.583=1|0.625=0|0.667=0|0.708=0|0.75=1|0.792=0|0.833=0|0.875=0|0.917=0|0.958=0|1=0|)
BLINKING_DURATION=0.35	
SIMULATE_HEATING=0
LOCATION=FRONT
FADE_AT=0

[EMISSIVE_EXTRA_E_3]
AFFECTS_TRACK=1
NAME= supermade_em_2
COLOR=50,50,90,40
LAG=0
BLINK_FREQENCY_HZ=600
BLINKING_PATTERN=(|0=0|0.5=0|0.542=0|0.583=1|0.625=0|0.667=0|0.708=0|0.75=1|0.792=0|0.833=0|0.875=0|0.917=0|0.958=0|1=0|)
BLINKING_DURATION=0.35	
SIMULATE_HEATING=0
LOCATION=FRONT
FADE_AT=0

[EMISSIVE_EXTRA_E_4]
AFFECTS_TRACK=1
NAME= RYO_TAIL_REVERSE_BULB, supermade_em_1
COLOR=50,50,90,40
LAG=0
BLINK_FREQENCY_HZ=600
BLINKING_PATTERN=(|0=0|0.5=0|0.542=0|0.583=1|0.625=0|0.667=0|0.708=0|0.75=1|0.792=0|0.833=0|0.875=0|0.917=0|0.958=0|1=0|)
BLINKING_DURATION=0.6	
SIMULATE_HEATING=0
LOCATION=FRONT
FADE_AT=0

[EMISSIVE_EXTRA_E_5]
AFFECTS_TRACK=1
NAME= supermade_em_2, RYO_TAIL_STOP_BULB
COLOR=50,50,90,40
LAG=0
BLINK_FREQENCY_HZ=600
BLINKING_PATTERN=(|0=0|0.5=0|0.542=0|0.583=1|0.625=0|0.667=0|0.708=0|0.75=1|0.792=0|0.833=0|0.875=0|0.917=0|0.958=0|1=0|)
BLINKING_DURATION=0.6	
SIMULATE_HEATING=0
LOCATION=FRONT
FADE_AT=0

[EMISSIVE_EXTRA_E_6]
AFFECTS_TRACK=1
NAME= RYO_TAIL_EMMISIVE_STOP, RYO_TAIL_TURN_BULB_L
COLOR=50,50,90,40
LAG=0
BLINK_FREQENCY_HZ=600
BLINKING_PATTERN=(|0=0|0.5=0|0.542=0|0.583=1|0.625=0|0.667=0|0.708=0|0.75=1|0.792=0|0.833=0|0.875=0|0.917=0|0.958=0|1=0|)
BLINKING_DURATION=0.6	
SIMULATE_HEATING=0
LOCATION=FRONT
FADE_AT=0

[EMISSIVE_EXTRA_E_7]
AFFECTS_TRACK=1
NAME= RYO_TAIL_REVERSE_BULB, RYO_TAIL_TURN_BULB_R
COLOR=50,50,90,40
LAG=0
BLINK_FREQENCY_HZ=600
BLINKING_PATTERN=(|0=0|0.5=0|0.542=0|0.583=1|0.625=0|0.667=0|0.708=0|0.75=1|0.792=0|0.833=0|0.875=0|0.917=0|0.958=0|1=0|)
BLINKING_DURATION=0.6	
SIMULATE_HEATING=0
LOCATION=FRONT
FADE_AT=0

[EMISSIVE_EXTRA_E_8]
AFFECTS_TRACK=1
NAME= RYO_TAIL_EMMISIVE_STOP, RYO_TAIL_TURN_BULB_R
COLOR=50,50,90,40
LAG=0
BLINK_FREQENCY_HZ=600
BLINKING_PATTERN=(|0=0|0.5=0|0.542=0|0.583=1|0.625=0|0.667=0|0.708=0|0.75=1|0.792=0|0.833=0|0.875=0|0.917=0|0.958=0|1=0|)
BLINKING_DURATION=0.6	
SIMULATE_HEATING=0
LOCATION=FRONT
FADE_AT=0