0% found this document useful (0 votes)
85 views10 pages

GPL To GTL Track Conversion Tutorial 23nov06

This document provides a tutorial for converting a track created for GPL (Grand Prix Legends) to the GTL (Game Stock Car) format. It outlines the required tools, preparation steps like setting up file directories, and detailed instructions for tasks like converting textures to DDS format, creating the track surface in TrkMaker, and importing 3D objects. The goal is to take an existing GPL track and modify it to work within the GTL simulation.

Uploaded by

Angel Borsani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views10 pages

GPL To GTL Track Conversion Tutorial 23nov06

This document provides a tutorial for converting a track created for GPL (Grand Prix Legends) to the GTL (Game Stock Car) format. It outlines the required tools, preparation steps like setting up file directories, and detailed instructions for tasks like converting textures to DDS format, creating the track surface in TrkMaker, and importing 3D objects. The goal is to take an existing GPL track and modify it to work within the GTL simulation.

Uploaded by

Angel Borsani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

GPL to GTL track conversion tutorial

With many thanks to Steve [dB] Dienes.

Note that you cannot convert any of the tracks Papyrus created for GPL, only third party tracks. Please
make sure you have permission to convert a track if you intend to release.

Required Tools:

Sim Garage:

TrkMaker, at least version 1.6 and 3dSimEd at least version 1.12

Text Editor:

Any text editor will do. Notepad, Textpad etc.

1. Preparation:

In this document it will be assumed that the track name is “


MyTrack”just substitute the name f your
track while working through this tutorial.

1.1. Setting up your workspace:

Set up a work space directory; C:\Locations .


Then create the root directory for your track, C:\Locations\MyTrack, this will hold the data from
the track we are converting. Within this folder we need a temporary folder:
C:\Locations\MyTrack\MyTrack_dat

Within GTL we need a track folder.

GTL\GameData\Locations\MyTrack

Open 3DSimEd, and from the Tools menu, select Expand–> Papyrus DAT. Navigate to where your
original GPL track is located and select your Mytrack.dat file.
Next, point 3dSimEd to your C:\Locations\MyTrack\MyTrack_dat folder and extract the
.dat file to that location. If your track was not packed into a .DAT file, then just copy the files to your
C:\Locations\MyTrack\MyTrack_dat workspace.

Now copy the .LP files, .CAM and Track.ini from the GPL track to your
C:\Locations\MyTrack\MyTrack_dat folder.

2. Texture conversion.

Use the Texture Browser in 3dSimEd and navigate to your


C:\Locations\MyTrack\MyTrack_dat folder. Click on Batch Conversion.
Select all of the texture files (.mip and .srb) and choose .DDS as the format to convert to. Point 3DSimEd
to your GTL\GameData\Locations\MyTrack and you will now have all your texture maps as
.DDS files.

3. Creating the Track Surface with TrkMaker

3.1. Converting form GPL to XML.

If the GPL track was created with the tools GPLTRK and TRK23DOW, a lot of time can be saved if the
.TEX file used by TRK23DOW can be found. The .TEX file gives a listing of the texture maps to be used
for each track surface/wall. TrkMaker will automatically use such a file if it finds it in the same folder as the
.TRK file.

If you have a .TEX file for the track copy it to C:\Locations\MyTrack\MyTrack_dat.

Open TrkMaker and select GPL .TRK to XML


Navigate to C:\Locations\MyTrack\MyTrack_dat and select MyTrack.trk
Save as MyTrack.XML

3.2. Material Texture Maps

From the TrkMaker main window open MyTrack.XML with the Open XML command.
You should see a list box with the names of the tables that are in MyTrack.XML , you will need to open the
Material table so click on Material in the list box.
Expand the columns of the grid display by placing the mouse over the column dividers, grabbing the
dividers, so that you can resize the LLE and Comment fields.
column divider

