Modified Track Path Editor + Tracks/Discussion

@eran0004
Capture.PNG
Capture_2.PNG
 

Attachments

  • Capture.PNG
    Capture.PNG
    99.6 KB · Views: 20
@eran0004 @Mr Grumpy @NingDynasty
I'm scanning out a new route for a touge. I've noticed in the past that the mapped route doesn't always correlate to the road shown in the satellite view.
For example, this is the current one I'm facing:
Capture5.PNG

Normally, for small ones, I'll use street view to get a more precise view. Yet, for bigger deviations. I'm not sure if I should use the red line or the blue line?
 
@eran0004 @Mr Grumpy @NingDynasty
I'm scanning out a new route for a touge. I've noticed in the past that the mapped route doesn't always correlate to the road shown in the satellite view.
For example, this is the current one I'm facing:
View attachment 667453
Normally, for small ones, I'll use street view to get a more precise view. Yet, for bigger deviations. I'm not sure if I should use the red line or the blue line?

That's a really big deviation, try reloading the page. I checked the very same spot on Google Maps and the deviation I get is much smaller. Also, make sure you turn off 3D, since that distorts both the map and the satellite image.
 
That's a really big deviation, try reloading the page. I checked the very same spot on Google Maps and the deviation I get is much smaller. Also, make sure you turn off 3D, since that distorts both the map and the satellite image.
Ok, I tried that. I've now noticed that the blue route is somehow kept 3D even though you turn the satellite view too 2D.
Example:
Capture7.PNG

So, when I changed it back to Map instead of Satellite, it lays it out flat along the route on the map. So, I'll probably go on that.
Although, to the contrary. Not all routes in Satellite view do this, as I was scanning a route in my home state, where the route doesn't do this. So I guess it's all about location. So, to be safe. Use maps instead of satellite. Only use satellite for reference checks.
 
