The Racing Line
(c) 2002-2003
last updated: 3-May-2003
What is it?

The Racing Line is a program designed to recalculate the racing groove, found on every Grand Prix Legends track.  To begin with, the program supports the original 11 tracks.  Why is this A Good Thing?  Well, when Papyrus created each track, they didn't have the services of all the hotlapping aliens doing thousands of laps to find the ultimate limit of each corner.  Four years later, and we're still following those racing lines created way back then!  Even if you know you have to brake 'just past that spectator', actually having a spot marked out in front of you on-track helps no-end.  Since running a few dozen laps at Watkins Glen, I've broken all my P.B's by some margin, and Greg has reported that his lap time consistency has greatly improved.


What's New?
7-Nov-2002:   First release

31-Dec-2002:
 Second release
* Tracked down a bug that was crashing the program in the NewGrooving process for some people on some machines under certain circumstances (thanks Andrew for testing all those versions :-).  
* Fixed a bug where it wouldn't load and process some add-on tracks.  It still doesn't work properly with Brands Hatch (first version) or St.Jovite (strange clipping errors are introduced).
* New .CLN files for Anderstorp, Bremgarten, Bugatti, Crystal Palace, Goodwood, Panorama (Bathurst), Road67, Snett67, Solitude, USGP1960 (Riverside), Zeltweg (Osterreichring).

15-Mar-2003: Object Adding release
* Objects can now be added to any track for which a .cln file is available.  See "Adding Objects"

3-May-2003:  Re-released with .cln files for the HistoricRank and MunchausenRank tracks, plus a few others.


How does it work?
Ok, if you're really interested...
(1) the program loads a track.3do file in a way that allows for the whole thing to be changed (nasty BSP trees!).
(2) every existing groove polygon is stripped out of the track- ooo harsh ;-)
(3) for every polygon in the track, a duplicate is created with the groove texture applied.
(4) each duplicate polygon is clipped against the edges of the actual racing groove, and the resultant polygons added to the track.
(5) track is saved.
Yes, (3) and (4) are quite inefficient, but it works, which is more than can be said for the other methods I tried :-)

Please note that big tracks take several minutes to process, even with GHz processors.  It is not uncommon for the program to look like it has crashed when loading the Nürburgring, for instance.


How do I use it?
Run the program.  Make sure you have:
<trackname>.dat - this is used to identify which track you wish to create a new groove for.  The program will load <trackname>.3do from the track directory if it exists, otherwise it will extract the .3do from the .dat.  You already have this file from the GPL CD.
<trackname>.cln - this is the centre-line file, required to make the new groove work.  There are 11 of these provided with the download for this program.  You can either copy them to the appropriate track directory (sierra/gpl/tracks/<trackname>/), or leave them with the program executable.
<filename>.grv - this is a file, created by using GPL Replay Analyser.

 
How do I make a .grv file?

(1) Load GPLReplayAnalyser  (homepage: http://home.bip.net/martin/gplra/)
(2) Load a replay, and select a lap.  Top-5 replays are suggested, for the optimal racing line.
(3) Under the Tools -> TrackCreatingTools menu, choose Export Lap to Groove.
(4) The default settings are good, click Ok.
(5) When the program has finished processing, you will be prompted to save the .GRV file - best place is in sierra/gpl/tracks/<trackname>/.
Once you have those three files for the track you wish to re-groove, do the following:

(1) Select the .dat file with "Pick DAT..."
(2) Select the .grv file with "Pick groove..."
(3) Select the .cln file with "Centreline..."
(the Object List... button is for the addition of trackside objects, and is not to be used at this time)

(4) Set the options
Change Groove - must be ticked to process the groove
Add Objects - not yet implemented
Scale Groove - For certain tracks, the groove file must be stretched.  Check this box to bring up the scaling dialog box shown later on...
Maximum groove polygon length - this specifies the maximum longitudinal length of groove polygons.  Normally, the default of 10metres is enough, but some tracks/grooves may require shorter or longer maximums to achieve a good visual appearance.
Minimum opacity - this setting (0-255) determines how faint a groove polygon must be before it is not added to the track.  Values below 64 are normal;  the higher the value, the fewer groove polygons are created, and the worse the groove will look.

(5) Click -Process Track- and wait for the groove to be created.  Messages will appear in the bottom box to indicate progress, and the Status box will update during the longer tasks.  Error messages will mostly be of the 'file xxx not loaded' variety, and easy to fix.

If you have chosen to Scale the Groove, the following dialog box will appear:

Changing the groove scalar can be done by typing in a value, or by clicking and dragging on the numbers.  The scale to use for Nürburgring is 1.0018- conveniently the default value :-)  Spa could probably do with a scale of 1.0008 or so;  Rouen, Silverstone, Monaco and Zandvoort maybe need a 1.0004 to fix some finish line problems, but not really necessary.

