Modified Track Path Editor + Tracks/Discussion

Euler curves are getting closer! Just tested the algorithm on a path :D
euler_screen (4).png
 
More progress: The Euler curves can now auto-adjust their radius if the curve is too big to fit in the available space.

Available space is defined as:
[distance to previous point] - [length occupied by previous curve], or [distance to the next point * 2/3], whichever is smallest.

euler_screen (7).png


Question: Does anyone know if there is a limit to how many CP points you can have in a track? I think the original TPE has an anchor limit of 100, which should mean that 202 CP points is the maximum for those tracks. The Euler curve is pretty expensive in terms of CP points, since you can have up to 20 cp points in a single curve, so it would be good to know if there is a technical limit somewhere.
 
Starting to look like something! All the corners of this track are using Euler curves and instantly (to my eyes at least) it looks like a pretty realistic layout. There is a certain smoothness to it that you don't get with circular arcs.

As you can see I have also updated the graphics style so that the track (black) and border (light gray) are outlines rather than filled. It gives a cleaner look, and it doesn't hide what's directly below the track.

RenderImage (2).png
 
Starting to look like something! All the corners of this track are using Euler curves and instantly (to my eyes at least) it looks like a pretty realistic layout. There is a certain smoothness to it that you don't get with circular arcs.

As you can see I have also updated the graphics style so that the track (black) and border (light gray) are outlines rather than filled. It gives a cleaner look, and it doesn't hide what's directly below the track.

View attachment 673698
Yes, the new graphics are much easier to the eyes. That would definitely help during the build phase. Plus the spiral curves will help tremendously on some of my builds as they have numerous spiral curves which have me using two arcs to mimic a spiral curve.
 
First track with Euler curves!

https://www.gran-turismo.com/us/gt6/user/#!/friend/eran0004/course/2954110/

The curves are pretty nice. The bank angle is relative to the curvature, so it's the greatest at the apex.

There's just one tiny little glitch that I need to fix: The layout is mirrored. That's because cartesian coordinates uses y+ up while screen coordinates uses y+ down, so I need to figure out a nice place to convert them before the file is exported...

Edit: It's even better than I expected! Here is another track:

https://www.gran-turismo.com/gb/gt6/user/#!/friend/eran0004/course/2954235/
 
Last edited:
Re: Euler curves

After some testing I came to the conclusion that there needs to be an option to limit the Euler curves, because for curves with a sharp angle it's hard when you're driving to predict how tight the corner will be.

So I added such a limit, and you can see the result below. The left image is unlimited Euler curves, while on the right the Eulers are limited to 60 degrees and any angle beyond that is simply added to the middle segments. So the effect is that you get a transition into the corner, then constant radius, and then transition out of the corner.

euler_nolimit.png eulerlimit.png
 
That's a good idea. I tested your euler circuits and I did find myself sort of wondering where some of the turns were going. I think you get what I mean--you said it better. :lol:
 
Hairpins are working! :D

View attachment 674706

Fun fact: Building this track in the TPE app would require 53 anchors. Here it is done by only 10 points.

Edit: For anyone who is still in school, this is the reason why you should love to learn about trigonometry.
Nice! Ye, love math.
Nice fix on the hairpins. I always had to either use one weird arc, or use two connected together. Which was not easy to do.
 
Tweaked the Euler curve algorithm, I think the curves feel pretty good now. Here is a track you can test to see what they are like.

https://www.gran-turismo.com/us/gt6/user/#!/friend/eran0004/course/2959252/

