;
; Particle definitions
;
; ****************
; IMPORTANT NOTE:           ____________________
; Max particle count should NEVER EXCEED 65536!!
;                           ====================
; In the unlikely case that you need this within racer,
; the particle system should be revised to work with unsigned ints rather than unsigned shorts

; particleSystemName
; {
	; ; Max nr Of Particles
	; max=10
	; ; velocity out of the emitter in m/s
	; startvelocity=0 0 -1 
	; ; variance in m/s
	; startvelocity_var=0 0 0.2
	; ; lifetime in seconds
	; life=3
	; ; variance in seconds
	; life_var=1
	; ; size of a particle in meters
	; size=0.5
	; size_var=0.2
	; ; grow or shrink particles
	; growth=0
	; growth_var=0
	; ; max alpha=1 = fully opaque at start.
	; max_alpha=1
    ; ; Alphafade determines how fading will happen
    ; ; linear is the default, no or none will have max_alpha for the entire life of the particle
    ; alphafade=no
    ; alphafade=linear
    
	; texture=data/images/texturename.tga
    
    ; ; Other shaders can be applied. The defaults are particles_v.cg and particles_f.cg
    ; ; Use other shaders when you don't want certain functions like lighting, or you want to add new non-standards
    ; vertex_shader=particles_spark_v.cg
    ; fragment_shader=particles_spark_f.cg
	
  ; influences
  ; {
	; ; name of an existing particleInfluence (in c++)
	; ; value: 1=default, 0-1= less influence, 1-inf=more influence
	; airfriction=0.1
	; wind=0
	; gravity=1
  ; }
; }

smoke
{
  ; foreach car
  ; Car tire smoke (light; smoke from burning engines uses a different particle system)
  ; Max #particle at once for a system
  max=2000
  ; Lifetime and variance (actualLifetime = life-life_var..life+life_var)
  life=6
  life_var=4
  startvelocity=0 -0.34 0.15
  startvelocity_var=0.69 1.0 1.25
  ; Start size
  size=0.35
  size_var=0.23
  ; Growth of particle (m/s)
  growth=0.15
  ;growth=1.5
  growth_var=0.11
  ;growth_var=0.5
  max_alpha=0.5

  texture=data/images/smoke_fake_lighting.tga
  ambient=.2 .2 .2
  diffuse=.3 .3 .3
  specular=1 1 1
  shininess=10
  ;texture=data/images/smoken.tga
  influences
  {
    airfriction=0.31
    wind=0.28
    ; gravity=0
  }
}

;smoke
{
  ; foreach car
  ; Car tire smoke (light; smoke from burning engines uses a different particle system)
  ; Max #particle at once for a system
  max=400
  ; Lifetime and variance (actualLifetime = life-life_var..life+life_var)
  life=3
  life_var=1
  startvelocity=0 1 0
  startvelocity_var=0 0.6 0
  ; Start size
  size=0.9
  size_var=0.2
  ; Growth of particle (m/s)
  growth=0.6
  ;growth=1.5
  growth_var=0.1
  ;growth_var=0.5
  max_alpha=0.1
  ; texture=data/images/smoke.tga
  texture=data/images/smoke_fake_lighting.tga
  
  influences
  {
    airfriction=2
    wind=0.8
    ; gravity=0
  }
}
	
smoke_heavy
{
  ; foreach car
  ; Burning engine
  ; Max #particle at once for a system
  max=100
  startvelocity=0 0.5 0
  ; Lifetime and variance (actualLifetime = life-life_var..life+life_var)
  life=5
  ; life_var=2
  life_var=1
  ; Start size
  size=0.3
  size_var=0.1
  ; Growth of particle (m/s)
  growth=0.7
  ;growth=1.5 0.3
  growth_var=0.6
  ;growth_var=0.5
  max_alpha=1
  texture=data/images/smoke_fake_lighting.tga
  influences
  {
    airfriction=0.2
    wind=0.06
    ; gravity=0.1
  }
}

smoke_exhaust
{
  ; For each car
  ; exhaust fire
  ; Max #particle at once for a system
  max=25
  startvelocity=0 0.0 -0.4
  startvelocity_var=0 0.1 -0.1
  ; Lifetime and variance (actualLifetime = life-life_var..life+life_var)
  life=1.0
  ; life_var=2
  life_var=0.5
  ; Start size
  size=0.05
  size_var=0.02
  ; Growth of particle (m/s)
  growth=0.4
  ;growth=1.5 0.3
  growth_var=0.2
  ;growth_var=0.5
  max_alpha=1
  texture=data/images/smoke_fake_lighting.tga
  influences
  {
    ;airfriction=0.2
    ;wind=0.06
    ;gravity=-0.1
  }
}

gravel_smoke
{
  ; foreach car
  ; Smoke generated by driving through gravel
 
  max=100
  startvelocity=0 1.5 0
  startvelocity_var=0 0.6 0
  life=4
  life_var=2
  size=0.3
  size_var=0.0
  ;growth=0.7
  ;growth_var=0.4
  growth=0.6
  ;growth_var=0.2
  max_alpha=0.8
  alphafade=linear
  ;texture=data/images/gravel_smoke.tga
  texture=data/images/smoke_fake_lighting.tga
  
  influences
  {
    airfriction=2
    wind=0.1
    ;gravity=0.1
  }
}

gravel
{
  ; One system per car
  max=100
  
  startvelocity=0 0.30 -0.5
  startvelocity_var=0.75 0.15 0.5
  
  life=5.0
  life_var=0.8
  ; Start size
  size=0.18
  ;size_var=0.02
  ; Growth of particle (m/s)
  ;growth=0.08
  ;growth_var=0.02
  max_alpha=1
  alphafade=no
  texture=data/images/gravel_dirt3.tga
  
  influences
  {
    ; airfriction=0.002
    ; wind=0.3
    gravity=0.6
  }
}