The program has finished when "-= 3DO Saved =-" is printed in the message box, and the Process Track button is re-enabled.  If it hasn't done anything for 10 minutes, maybe it has crashed. Oopsie.


How do I adding objects to a track?

Just like changing the groove, you need to have some files in order to add trackside objects.  You will need to:
(1) Select the .dat file with "Pick DAT..."
(2) Select the .mrk file with "Object list..."
(3) Select the .cln file with "Centreline..."

The .mrk file (marker file) is a text file listing the objects that are to be added to the track.  For people familiar with trk23do, this file is a simplified version of the .tso file, with the major difference being a lack of infield/outfield placement options.  This is possible, but I'd have to create a new placement method, so it will only happen if someone asks nicely enough ;)

Example .mrk file:

14
   545.0  0.0  0.0    0.0 0.0 0.0 mrk_brk //braking for t1
   573.0  0.0  0.0    0.0 0.0 0.0 mrk_g54 //shifting down for t1
   615.0  0.0  0.0    0.0 0.0 0.0 mrk_g43 //shifting down for t1
   658.0  0.0  0.0    0.0 0.0 0.0 mrk_g32 //shifting down for t1
  1044.0  0.0  0.0    0.0 0.0 0.0 mrk_brk //braking for t2
  1320.0  0.0  0.0    0.0 0.0 0.0 mrk_g23 //shifting up
  1750.0  0.0  0.0    0.0 0.0 0.0 mrk_brk //braking for t4
  1755.0  0.0  0.0    0.0 0.0 0.0 mrk_g32 //shifting down for hairpin
  2151.0  0.0  0.0    0.0 0.0 0.0 mrk_brk //braking for t5
  2496.0  0.0  0.0    0.0 0.0 0.0 mrk_brk //braking for t6
  2924.0  0.0  0.0    0.0 0.0 0.0 mrk_brk //braking for t8
  3271.0  0.0  0.0    0.0 0.0 0.0 mrk_g23 //shifting up main straight
  3423.0  0.0  0.0    0.0 0.0 0.0 mrk_g34 //shifting up main straight
  3749.0  0.0  0.0    0.0 0.0 0.0 mrk_g45 //shifting up main straight


First line tells how many objects are in the list.  
Then, each object is listed on a new line:
Note there are no commas between items, and that each number is a floating-point number.

Longitudinal position is the distance from the start/finish line.
Lateral position is the distance from the centreline:  -ve values to the right, +ve to the left.  The centreline is usually the centre of the track, but not always!
Z-Adjustment.  This value is normally 0.0.  Use it to raise or lower an object relative to ground-level.  +ve is up, -ve is down.
X Rotation.  This is the usual rotation value to be changed.  Values in degrees.  It rotates the object about the vertical axis.
Y Rotation & Z Rotation.  I leave this up to user experimentation.  Combining more than one rotation value can leave a nasty imprint on the mind ;)
3DO filename.  This .3do file must be in the track directory for the object adding process to work!  Do not add '.3do' in the .mrk listing.
Everything else up to the end of the line is a comment, and ignored by TheRacingLine.

So... with this file, and the .3do files  AND the Add Objects button checked!  TheRacingLine can proceed to add your objects to the track.  This is where it will either all work perfectly, or go horribly wrong.
In order to get Longitude and Latitude values for a track, you will need a program that can read .trk files.  GPLTrackEditor can do this, and I know of one other program (but not the name, d'oh) that can.


Can I process other tracks?

If there proves to be sufficient demand, other tracks will have .cln files created for them, allowing The Racing Line to process them.  Bear in mind that creating a .cln file for a short track takes a couple of hours (driving, cln creation, track install, testing, obligatory hotlapping session..), and that the Nürburgring took a couple of days...


Who is reponsible for this?


Known problems


last updated: 3-May-2003