[INCLUDE: common/selflighting.ini]
[INCLUDE: common/materials_interior.ini]
[INCLUDE: common/materials_carpaint.ini]
[INCLUDE: refraction.ini]
[INCLUDE: emissive.ini]

[SelfLight_Headlights]
BIND_TO_HEADLIGHTS=1
POSITION=0, 0.58, 1.92
MIRROR=0.61
DIRECTION=0, -0.2, 1
SPOT=60
COLOR=10,10,10, 10
RANGE=0.20
DIFFUSE_CONCENTRATION=1
AFFECTS_TRACK=1

[SelfLight_Headlights]
BIND_TO_EXTRA_A=1
POSITION= 0, 0.33, 1.97
MIRROR=0.55
DIRECTION=0, 0, 1
SPOT=110
COLOR=10,10,10, 10
RANGE=0.20
DIFFUSE_CONCENTRATION=1
AFFECTS_TRACK=1




[Material_CarPaint_Solid]
Materials = Carpaint_Color, Advan R6
FresnelMax = 0.5
FresnelC = 0.08
AmbientSpecular = 0.3
SpecularBase = 0.2, 100


[BASIC]
BRAKES_THRESHOLD=0.01
ENGINE_STALLED_RPM_THRESHOLD=1
HAZARD_LIGHTS_ENGINE_LIFE_THRESHOLD=0.001
HEADLIGHTS_ARE_HEADLIGHTS=1
HORN_AS_SIREN=0
IS_LOW_BEAM_AVAILABLE=1
LIGHT_DAMAGE_SPEED_MAX=120
LIGHT_DAMAGE_SPEED_MIN=80
STOP_LODS_ADJUSTMENT=0
TURNING_LIGHTS_REPEAT=1

[BOUNCED_HEADLIGHTS]
ACTIVE=1
FADE_AT=200
FADE_SMOOTH=50
FALLOFF=0.4
GRADIENT_OFFSET=0.8
MULT=1, 1, 1, 1
OFFSET=7

[SHADOWED_WHEELS]
ANGLE=12
OFFSET=0
OPACITY=0.8
WIDTH=0.15

[SHADOWED_TYRES]
ANGLE=6
OFFSET=0
OPACITY=0.8
WIDTH=0.05
EXTRA_AMBIENT_BRIGHTNESS=0.0

[TYRES_FX]
DIRT_WIDTH_K=1.2

;Brake Disk

[SHADER_REPLACEMENT_...]
MATERIALS = Carpaint_Color
CULL_MODE=DOUBLESIDED