The
field
we
need
to set
is
MapName. Even if you had a .TEX file you may have some entries set to ‘ error’ . In the example above there
was no .TEX file so all the MapNames are set to error.
In 3DSimED open MyTrack.3DO from C:\Locations\MyTrack\MyTrack_dat and switch the
display of all objects off with Display->Object Filter ALL OFF. In TrkMaker, select the text of
the LLE field and use the mouse right button to give you a menu from which you choose Copy.
Go back to 3DSimED and select View->Set View (keyboard shortcut V ) , within the Set View dialog
choose Paste Pos, hit OK. The view centre of 3DSimED has now been set to the first occurrence of the
material and by using either the mouse wheel or nume r
ick
ey‘+’y oucanzoomi non the geometry.
The Edit->Select Geometry at Centre command (s hor
tcu
t‘M’ ) will give you a context
menu allowing you
to select the faces at the view centre. In this example
the MapName required will be wall1. When you
open a GPL track the material name is the texture
map name.

Look carefully at the Comment field in the material


table as it describes the type of surface and for walls
you may have to define the MapName for the top, or
end, of the wall.

The Transparency field of the Material table should


be zero for no-transparency (e.g. asphalt, grass paint
etc), one for simple transparency (e.g. Armco) and
two for multiple transparency (e.g. wire fences). If you are not sure you can always use the Tools-
>Texture Browser of 3DSimED to look at the textures.

Work through the material table until no more MapName entries are no longer s
ett
o‘e
rror
’(u
nle
ss, of
course, you do want to use a texture named error).

It
’spos sibletha tTrk Ma k erma ya skf orawa l
ltopo rwa llendt ex t
urewhe nn onewa sus edi nthe
Track.3DO. In this case you will need to remove the material in the WallTex table. In the grid example
above the Material table is showing the wall with material wall28 for the top and wall29 for the end. If this
wall should not have a top or end then in the WallTex table the TexTop and TexEnd fields set to wall28
and wall29 should be set to a blank (empty) string.

Make sure you save your work with the Write XML command.

3.3. Testing the Track Surface.

Inside TrkMaker, Select Write GTL. Navigate to GTL\GameData\Locations\MyTrack and


save. You will now have all of your track segments as .gmt objects and you will also have a file named
_trkmaker.scn

Check your progress so far by opening _trkmaker.scn with 3DSimED. Check that all faces generated
by TrkMaker have textures assigned.
The quick way to confirm this is to use Tools->Missing Textures & Objects. If there are
missing textures then you need to look at the Materials table within TrkMaker.

3.4. Creating Response Objects.

For the AI, and the correct timing of laps, GTL needs a number of special response objects. These objects
can be created in TrkMaker using the VerticalObj table. Using the TrkMaker Open XML command open the
MyTrack.XML you created from the .TRK. With the XML open go to the VerticalObj table (you may
need to scroll down the list of tables on the left)

For each vertical object you need to define the longitude, latitude of the left and right of the object, bottom
elevation, height and the material name. You will also need to give the title of the object which should be
from the list below.
1) Xfinish. An object which spans the track (including the pit lane) at the start/finish line. Normally
this object would have longitude of zero.
2) XSector1 & XSector2. As the names suggest these two objects span the track at the end of sectors 1
and 2 and should have longitudes of approximately 1/3rd and 2/3rd around the track
3) XPitin & XPitout. These objects mark the start and end of the pitlane. You need them to span the
pitlane but not overlap any of the racing surface.

To get the correct longitudes and latitudes for these objects you can open your original GPL
MYTRACK.3DO with 3DSimED and move the mouse over the track watching the bottom right of the
status bar for the three values labeled LLE which are the longitude, latitude and elevation of the cursor
position. Alternatively, by right clicking and selecting Memorize XYZ these values will be copied as text to
the clipboard and you can paste them into notepad to read or copy.

For each of the five objects make sure the Material is one already present in the Material table (e.g. road01),
set the bottom elevation to -2 and the height to 10 ( we are attempting to create objects that cannot be missed
so we are drawing it from 2m below the track surface to 8m above the surface). You would normally set the
LongEnd to the same as the LongStart ensuring the object is perpendicular to the track. The LatStart is the
left latitude and LatEnd the right latitude.

Once all five objects are added to the VerticalObj table, use Write to XML, and then use the Write GTL
function to re-create the track surface objects in the GTL\GameData\Locations\MyTrack folder.

4. Converting the TSO .3do objects with 3dSimEd

From within 3DSimEd and from the File Menu, select Import Model.
Open your MyTrack.3do file from C:\Locations\MyTrack\MyTrack_dat.