grass
{
  ; One system per car
  max=100

  startvelocity=0 0.30 -0.5
  startvelocity_var=0.75 0.15 0.5
  
  life=5.0
  life_var=0.8
  ; Start size
  size=0.18
  size_var=0.02
  ; Growth of particle (m/s)
  ;growth=0.08
  ;growth_var=0.02
  max_alpha=1
  alphafade=no
  texture=data/images/grass_particle.tga

  influences
  {
    ; airfriction=0.002
    ; wind=0.3
    gravity=0.6
  }
}

grass_smoke
{
  ; For each car
  ; Smoke generated by driving through grass 
  max=100
  startvelocity=0 1.5 0
  startvelocity_var=0 0.6 0
  life=4
  life_var=2
  size=0.3
  size_var=0.1
  ;growth=0.7
  ;growth_var=0.4
  growth=0.6
  ;growth_var=0.2
  max_alpha=0.6
  alphafade=linear
  texture=data/images/smoke_fake_lighting.tga

  influences
  {
    airfriction=2
    wind=0.1
    ;gravity=0.1
  }
}

spray
{
  ; foreach car
  ; Car rain spray
  ; Max #particle at once for a system
  max=75
  ; Lifetime and variance (actualLifetime = life-life_var..life+life_var)
  life=0.4
  life_var=0.2
  
  startvelocity=0 0.1 0
  startvelocity_var=1.5 0.1 0.2
  
  ; Start size
  size=0.2
  ;size=1
  size_var=0.2
  ;size_var=0.3
  ; Growth of particle (m/s)
  growth=5
  growth=0.5
  growth_var=0.2
  max_alpha=1.0
  ;max_alpha=0.75
  texture=data/images/spray.tga
  
  influences
  {
    airfriction=0.5
    wind=0.5
    gravity=1
  }
}

backfire
{
  ; foreach car
  ; Coming out of the exhaust
  ; Max #particle at once for a system
  max=5
  ; Velocity relative to the car's exhaust (usually negative z-axis)
  startvelocity=0 0 -2
  startvelocity_var=0 0 0.5
  ; Opaqueness
  max_alpha=1
  alphafade=no
  ; Lifetime and variance (actualLifetime = life-life_var..life+life_var)
  life=0.1
  ;life_var=0.02
  ; Start size
  size=0.035     
  size_var=0.01
  ; Growth of particle (m/s)
  growth=1.5
  growth_var=0.5
  texture=data/images/backfire.tga
  
  vertex_shader=particles_light_v.cg
  fragment_shader=particles_light_f.cg
}

;backfire_long
;UNUSED
{
  ; foreach car
  ; Coming out of the exhaust
  ; Max #particle at once for a system
  max=5
  ; Velocity relative to the car's exhaust (usually negative z-axis)
  startvelocity=0 0 -0.50
  ; Opaqueness
  max_alpha=1
  ;alphafade=linear;
  ;alphafade=slow_to_fast
  ; Lifetime and variance (actualLifetime = life-life_var..life+life_var)
  life=0.2
  ;life=0.5
  life_var=0.1
  ; Start size
  size=0.035     
  size_var=0.01
  ; Growth of particle (m/s)
  growth=0.05
  ; growth_var=2.0
  texture=data/images/backfire.tga
  
  vertex_shader=particles_light_v.cg
  fragment_shader=particles_light_f.cg
}

; one spark system per track
sparks
{
  ; Sparks when driving against things
  particles_per_spawn=10
  max_spawns_per_second=300
  ; Max #particle at once for a system
  max=1000
  ; Opaqueness
  max_alpha=1  
  startvelocity=0 1 0
  startvelocity_var=2 2 2
  alphafade=linear
  ; Lifetime and variance (actualLifetime = life-life_var..life+life_var)
  life=0.8
  life_var=0.4
  ; Start size
  size=0.025
  size_var=0.0
  ; Growth of particle (m/s)
  ;growth=0.0
  ;growth_var=0.0
  texture=data/images/spark.tga
  
  vertex_shader=particles_spark_v.cg
  fragment_shader=particles_spark_f.cg
  
  influences
  {
    gravity=0.5
  }
}

; confetti !!!
confetti
{
  ; Sparks when driving against things
  particles_per_spawn=100
  max_spawns_per_second=3000
  ; Max #particle at once for a system
  max=1000
  ; Opaqueness
  max_alpha=1  
  startvelocity=0 8 0
  startvelocity_var=3 2 3
  alphafade=linear
  ; Lifetime and variance (actualLifetime = life-life_var..life+life_var)
  life=30
  life_var=0.4
  ; Start size
  size=0.1
  size_var=0.0
  ; Growth of particle (m/s)
  ;growth=0.0
  ;growth_var=0.0
  texture=data/images/spark.tga
  
  influences
  {
    gravity=0.6
    airfriction=1
  }
}

; wallcrash
; unique per track
;UNUSED
{
  ; Max #particle at once for a system
  ; 10 crash explosive-ish particles should be more than enough, even when driving with many cars
  max=10
  ; Opaqueness
  max_alpha=1
  ; Lifetime and variance (actualLifetime = life-life_var..life+life_var)
  life=1.5
  life_var=0.2
  ; Start size
  size=0.2
  size_var=0.01
  ; Growth of particle (m/s)
  growth=0.0
  growth_var=0.0
  ; impact.tga
  texture=data/images/impact.tga
  
  ; if we work with light emitting crash particles, then we need a light emit particle shader
  vertex_shader=particles_light_v.cg
  fragment_shader=particles_light_f.cg
}