[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 = 20  ; 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

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

DISC_RADIUS = 0.1           ; radius of a brake disc
DISC_INTERNAL_RADIUS = 0.05  ; radius of an inside part of a brake disc

RIM_RADIUS = 0.30  ; inside radius of a rim
RIM_HEIGHT = 0.4  ; distance between surface of brake disc and vertical surface of a wheel rim

[LIGHT_HEADLIGHT_0]
AFFECTS_TRACK=1
COLOR=15,20,25,1.3
DIFFUSE_CONCENTRATION=0.88
DIRECTION=0, -0.2, 1
EXTERIOR_ONLY=0
FADE_AT=450
FADE_SMOOTH=50
INTERIOR_ONLY=0
MIRROR=0.58
OFF_FADE_MULT=0.3
OFF_MIRROR=0.519496
OFF_MULT=0
OFF_POSITION=0, 0.403337, 1.80081
OFF_RANGE_MULT=0.0657895
POPUP_EDGE_EXP=0.3
POPUP_EDGE_OFFSET=0.5
POPUP_ENABLED=1
POPUP_END=0.7
POPUP_SECOND_SPOT_EXP=0.6
POPUP_SECOND_SPOT_INITIAL_VALUE=0.4
POPUP_START=0.05
POSITION=0, 0.47, 2.1
RANGE=650
RANGE_GRADIENT_OFFSET=0
SECOND_SPOT=137.16
SECOND_SPOT_INTENSITY=0.27
SECOND_SPOT_RANGE=20
SECOND_SPOT_SHARPNESS=0.643
SECOND_SPOT_SKIP=0.3
SPECULAR_MULT=1
SPOT=52.2
SPOT_EDGE=0.0806677, 0.0802867, 0.0795249
SPOT_EDGE_SHARPNESS=25.8726
SPOT_SHARPNESS=0
SPOT_UP=0.0237433, 0.999718, 0

[LIGHT_BRAKE_0]
AFFECTS_TRACK=1
COLOR=1, 0, 0, 2
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

//////////// PBR EXTERIOR ///////////////////

;HEADLIGHT

[Material_InteriorPBRDetail]
Meshes= 78_0, Object, caliper_front1, 928_008, s15_tail_light_chrome 
ColorSource=LUMINANCE
OcclusionMult=0.8
Brightness=1.9
Metalness=0.6
Reflectance=0.8
Smoothness=1
CubemapReflectionBlur=0
UseDiffuseAlphaAsMask = 0

;TAILIGHT
[Material_InteriorPBRDetail]
Meshes= Object016, 1_001
ColorSource=LUMINANCE
OcclusionMult=1.8
Brightness=1.9
Metalness=0.6
Reflectance=0.8
Smoothness=1
CubemapReflectionBlur=0
UseDiffuseAlphaAsMask = 0

[Material_Plastic]
Meshes = s15_tail_light_black
Smoothness = 0.7
Reflectance = 0.1
Brightness=0.5

[Material_Plastic]
Meshes = 82_001
Smoothness = 0.9
Reflectance = 0.1
Brightness=0.02

;FOG LIGHT
[Material_InteriorPBRDetail]
Meshes= Object017
ColorSource=DIFUSSE
OcclusionMult=0.6
Brightness=2.9
Metalness=0.9
Reflectance=0.8
Smoothness=1
CubemapReflectionBlur=0
UseDiffuseAlphaAsMask = 0

;WHEEL

[Material_InteriorPBRDetail]
Materials= te37_rim
ColorSource=DIFFUSE
OcclusionMult=0.8
Brightness=0.4
Metalness=0.0
Reflectance=0.05
Smoothness=1
CubemapReflectionBlur=0.2
UseDiffuseAlphaAsMask = 1

;Plastic 1

[Material_Plastic]
Meshes = 75_0, s15_tail_light_cover, Object001 
Smoothness = 0.7
Reflectance = 0.05


[INCLUDE: materials_glass.ini]

;GLASS
[Material_PhotoelasticGlass]
SHADER = smGlass_phel
Meshes = 54_0
IOR = 2.5 
FilmIOR = 4.5              ; looks better like this
PhotoelasticityMult = 0.33  ; doesn’t look good if too high
ProfileFix = 0.02          ; a bit thicker edge

; 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 = 12      ; 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.1  ; offset for spots, to try and fit effect nice on existing meshes
PhotoelasticityStripesScale = 4   ; how many stripes are there

[Material_Glass]
; Main input parameters:
Meshes = 88_0, s15_tail_light_glass, s15_tail_light_turn_l, s15_tail_light_turn_r
IOR = 2.5            ; index of refraction for glass, usualy, 1.5
FilmIOR = $IOR       ; redefine IOR for external film layer to increase reflections
ThicknessMult = 0.4  ; thicker glass passes less light through
ProfileFix = 0.04    ; adds thickness to glass for glazing angles


[Material_Glass]
; Main input parameters:
Meshes = s15_tail_light_white
IOR = 5.5            ; index of refraction for glass, usualy, 1.5
FilmIOR = $IOR       ; redefine IOR for external film layer to increase reflections
ThicknessMult = 0.4  ; thicker glass passes less light through
ProfileFix = 0.04    ; adds thickness to glass for glazing angles




//////////// PBR INTERIOR ///////////////////
INT_SEAT
[Material_Fabric_v2]
Materials = INT_SEAT
DetailNormalTexture = common/pbr_fabric.dds
DetailNormalPBRSecondaryColor = 0, 0, 0, 2.0
UseClothShading = 1
Reflectance = 0.55
ClothSheenColor = 1, 1, 1

[Material_Fabric_v2]
Meshes = 70_0
DetailNormalTexture = common/pbr_fabric.dds
DetailNormalPBRSecondaryColor = 2, 2, 2, 0.4
DetailNormalIntensity = 5
UseClothShading = 1
Reflectance = 0.55
ClothSheenColor = 1, 1, 1
DetailScale = 10

[Material_Fabric_v2]
Meshes = 71_0
DetailNormalTexture = common/pbr_fabric.dds
DetailNormalPBRSecondaryColor = 2, 2, 2, 0.4
DetailNormalIntensity = 2
UseClothShading = 1
Reflectance = 0.55
ClothSheenColor = 1, 1, 1
DetailScale = 10

[Material_Metal_v2]
Meshes= 218_T, Intercooler_Pipe, Intercooler_Fins, Intercooler_Housing, Intercooler_Cross
Metalness = 0.8
BrightnessAdjustment = 0.8
LocalReflectionsSharpness = 1

[Material_Aluminium_v2]
Materials = int_steel_fake, INT_STEER_STEEL
Metalness = 0.5
Reflectance = 0.1
BrightnessAdjustment = 0.4
DetailTexture = 1
DetailNormalTexture = common/pbr_metal.dds
DetailNormalPBRSecondaryColor = 0, 0, 0, 0
DetailScale = 30
DetailNormalBlend = 1
DetailNormalPBRSmoothnessGamma = 1



[Material_InteriorPBRDetail]
Materials = int_fake_leather, 
Brightness = 0.8
Reflectance = 0.20
Smoothness = 0.5
Metalness = 0
DetailScale = 110
ApplyTilingFix=1
RESOURCE_0 = txDetail
RESOURCE_TEXTURE_0 = black.dds
RESOURCE_1 = txNormalDetail
RESOURCE_TEXTURE_1 = FAKE_LEATHER_NM.dds
DetailNormalBlend = 0.75

[Material_InteriorPBRDetail]

[Material_Leather_v2]
Materials = INT_STEER_LEATHER, interior_int_default
Reflectance = 0.03
Brightness = 0.4
DetailNormalTexture = common/leather_n.dds
DetailNormalIntensity = 2
DetailNormalPBRSecondaryColor = 0, 0, 0, 5
DetailScale = 8

[Material_Plastic_v2]
Materials = int_plastic
Reflectance = 0.2
DetailNormalPBRSecondaryColor = 0, 0, 0, 0.1
DetailNormalBlend = 0.5
DetailNormalTexture = common/pbr_plastic.dds
DetailNormalPBRSmoothnessGamma = 1
DetailTextureBlur = 1

[Material_Carpet_v2]
Materials = int_carpet
Reflectance = 0.04
DetailNormalBlend = 5
DetailNormalTexture = common/pbr_carpet.dds
DetailNormalPBRSecondaryColor = 0, 0, 0, 1
DetailScale = 20


[EXHAUST_FLAMES]
ANTILAG=1
ANTILAG_DELAY=1.25
ANTILAG_INTENSITY=2
ANTILAG_INTERVAL_MAX=1.0
ANTILAG_INTERVAL_MIN=0.5
ANTILAG_TURBO_THRESHOLD=0.6
DISCHARGE=1
DISCHARGE_CHARGE_TIME=0.3
DISCHARGE_DELAY=0.5
DISCHARGE_DURATION=1
DISCHARGE_INTENSITY=0.8
DISCHARGE_PROBABILITY=0.8
DISCHARGE_RPM_THRESHOLD_MAX=4000
DISCHARGE_RPM_THRESHOLD_MIN=500
DISCHARGE_WATER_TEMPERATURE_THRESHOLD=02
FLAT_SHIFT=1
FLAT_SHIFT_COOLDOWN=0.01
FLAT_SHIFT_DURATION=0.05
FLAT_SHIFT_GAS_THRESHOLD=0.5
FLAT_SHIFT_INTENSITY=1
FLAT_SHIFT_PROBABILITY=0.2
FLAT_SHIFT_RPM_THRESHOLD=5000
LIMITER=1
LIMITER_DELAY=0
LIMITER_INTENSITY=100
LIMITER_RPM_THRESHOLD=7600



--------------  ANIMATIONS  ---------------

[ANIMATION_1]
INPUT = HANDBRAKE             ; bind to reverse gear
FILE = handbrake.ksanim    ; file name of new animation in “animations” folder
TIME = 0.2                  ; animation time
INPUT_AS_PROGRESS = 0       ; set to 1 to switch to that second input-as-progress mode
LOOP_WHILE_ACTIVE = 0


-------------- Audio ---------------------

[AUDIO_PARAMETER_TRANSFORM]
ENGINE_EXT_RPMS = (|0=0|7800=8000|)
ENGINE_INT_RPMS = (|0=0|7800=8000|)

[AUDIO_PITCH]
ENGINE_EXT=1.03
ENGINE_INT=1


[AUDIO_VOLUME]
ENGINE_EXT =0.7
ENGINE_INT = 0.3
GEAR_EXT = 1.0
GEAR_INT = 0.5
BODYWORK = 1.0
WIND = 0.1
DIRT = 0.3
DOWN_SHIFT = 0.2
HORN = 1.0
GEAR_GRIND = 1.0
BACKFIRE_EXT = 1.4
BACKFIRE_INT = 1.0
TRANSMISSION = 1.0
LIMITER= 2
TURBO = 0.5