<?xml version="1.0"?>
<track name="Imola">

  <racing-line>
    <distance-factor>1.0</distance-factor>
    <stiffness>1.0</stiffness>
  </racing-line>

  <!-- Sky Box -->

  <sky>
    <sides>textures/sky_sides.png</sides>
	<top>textures/sky_top.png</top>
	<bottom>textures/sky_bottom.png</bottom>
	<smooth/>
  </sky>

  <!-- map-background>
    <image>../../Reference/Imola/Imola-small.png</image>
    <offset>[ -560, -900 ]</offset>
    <size>[ 1900, 1900 ]</size>
  </map-background -->

  <material name="track" type="asphalt">
	<friction>1.0</friction>
	<restitution>0.1</restitution>
	<rolling>1.0</rolling>
	<drag>0.0</drag>
	<bump-amplitude>0.01</bump-amplitude>
	<bump-wavelength>100.0</bump-wavelength>
	<texture>
	  <file>textures/track2.png</file>
	  <length>200.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <material name="grass" type="grass">
	<friction>0.7</friction>
	<restitution>0.1</restitution>
	<rolling>5.0</rolling>
	<drag>20.0</drag>	
	<bump-amplitude>0.03</bump-amplitude>
	<bump-wavelength>2.0</bump-wavelength>
	<texture>
	  <file>textures/grass.png</file>
	  <width>10.0</width>
	  <length>12.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <material name="gravel" type="gravel">
	<friction>0.8</friction>
	<restitution>0.0</restitution>
	<rolling>40.0</rolling>
	<drag>200.0</drag>	
	<bump-amplitude>0.05</bump-amplitude>
	<bump-wavelength>2.0</bump-wavelength>
	<texture>
	  <file>textures/gravel3.png</file>
	  <width>10.0</width>
	  <length>10.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <material name="tires" type="rubber">
	<friction>1.0</friction>
	<restitution>0.8</restitution>
	<rolling>1.0</rolling>
	<drag>5.0</drag>
	<bump-amplitude>0.0</bump-amplitude>
	<bump-wavelength>1.0</bump-wavelength>
    <texture>
	  <file>textures/red-tires.png</file>
	  <width>0.33</width>
	  <length>3.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <material name="rail" type="metal">
	<friction>1.0</friction>
	<restitution>0.1</restitution>
	<rolling>1.0</rolling>
	<drag>0.0</drag>	
	<bump-amplitude>0.0</bump-amplitude>
	<bump-wavelength>1.0</bump-wavelength>
    <texture>
	  <file>textures/rail.png</file>
	  <width>0.334</width>
	  <length>10.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <material name="wall" type="concrete">
	<friction>1.0</friction>
	<restitution>0.1</restitution>
	<rolling>1.0</rolling>
	<drag>0.0</drag>
	<bump-amplitude>0.0</bump-amplitude>
	<bump-wavelength>1.0</bump-wavelength>
	<texture>
	  <file>textures/wall.png</file>
	  <width>1.0</width>
	  <length>10.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <material name="kerb" type="concrete">
	<friction>1.0</friction>
	<restitution>0.1</restitution>
	<rolling>1.0</rolling>
	<drag>0.0</drag>
	<bump-amplitude>0.0</bump-amplitude>
	<bump-wavelength>0.0</bump-wavelength>
	<texture>
	  <file>textures/kerb.png</file>
	  <width>2.0</width>
	  <length>4.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <!-- Segment Properties -->

  <segment name="straight">
    [ wall grass kerb track kerb grass rail ]
  </segment>
  <segment name="straight pit">
    [ wall grass kerb track kerb track rail ]
  </segment>
  <segment name="left turn">
    [ wall grass kerb track kerb gravel tires ]
  </segment>
  <segment name="left turn pit">
    [ wall track kerb track kerb gravel tires ]
  </segment>
  <segment name="right turn">
    [ tires gravel kerb track kerb grass rail ]
  </segment>

  <!-- The track -->
  <start-direction>167.0</start-direction>

  <road segment="straight pit">
    <resolution>10.0</resolution>
    <length>135.0</length>
    <left-width>[ 0.0, 15.0 ]</left-width>
    <right-width>[ 0.0, 15.0 ]</right-width>
    <left-road-width>[ 0.0, 6.0 ]</left-road-width>
    <right-road-width>[ 0.0, 6.0 ]</right-road-width>
    <left-wall-height>1.0</left-wall-height>
    <right-wall-height>1.0</right-wall-height>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>130.0</length>
	<radius>400.0</radius>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>180.0</length>
	<braking-marker>
	  <file>textures/150.png</file>
	  <distance>50.0</distance>
	  <size>[ 1.4, 0.7 ]</size>
	  <offset>[ 2.0, 0.0 ]</offset>
	  <side>right</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>0.0</distance>
	</braking-marker>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>60.0</length>
	<radius>300.0</radius>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>10.0</distance>
	</braking-marker>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>40.0</length>
  </road>

  <!-- Tamburello -->
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>40.0</length>
    <radius>30.0</radius>
	<left-kerb>
	  <start>
	    <transition>
		  <length>4.0</length>
		  <width>1.7</width>
		</transition>
	  </start>
	  <end>
	    <transition>
		  <length>4.0</length>
		  <width>1.7</width>
		</transition>
	  </end>
	  <profile>[ 0.8, 0.08 ][ 1.6, 0.08 ][ 1.7, 0.0 ]</profile>
	</left-kerb>
  </road>
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>48.0</length>
    <radius>-40.0</radius>
	<right-kerb>
	  <start>
	    <transition>
		  <length>4.0</length>
		  <width>1.7</width>
		</transition>
	  </start>
	  <end>
	    <transition>
		  <length>4.0</length>
		  <width>1.7</width>
		</transition>
	  </end>
	  <profile>[ 0.8, 0.08 ][ 1.6, 0.08 ][ 1.7, 0.0 ]</profile>
	</right-kerb>
  </road>
  <road segment="left turn">
    <resolution>10.0</resolution>
    <length>90.0</length>
  </road>
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>30.0</length>
    <radius>40.0</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>382.0</length>
	<right-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</right-kerb>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	  <side>right</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	</braking-marker>
	<braking-marker>
	  <file>textures/150.png</file>
	  <distance>150.0</distance>
	</braking-marker>
	<elevation>[ 0.0, 0.0 ]</elevation>
  </road>

  <!-- Villeneuve -->
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>34.0</length>
    <radius>50.0</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
  </road>
  <road segment="left turn">
    <resolution>10.0</resolution>
    <length>40.0</length>
  </road>
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>41.0</length>
    <radius>-35.0</radius>
	<right-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</right-kerb>
	<elevation>[ 0.0, 0.0 ]</elevation>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>210.0</length>
	<left-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</left-kerb>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	  <side>right</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	</braking-marker>
	<elevation>[ 0.0, 0.0 ]</elevation>
  </road>

  <!-- Tosa -->
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>85.0</length>
    <radius>33.0</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
	<elevation>[ 0.0, 0.0 ]</elevation>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>280.0</length>
	<right-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</right-kerb>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>100.0</length>
    <radius>-300.0</radius>
	<elevation>[ 0.0, 6.0 ]</elevation>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>115.0</length>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	  <side>right</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	</braking-marker>
  </road>

  <!-- Piratella -->
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>75.0</length>
    <radius>55.0</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
	<elevation>[ 0.0, 20.0 ]</elevation>
  </road>

  <road segment="straight">
    <resolution>2.0</resolution>
    <length>85.0</length>
	<right-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</right-kerb>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>64.0</length>
	<radius>100</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
	<elevation>[ 0.0, 20.0 ]</elevation>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>180.0</length>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	  <side>left</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	</braking-marker>
  </road>

  <!-- Acque Minerali -->
  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>25.0</length>
    <radius>-30.0</radius>
	<right-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</right-kerb>
	<elevation>[ 0.0, 0.0 ]</elevation>
  </road>
  <road segment="right turn">
    <resolution>10.0</resolution>
    <length>80.0</length>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
  </road>
  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>28.0</length>
    <radius>-20.0</radius>
	<right-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</right-kerb>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>30.0</length>
	<left-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</left-kerb>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>22.3</length>
    <radius>50.0</radius>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>395.0</length>
	<elevation>[ 200.0, 15.0 ]</elevation>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	  <side>left</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	</braking-marker>
	<braking-marker>
	  <file>textures/150.png</file>
	  <distance>150.0</distance>
	</braking-marker>
  </road>

  <!-- Variante Alta -->
  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>15.0</length>
    <radius>-10.0</radius>
	<right-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</right-kerb>
  </road>
  <road segment="right turn">
    <resolution>10.0</resolution>
    <length>2.0</length>
  </road>
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>18.0</length>
    <radius>10.0</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>140.0</length>
	<right-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</right-kerb>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>60.0</length>
    <radius>200.0</radius>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>60.0</length>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>35.0</length>
    <radius>200.0</radius>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>200.0</length>
    <model>
	  <file>bridge.ac</file>
	  <scale>1.5</scale>
	  <translate>[ 150.0, 25.0, 18.0 ]</translate>
	  <rotate>[ 0.0, 180.0, 0.0 ]</rotate>
    </model>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>38.0</length>
    <radius>-100.0</radius>
	<elevation>[ 0.0, 15.0 ]</elevation>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>130.0</length>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	  <side>right</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	</braking-marker>
  </road>

  <!-- Rivazza -->
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>38.0</length>
    <radius>25.0</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
	<elevation>[ 0.0, 5.0 ]</elevation>
  </road>
  <road segment="left turn">
    <resolution>10.0</resolution>
    <length>80.0</length>
	<right-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</right-kerb>
  </road>
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>48.0</length>
    <radius>30.0</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>245.0</length>
	<right-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</right-kerb>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>70.0</length>
    <radius>-150.0</radius>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>140.0</length>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	  <side>right</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	</braking-marker>
	<braking-marker>
	  <file>textures/150.png</file>
	  <distance>150.0</distance>
	</braking-marker>
  </road>

  <!-- Variante Bassa -->
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>30.0</length>
    <radius>20.0</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
  </road>
  <road segment="left turn">
    <resolution>10.0</resolution>
    <length>5.0</length>
  </road>
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>33.0</length>
    <radius>-20.0</radius>
	<right-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</right-kerb>
    <!-- left-width>[ 38.0, 12.0 ]</left-width>
    <right-width>[ 38.0, 9.0 ]</right-width -->
  </road>

  <road segment="straight pit">
    <resolution>10.0</resolution>
    <length>100.0</length>
	<left-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</left-kerb>
	<elevation>[ 0.0, 0.0 ]</elevation>
  </road>

  <!-- Force the track to close -->
  <circuit/>

  <!-- Define the timing sectors -->
  <timing-line>10.0</timing-line>
  <timing-line>1350.0</timing-line>
  <timing-line>3200.0</timing-line>


  <!-- Adjust the total length if necessary. -->
  <track-length>4930.0</track-length>
</track>