Also, most of the functions have been recoded to work with the new system, so the October target for version 3.0 of the Layout Creator looks pretty good. What remains now is the function to draw the main straight (since it's much wider than the normal road), the function to display corner count labels and a new savefile format. It would also be nice to take some time to clean up all the obsolete code... In total, the code is about 150 pages long right now, but there are some pretty big chunks that are no longer in use :P
 
...and here it is: Track Layout Creator 3.0, featuring Euler Curves, procedural hairpins, improved graphics, smarter banking, more accurate track data and better interactivity.

https://www.gtplanet.net/forum/threads/course-maker-toolbox.352281/#post-11706459

I feel like I have tested pretty much everything, but if you find any bugs and glitches please let me know!

Also, there are two new types of warning that will show up when you're heading into shady territory:
  • Red triangle on the road + red lines next to the road: This warning appear when a segment is less then 14 meters long. This can lead to some issues in the game (AI navigation, time invalidation), so it's better to try to stay above 14 meters when you can. Keep in mind that a corner is always at least two segments, so try to keep the corner lengths greater than or equal to around 30 meters.
  • Red dot at arc center + red lines next to the track border: This warning appear when the corner radius is shorter than the border width, which means that the track border is intersecting with itself. This has no performance impact that I know of, but it may look ugly.
 
Last edited:
@eran0004 I really like you new update so far.
Yet, I'm working on a short Oval.
map3.PNG

And for some reason I cannot connect all the corners.
map.PNG

map2.PNG

My questions are:
Can I connect the corner circled in red like that circled in green?
Can I somehow set the camber of a straight?

I thought I had a solution by turning the straights into long curves, yet it was hard to connect and would not render properly when loaded on GT6.
The camber angles for the main curves is 15 degrees while the straights are 10.
 
@eran0004 I really like you new update so far.
Yet, I'm working on a short Oval.
View attachment 675698
And for some reason I cannot connect all the corners.
View attachment 675696
View attachment 675697
My questions are:
Can I connect the corner circled in red like that circled in green?
Can I somehow set the camber of a straight?

I thought I had a solution by turning the straights into long curves, yet it was hard to connect and would not render properly when loaded on GT6.
The camber angles for the main curves is 15 degrees while the straights are 10.

Ah yes. The last corner of a circuit is a special case, forgot to add the exception for circular arcs there.
Replace layoutEuler.py with this file and you should be able to connect them: https://drive.google.com/open?id=0B_nYaY13F28NVmdVd2dPbWVqaDQ

There is no way to set the camber of a straight (yet?), so you have to make that edit in the 010 editor.

I've got the GT6 TPE installed on my Windows 10 laptop, would that cause a problem with your Track Creator?

It won't cause a problem, this is a completely separate application.
 
If somebody would like to run this on a Linux system and has met the actual dependencies:
Change two lines in Track Layout Creator 3.0.py
Code:
master.bind('<+>', zoomIn) INTO master.bind('<Button-4>', zoomIn)
AND
master.bind('<minus>', zoomOut) INTO master.bind('<Button-5>', zoomOut)
Then it won't run on Windows, though. A solution would be some conditional clause.

edit: forum mangled it
 
Last edited:
If somebody would like to run this on a Linux system and has met the actual dependencies:
Change two lines in Track Layout Creator 3.0.py

master.bind('<+>', zoomIn) INTO master.bind('<Button-4>', zoomIn)
AND
master.bind('<minus>', zoomOut) INTO master.bind('<Button-5>', zoomOut)

Then it won't run on Windows, though. A solution would be some conditional clause.

Those are lines 2560 and 2561. You can also put a # at the start of both lines to ignore them altogether. Since you can already zoom with the mousewheel and with the zoom tools at the toolbar on top of the canvas, there's no need to zoom with the keyboard as well.

So like this:

#master.bind('<+>', zoomIn)
#master.bind('<minus>', zoomOut)
 
Those are lines 2560 and 2561. You can also put a # at the start of both lines to ignore them altogether. Since you can already zoom with the mousewheel and with the zoom tools at the toolbar on top of the canvas, there's no need to zoom with the keyboard as well.

So like this:

#master.bind('<+>', zoomIn)
#master.bind('<minus>', zoomOut)
Yeah admittedly I didn't realize those were keyboard identifiers, strangely enough, but the commenting out approach doesn't then read the mousewheel (on Linux).
 
Ah yes. The last corner of a circuit is a special case, forgot to add the exception for circular arcs there.
Replace layoutEuler.py with this file and you should be able to connect them: https://drive.google.com/open?id=0B_nYaY13F28NVmdVd2dPbWVqaDQ

There is no way to set the camber of a straight (yet?), so you have to make that edit in the 010 editor.



It won't cause a problem, this is a completely separate application.
Nice, it works, yet the main stretch has weird transitions. The back straight is correct.
IMG_20170927_042540535.jpg
IMG_20170927_042630271.jpg
IMG_20170927_042705639.jpg
 
Nice, it works, yet the main stretch has weird transitions. The back straight is correct. View attachment 675720 View attachment 675721 View attachment 675722

I'm afraid that's a limitation of the game. The main straights were always intended to be straight and level, so banking them and bending them doesn't work that well.

Yeah admittedly I didn't realize those were keyboard identifiers, strangely enough, but the commenting out approach doesn't then read the mousewheel (on Linux).

Mousewheel is button 4 and button 5 on Linux? Interesting... These things would be much easier if there was a global standard for naming keys :P
 
I'm afraid that's a limitation of the game. The main straights were always intended to be straight and level, so banking them and bending them doesn't work that well.


Mousewheel is button 4 and button 5 on Linux? Interesting... These things would be much easier if there was a global standard for naming keys :P


Ah, tis a sad end to a fun project.
Although, I was wondering if you could get the editor to allow me to connect two or more corners? For example to create 180 degree to 3/4 a circle turns?
 
Ah, tis a sad end to a fun project.
Although, I was wondering if you could get the editor to allow me to connect two or more corners? For example to create 180 degree to 3/4 a circle turns?

If you make them circular arcs (select the polygon point and press <e>) you can connect them. Keep in mind that the maximum radius of a corner is limited by the size of the previous corner, so in the case below I first set turn [1] to the radius that I wanted it to have, then turn [2] and then turn [3]. So just work your way from the start of the turn to the end of the turn.


270.png


Edit: To create a figure 8 track, you just need four points.

fig8.png
 
Last edited:
Having trouble logging into @Razerman's ted extractor. Says username or password wrong (which is bollocks) anyone else having issues ?

I can successfully log into everything else btw.
PSN, TPE, GT6 mypage, on phone & PC. It's just the extractor not responding at all.

It was fine yesterday.

Edit: don't worry, I'm in. (Backdoor) :)
 
Last edited:
Having trouble logging into @Razerman's ted extractor. Says username or password wrong (which is bollocks) anyone else having issues ?

I can successfully log into everything else btw.
PSN, TPE, GT6 mypage, on phone & PC. It's just the extractor not responding at all.

It was fine yesterday.

Edit: don't worry, I'm in. (Backdoor) :)

Same for me. I guess Sony changed something about the login method. Using the cookie from the browser still works though.
 
@Mr Grumpy and @eran0004
I thought I was the only one. I was gonna give it a day before I was gonna post about it. At first, I thought my accounts had been compromised. Then I found it wasn't. Had to use the cookie method last night to test the R and H loop. This happened once before with me, although it fixed it's self after a short while. I hope Sony isn't trying to crack down on us.
 
Back