At this point we should delete the flaggers as these objects have no purpose in GTL.
The quick way to do this is to go to Display->Object Filter and select All Off. Now switch back on the
display of flagger.3do and starter.3do objects, and exit with OK. With Edit->Select All
Displayed you should get a sub-menu with Objects, and from the Objects menu select Erase. With
Display->Object Filter, All On switch on the display of all your remaining objects.

From the File Menu, select Save As GT Legends GMT->Save Objects


Point 3dSimEd to your GTL\GameData\Locations\MyTrack folder and save.
Now all of your TSO .3do objects are .gmt objects and you will also have an _output.scn file in which they are
listed.

At this point, use 3DSimED to Import the _ouput.scn that has just been created to check for missing textures
(Tools->Missing Textures & Objects) .
5. Setting up the track configuration files.

5.1. Info

First, let’
s take a look at these file extensions and what these files do. All of these files can be viewed and
edited with Notepad or other text editors. (You may need to right-click the file and select Open With
and select Notepad).

.trk (scene) this file lists all of the objects the game will load when loading your track.
It also contains the file paths to search for them, and information about lighting and fog values. Special
properties for objects such as movable and vis groups (controls whether the object is hidden at low
graphic detail settings) are also controlled by this file. The .trk file format seems to be identical to that of
the rFactor .scn but the .trk files supplied with GTL are encrypted and you cannot read them in a text
editor. However, trk files in plain text are accepted by GTL, which allows us to create them for a track.
When writing a track surface to GTL objects, TrkMaker creates _NoName.trk which contains a header for
a .trk file.

.gdb contains the information about your event; Name, description, session details, pit speed, etc. Again
those supplied with GTL are encrypted but we can create plain text versions of .GDB which will be
accepted by GTL.
When writing a track surface to GTL objects, TrkMaker creates _NoName.gdb which can be modified for
a specific track.

.cam This is the camera file, but editing it is beyond the current scope of this tutorial. You do not need
one of these but, without one, the only views available during replay will be onboard.

.aiw This is the AI file and includes the equivalent information as the GPL .lp files and portions of the
track.ini. It contains the pit, garage, pace/safety car and start grid locations. No .AIW files are supplied
with GTL but if one is present, for a track, then it is used by GTL.
TrkMaker can create .AIW files.

Track.bmp and _LOD.JPG graphics files to display the track map and the loading screen.
Curiously, the Track.bmp file is in fact in .TGA format not .BMP format. Hence, to edit you will need to
copy it to TGA and then back to .BMP.

5.2. Borrowing files

Now that we know a little bit about the files we will be working with, we will need to borrow some
existing ones to get us started. We will use Imola as the source of these file. From
GTL\GameData\Locations\Imola, Copy ImolaTrack.bmp to
GTL\GameData\Locations\MyTrack \MyTrackTrack.bmp, and Imol_lod.jpg to
MyTr_lod.jpg (yes, just the first 4 letters are used).

We also require a horizon object, skyboxi.gmt. However, in GTL objects are packed into GTL files and
we need to expand two GTL files to get the objects we need.
Create a folder C:\locations\imola and using the 3DSimED function Tools->Expand->GTR/GTL
.GTR/GTL open first Imola.gtl and then Imolamap.mas (in GTL\Gamedata\Locations\Imola
) giving C:\locations\Imola as the destination folder.

Copy skyboxi.gmt, bkaa.dss, bkab.dds, bkac.dds, and bkad.dds from


C:\Locations\Imola to GTL\GameData\Locations\MyTrack

5.3. Editing the Configuration Files

5.3.1. MyTrack.GDB

Open _NoName.gdb (from GTL\GameData\Locations\MyTrack) with a text editor such as


Notepad.
The opening line must match the title of the track, otherwise the track will not show up in the track list in
GTL. Go through the .GDB replacing all the NoName entries. At the same time you may wish to edit
some of the other data for the track.
Save As GTL\GameData\Locations\MyTrack\MyTrack.gdb.

