The following is a description of the AutoCAD method I used to build Zandvoort and Losail. It's not an automated process, maybe some brighter brain can do some steps in this direction. Öggo helped me in this regard, skipping some steps, he used another software and then exported his output back into CAD so I could keep working on it. I'm not going into too much detail so this may sound alien for those unfamiliar with the software. I used AutoCAD 2007 but any version should suffice, as well as similar software.
If you use reference imagery, insert it with either the IMAGEATTACH or create a 3DMESH and assign a material to it. Scale using your preferred method. Once you have the imagery placed and scaled, create a SPLINE along the track edges (middle of the while lines - pictured in blue).
After you trace the track edges, the next step is to create the centre line. Ideally it should be equidistant from both track edges, here you can use OFFSET to visually measure distances from the edges as in the example below, then trace the centre line through the intersections between lines of the same distance.
Repeat the process for pitlane. If you're familiar with GP4 track editing, you'll know where to start and end the pitlane SPLINEs.
White line width is fixed at 15 inches (0.381 m) in GP4, so use OFFSET to create the inner and outer edges of the white line, each 7.5 inches (0.1905 m) from the center. The next step is to create track sectors. Starting from the start/finish line, each sector should be perpendicular to the centre line at that point, and extend between the inner edges of the white line. Also, each sector is exactly 16 feet (4.8768 m) distant from the previous one (whether this distance is measure between sector centers or along the spline is open for debate - GP4Builder uses the first option - there shouldn't be much difference between either method except in tight corners). The end result should be something like the example below.
Then trace a PLINE connecting each track sector centre. You can then use the LIST command on that PLINE to retrieve the sector's coordinates. Be sure to set your AutoCAD to display many decimal places. Repeat the process for the left- and right-side sector edges.
From the center coordinates you need to create a text file in the format below, so it can be imported in GP4Builder. You don't need to have as many decimal places as long as you don't lose any information (the precision of the .dat file is 0.0000186 m in this particular case). This file can then be imported in GP4Builder using menu File > Import > Import Track Database. Just make sure your .dat has enough sectors before importing, GP4Builder will not create new sectors in the import process.
Using the coordinates from the left and right sector edges you also need to calculate the sector direction, measured clockwise from north. I use the following Excel formula:
=MOD(DEGREES(ATAN2(YRight-YLeft,XRight-XLeft)+90,360)-180
The sector direction values should be entered in another text file which you can import with GP4Builder. The file format should be as below (.dat precision here is 0.0000000838 degrees or 0.0003 arcseconds).
The process is the same for pitlane, just be aware that each line should start with PPOS and PDIR for pitlane instead of TPOS and TDIR. Sadly this is where GP4Builder's import function stops being useful, but tons of work may have been saved already.
Left and right track width is simply the distance from the sector edges to the sector center, so you can just calculate these distances from the coordinates you already have and insert them into GP4Builder's Track Sector window. Yes, manually.
The next step is to trace the track walls in AutoCAD (or in the case of tyre walls and Tecpro barriers, the first line of impact). Make sure these form a closed line around the circuit, except at the pit entry and exit. Then trace a line from each track sector to the walls, in the same direction. You can use the EXTEND command.
When inserting these distances in GP4Builder, be aware that these are measured from the outer edge of the white line. On some sections of track, simply extending the track sectors to the walls will result in intersecting lines, and we can't have those. In this case you should isolate the the problematic section, DIVIDE the wall in as much sectors you need, and then use these divide points to target the lines from the track sectors. The result should be smooth like the one below, but notice how the lines are not in the same direction as the track sectors. You'll need to calculate the angles between them and insert them into GP4Builder.
This was a very simplified (and probably poor) explanation. In my Google Drive (link on the first post), you can search the Excel spreadsheets named "datconversion.xlsx" which I used to calculate all needed values from the CAD drawing into .dat format. In that spreadsheet I get the values I need to type at the track sector commands (not the Track Sector window) as to avoid any loss of precision. Finally, this process doesn't cover track elevations or banking.
Hope this is of use to anyone, or at least some interesting insight
My unfinished tracks: [
www.grandprixgames.org]
Send bug reports and track editing questions to
f1virtualblog@gmail.comEdited 1 time(s). Last edit at 02/01/2022 08:15PM by Prblanco.