It should work, my isle of man course is 60% outside the borders. Then again I didn't use @eran0004's editor when I made it.
You can try modelling it at Eifel (I think it's bigger), export a .ted and then use hex editing to change the scenery back to Andalusia.

I would just make the track shorter though. If you cut a bit away from the northern part of the track it would fit.
:ouch::( This is killing me on the inside.
After several experiments. I've noticed that when you change the theme in the header, then save and re load. It doesn't change the road structure codes to those of the Sierra theme.
I really do not want to resort back to using GT's TPE, or bobtail my touges. This is that last major hurdle I've got to make in order to finish my list. The last part contains courses that have parts that are just outside the border.
 
:ouch::( This is killing me on the inside.
After several experiments. I've noticed that when you change the theme in the header, then save and re load. It doesn't change the road structure codes to those of the Sierra theme.
I really do not want to resort back to using GT's TPE, or bobtail my touges. This is that last major hurdle I've got to make in order to finish my list. The last part contains courses that have parts that are just outside the border.
Yeh you have to change the structure codes manually.

Can't you run it through @tarnheld's editor to resize it just to check all ok ? Then return it to it's normal length if all goes well.

How long is the track btw ?

Why can't you export it ? Doesn't the editor allow you to or does your screen go black on loading ?
 
Last edited:
Yeh you have to change the structure codes manually.

Can't you run it through @tarnheld's editor to resize it just to check all ok ? Then return it to it's normal length if all goes well.

How long is the track btw ?

Why can't you export it ? Doesn't the editor allow you to or does your screen go black on loading ?

I've went through it with a fine tooth comb. Eliminated all 0 radius curves, segments are no smaller than 20 meters. The total length of the hill climb is 16534.321 meters. I'm allowed to export it, yet when I load it on the PS3, it freezes during one of the three loading screens at random.
I'll change the structure codes and see if that solves the issue. Personally, the hill climb I'm using is a test version. If I can get the theme change to work, then I'll recreate it from scratch.
 
On Eifel the 10km limit is pretty much the technical limit for how long you can make the track. Andalusia can cope with at least twice that length, but Eifel is for some reason more sensitive.

I can work on a fix that allows you to go out of bounds, but it's a little complicated since there is no elevation data there. The fastest approach would be to make the elevation flat when you leave the frame, then you would have to edit the elevation to create the slopes that you need.

The other approach I have in mind is a reverse mirroring of the height map, which would give a seamless transition when crossing the border. Hopefully it wouldn't be too complicated to do...

Edit: Turns out, it's pretty complicated. Here's a prototype for the algorithm, the bold square in the middle represents the original height map.

Skärmbild (204).png


...also, I think I may have accidentally invented Sudoku 2.0 :P
 
Last edited:
I've went through it with a fine tooth comb. Eliminated all 0 radius curves, segments are no smaller than 20 meters. The total length of the hill climb is 16534.321 meters. I'm allowed to export it, yet when I load it on the PS3, it freezes during one of the three loading screens at random.
I'll change the structure codes and see if that solves the issue. Personally, the hill climb I'm using is a test version. If I can get the theme change to work, then I'll recreate it from scratch.
Something obviously wrong, you might need to double check the hex editor to make sure.

I've done it before where I've not realised I've reversed track measurements by accident or entered something in the wrong place.

But I agree with eran, don't change it to Eifel.

You could upload the ted file to google drive then give me the link & I can download it & take a look for you. A second pair of eyes is always better when looking for an issue.
 
Last edited:
13.6 km is the longest Eifel track I see in my list. It's point to point though, made by official TPE and Ted-editor, including scaling up. No problems apart from aesthetics.
It climbs up quite a bit and those shadows are an eyesore. After the finish line, the road plummets down all wall-like.
 
By chance read about Euler spirals and associated it with "realistic fantasy roads":
  • Its curvature begins with zero at the straight section (the tangent) and increases linearly with its curve length.
  • Where the Euler spiral meets the circular curve, its curvature becomes equal to that of the latter.
Euler spiral, Wikipedia
Interactive graph

What, why...
According to research performed in Denmark, in addition, the perspective view of a road with a Clothoid curve is more natural and pleasing to the eyes (and allows more of the road to be seen). So, not only is the road easier to drive and steer on, and is less stressful and jarring to all occupants, it might even be safer by allowing the brain to better predict and see what is going to happen.
(http://gizmodo.com/why-roller-coaster-loops-are-never-circular-1549063718)
 
Last edited:
Ye, we use spiral curves in real life on the on and off ramps for Highways. I remember being taught about them in my highway design course for engineering. I've even used a few in my own courses. Spiral's are very cool.
 
I don't think an actual Euler curve is possible to do (unless the arcs can be bent?), but I guess you could always make an approximation.

The green line is the Euler curve, while the blue line is an approximation using 6 arcs (since each corner has two arcs, it would mean using three corner segments per turn instead of one). I think it could be doable, just need to figure out the math first.


euler_approx.png



The best thing would be to find a formula that is dynamic, so it can adjust the number of segments automatically depending on the length of the turn. I'm thinking 40 meters would be the minimum for 2 segments, 60 minimum for 3, 80 minimum for 4, etc. so that each segment is at least 20 meters long. Using lengths shorter than 20 meters sometimes lead to strange behaviour in the game, so I would like to avoid that.
 
The best thing would be to find a formula that is dynamic, so it can adjust the number of segments automatically depending on the length of the turn. I'm thinking 40 meters would be the minimum for 2 segments, 60 minimum for 3, 80 minimum for 4, etc. so that each segment is at least 20 meters long. Using lengths shorter than 20 meters sometimes lead to strange behaviour in the game, so I would like to avoid that.
I would guess (from what I read today) the effect is mostly noticeable at high speeds, which should avoid the need for very small curves.
 
I'm about to solve it for an Euler curve with two segments:

euler.png

Edit: Small mistake. The angle in the bottom right corner is supposed to be on the other side of the vertical line.

Edit 2: Got a script that dynamically adapts the number of segments so that the segment distance is as close to 20 meters as possible, without going below the limit and without exceeding a maximum of 4 segments.

Here is an example, with a 45 degree turn and a radius set to 250 meters:

segment 0 R1000.000\2.250°
segment 1 R500.000\4.500°
segment 2 R333.333\6.750°
segment 3 R250.000\9.000°

These segments (first half of the turn) all have an equal length and a linear increase in curvature until it gets to the 250 m radius. The second half of the turn is the same, but mirrored.

Edit 3: Here is that 45 degree turn as described above.

euler_45.png


Edit 4:

Getting closer, but no cigar yet. The last piece of the puzzle before I can start testing the euler curve is to calculate the positions of the points relative to the corner point of the polygon. The point p_center in the figure below is the key for that, just need to figure out in which order to calculate things...

euler_45_2.png


Edit 5: I think I have solved the position calculation. Basically I'm calculating each euler turn twice: The first time to get the size of the corner (and check if it needs to be scaled down to fit) and the second time to actually build it. I need to rewrite quite a big part of the LayoutCreator though, because when I originally wrote it I was naive enough to think that all corners would always have two equal segments :P

But it's going to be much better now, the new code is cleaner and prettier.
 
Last edited:
I hate arcs.

Skärmbild (220).png


With a passion.

Edit: Let me rephrase that...

euler_screen (1).png
It's actually working. It's just that the full application is a pretty chaotic environment to test these things in, since there are so many checks and auto-adjustments going on (not to mention that the full code by now is the length of a small novel). The screenshot above is from a separate script, containing just the curve algorithm, and as you can see it works beautifully there.
 
Last edited:
Here is the equation for calculating the arc length for each arc segment of the Euler curve given a segment count (for half the curve) of n.
θ is the absolute angle of the turn and r is the smallest radius of the curve.

CodeCogsEqn (6).png
The arc length of the full curve is:

CodeCogsEqn (7).png

 

Latest Posts

Back