MyTrack
{

Filter Properties =
TestDayStart = 10:00
Practice1Start = 11:00
Qualify1Start = 15:00
RaceStart = 13:00
RaceLaps = 68
Attrition = 60

Access Level = 1

TrackName = MyTrack
GrandPrixName = MyTrack GP

5.3.2. MYTRACK.TRK

Open _NoName.trk (from GTL\GameData\Locations\MyTrack)with a text editor

The first section of the .trk file determines the search paths for your track files:
Replace references to NoName with MyTrack. Note the reference to skies_central.gtl which is
essential for the sky objects referred to later on in the .TRK file.

CUBEASF

//-------------------------------------------------------

SearchPath=GameData\Locations\Shared
SearchPath=GameData\Locations\MyTrack
MASFile=skies_central.gtl
//MASFile=MyTrack.gtl
//MASFile=MyTrackMap.gtl

The // are comment characters and anything to the right will be skipped. MyTrack.gtl and
MyTrackMap.gtl can be created later.
Save the trk file to GTL\GameData\Locations\MyTrack\MyTrack.trk.

Now open your _trkmaker.scn file (in GTL\GameData\Locations\MyTrack) with a text


editor. Select all of the text in _trkMaker.scn and copy it to the clipboard.
Paste all of this at the end of MyTrack.trk.
Close _trkMaker.scn

Open _ouput.scn, select all of the text, copy it to the clipboard.


Paste the text to the end of MyTrack.trk
Close _ouput.scn

Save and close MyTrack.trk

6.Creating the AI.

TrkMaker can create a very basic, limited, AIW file which will get us started.

In TrkMaker open your MyTrack.XML. We need to complete the AIInfo table before creating the AIW
(you may need to scroll down the list of tables to get to AIInfo).

All the values must be present. MergePitIn and MergePitOut are the longitudes at which the AI cars will
merge to and from the pit line. StallsLongStart, and StallsLatStart give the longitude and latitude of the pit
stall at the start of the pit lane while StallsLongEnd and StallsLatEnd are for the end of the pit lane. Don
’t
forget you can use 3DSimED to help get these positions for you by moving the mouse over the track
watching the bottom right of the status bar for the three values labeled LLE which are the longitude, latitude
and elevation of the cursor position. Alternatively, by right clicking and selecting Memorize XYZ these
values will be copied as text to the clipboard and you can paste them into notepad to read or copy.

Once you have completed the AIInfo table hit the Write AIW button. You will be prompted for .LP
files so navigate to your C:\Locations\MyTrack\MyTrack_dat folder and select one of the .LP
files. Next you will be prompted for the AIW filename, browse to the your
GTL\GameData\Locations\MyTrack\MyTrack folder and overwrite MyTrack.AIW

7.Converting a Camera file

TrkMaker can convert N2K3 .CAM files to GTL .CAM files. With MyTrack.XML opened in TrkMaker
select the Cam Converter button. You will be prompted for your N2K3 .CAM file and then the name of the
GTL .CAM file to create which will be GTL\GameData\Locations\MyTrack\MyTrack.cam.
The GTL .CAM file is a text file which you can edit yourself.
8. Testing and Troubleshooting.

Start GTL and select MyTrack for a testing session.

If all went well, have fun turning a few laps and you should be also able to sit back and with CTRL-I let
the AI take over the driving while you enjoy the scenery.

If your track does not show up in the track list then you have probably made a mistake in the top line of
MyTrack.GDB.

If GTL failed to load the track because of a problem with missing textures, you will get a message which
should help you to find which texture is missing. If you are getting no error message try running GTL with
the argument trace3 and then open trace.txt from the UserData\LOG folder and read the trace
particularly at the end of the file.

If the trace.txt does not help, and you are crashing about 75% through loading then it may well be that
there is a problem with the .AIW file.

8.1. Another way to create the AIW.

Look for a GTL track which has an AIW. This will be a third-party track and if you have a few to choose
from you should look for the one closest in length to the track converted. If you have rFactor you could use
an .AIW from an GRL track.

Copy this AIW over MyTrack.AIW in the GTL\GameData\Locations\MyTrack\MyTrack


folder.

We now need to determine our garage location for where the car will appear when we first enter the track.

Import the either the original GPL .3DO or the


GTL\GameData\Locations\MyTrack\MyTrack\MyTrack.trk to 3dSimEd and rotate so you
are looking down at the track and place your cursor over a spot on your pitlane. Write down the XYZ
coordinates that are displayed in the lower right side of the 3dSimEd window.
Close 3dSimEd

Open MyTrack.AIW with notepad. Scroll down through the starting grid entries and look for this section:

[PITS]
TeamIndex=0
PitPos=(53.345,-2.370,-385.856)
PitOri=(-0.001,-1.526,0.000)
GarPos=(0,52.901,-2.370,-382.767)
GarOri=(0,-0.002,0.003,0.001)
GarPos=(1,50.156,-2.370,-382.759)
GarOri=(1,-0.002,0.003,0.001)
GarPos=(2,46.933,-2.370,-382.749)
GarOri=(2,-0.002,0.003,-0.001)

GarPos (Garage Position) is the location where your car appears when you first enter the track. Depending
on the track, the garage and pit locations may or may not be the same, but for the purpose of this tutorial, we
will assume that they are.
There are 3 possible garage locations for each pit stall and each is indicated by the index numbers 0, 1, 2. Be
careful not to remove these index numbers when entering your coordinates.

The series of numbers are: (<index>,<X coordinate>,<Z coordinate>, <Y coordinate>)


*** Important*** notice that the coordinates are in XZY order, not XYZ. Pay attention to this when you
enter the coordinates that you obtrained from 3dSimEd.

Enter the same coordinates for PitPos and GarPos.

The PitOri and GarOri ( orientation ) entries control the Pitch, Yaw and Roll of the position.

Save and close MyTrack.AIW

Now try opening the track with this new MyTrack.AIW

Before testing this new .AIW make sure you delete GTL\UserData\LOG\HAT\MYTRACK.HAT

If you have no luck you could try an .AIW from another track, repeating the process above.

8.2. Track Surface Materials

If you are having problems driving some of the surfaces or you think the surface should have different
grip levels then you will need to edit the material names (Not the texture names, they can be named
anything), but the materials must use a limited set of names.

These rules apply to driving surfaces, and walls, there is no need to change the material names of the track
details used for the start line, skid marks, trackside objects etc.

Unfortunately there is no definitive list of material names used by GTL. The following list has been found
to work but there might be more valid names.

Roads: road
Dirt/Grass: gras,grvl
Rumblestrips: rmbl
Walls: twal, wall, grdr, safer

The material name has to start with one of the list above. Hence a road surface can have any name you
like providing the first four characters are “
roa
d ”.

If a drivable surface is not named correctly, your car will get stuck and sink into it. Grass, paint lines,
asphalt, cement, dirt/gravel and rumble strips must be named correctly.

In TrkMaker open your TractionTex table and look at the Tex field which holds the material name.

For each TractionTex surface check the prefix of the material name and make sure it matches one of the
prefixes listed above.

If you need to change a material name you are going to also have to reflect that change in the Material table.

The materials for the walls are defined in the WallTex table and again you should check for matches to the
l
istforwa llsa bov e. Wallsdon’ tse ema sc ri
tic
albu ti
t’swo rthma kings ure.

Again, if you change a material name the material table will also need editing.
Obviously, if you need to make changes you will have to write the GTL objects again and attempt to drive
the track again.

Note a quick way of changing the material names is to do the renaming in 3DSimED. Import _TrkMaker.scn
and use the Edit->Material Editing to check/edit the material names. However, changing the material
names in TrkMaker ensures you can keep your changes for every time you need to write the track.

9. Creating .MAS files

If you are going to release your track then at some point you should pack the .GMT and .DDS files to .MAS
files.

You can do this using 3DSimED Tools->Pack Files->GTL .GTL

Select all of the .gmt files from GTL\GameData\Locations\MyTrack


and Save As GTL\GameData\Locations\MyTrack\MyTrack.MAS

Next, select all of the .dds files from GTL\GameData\Locations\MyTrack and Save As
GTL\GameData\Locations\MyTrack\MyTrackmap.MAS

Once you have done this you should delete the .GMT and .DDS files.

You will also need to modify the MyTrack.Trk file in


GTL\GameData\Locations\MyTrack\MyTrack so that the header has the entries below (by
removing the comment characters for MyTrack.gtl and MyTrackMap.gtl).

CUBEASF

//-------------------------------------------------------

SearchPath=GameData\Locations\Shared
SearchPath=GameData\Locations\MyTrack

MASFile=skies_central.gtl
MASFile=MyTrack.gtl
MASFile=MyTrackMap.gtl

Double-check everything has worked by driving the track in GTL.

You might also like