Modified Track Path Editor + Tracks/Discussion


Ah. Well, this should fix it:
  1. Export that as an elevation profile (File -> Export elevation profile).

  2. Load that elevation profile and give it these settings:
    Path-fitting = stretch
    Auto-rejoin = bend
    Repeat = True (check the box)

  3. Click Set.
Edit: Better and easier fix:

In your original Elevation Profile, simply add this at the end:
4500,-155

Because your elevation profile ends at 3500 meters, it means that any height points after that are unaffected by it. Only the elevation point at 3500 meters have -155 meters, while those who come after it keeps whatever height they had previously. Adding a profile point beyond the length of the track makes sure that all your height points are covered by the profile. Just remember not to use stretch or scale if you do that, since that will distort the data.
 
Last edited:
The smoothening tools doesn't work on the overlap from end to start. The regular brush does though, so if you want a hill there you can use the wave feather mode.



No need to re-sample the profile, as it doesn't have any impact on the resolution of the track. The heights values of the track is determined by linear interpolation between the two closest elevation profile points:


I get that @eran0004 but what it does is allows you to control the transitions yourself so you can soften say the 20 meters around a transition instead of the 100 meters around it.
 
@eran0004 seems like it really calculates something wrong.. if track ends on value 1 then it starts from value 1.5, approx, look images, if other end is elevated then other moves too, but always ~0.5m difference.
1st.png
2nd.png
 
That is because the brush is overlapping at the ends, which is something it's meant to do on circuits.

Did you try the fixes I suggested?
yes, and no, just changed last point to 4500 instead of 3500 and figured just reason...
there HAS to be TWO points on IDENTICAL height as 0 and 600 points are, last two points are making angle to infinity for last section, and it has to be on same level as SF-straight.. lol
(not because of brush..)

so having 3500 at -155 and 4500 -155 and problem is gone, guessing same result even with
3500.0,-155.0
3500.1,-155.0
 
Last edited:
yes, and no, just changed last point to 4500 instead of 3500 and figured just reason...
there HAS to be TWO points on IDENTICAL height as 0 and 600 points are, last two points are making angle to infinity for last section, and it has to be on same level as SF-straight.. lol

so having 3500 at -155 and 4500 -155 and problem is gone, guessing same result even with
3500.0,-155.0
3500.1,-155.0

There is no extrapolation (calculating values that go beyond the data), only interpolation (calculating values within the data). So If the last profile point is 3500.1 then it won't apply to any of the height points that come after it. The elevation profile is only applied to the height points that is covered by it.

But if your track ends at 4200, then

3500,-155
4200,-155

would have the same effect as

3500,-155
4500,-155.
 
@eran0004 yes, I'm just learnig this :)

can somebody say what is real ground height of eifel flat? -155 is not 1:1.. or maybe it is somewhere??

btw eran can you add "counter" to elevation editor, counter what shows total lenght of track, with all decimals too :)

..checking more later, daughter wants to drive Dirt3.. :)
 
Last edited:
@eran0004
can somebody say what is real ground height of eifel flat? -155 is not 1:1.. or maybe it is somewhere??

I don't know. But you can experiment and see what you think feels good. The Translate command in the elevation editor raises all height points by the specified amount (use negative value to lower them).

btw eran can you add "counter" to elevation editor, counter what shows total lenght of track, with all decimals too :)

Depends on how much work it is. I haven't looked at the elevation editor code for quite a while now so I'm not sure how easy it would be to do that. The 2D distance is probably easy to get, but the 3D distance may be a bit more difficult.
 
I don't know. But you can experiment and see what you think feels good. The Translate command in the elevation editor raises all height points by the specified amount (use negative value to lower them).



Depends on how much work it is. I haven't looked at the elevation editor code for quite a while now so I'm not sure how easy it would be to do that. The 2D distance is probably easy to get, but the 3D distance may be a bit more difficult.
Thanks, not a problem to go as is.

Can someone show a link for working package of @tarnheld editor, ted-master zip package fails on install, some errors from line xx(?)
..or if that's working then I really need guidance to get it up and running, this track will need few banking angle adjustments, and if those are possible to adjust with it then I'd like to try it.
 
Can you post the full error message? I recently reworked and cleaned up, you might have a better chance by trying the version before the changes.
Command "C:\Users\xxx\AppData\Local\Programs\Python\Python36-32\python.exe -
u -c "import setuptools, tokenize;__file__='C:\\Users\\xxx\\AppData\\Local\\
Temp\\pip-build-ls070gdn\\numpy\\setup.py';f=getattr(tokenize, 'open', open)(__f
ile__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__
, 'exec'))" install --record C:\Users\xxx\AppData\Local\Temp\pip-lj7j7yqn-re
cord\install-record.txt --single-version-externally-managed --compile" failed wi
th error code 1 in C:\Users\xxx\AppData\Local\Temp\pip-build-ls070gdn\numpy\

< was unexpected at this time.

C:\Users\xxx\Downloads\TPE_mods_toolbox\ted-editor-ted-editor-0.2> @Echo
and insert a line PATH=^;<PathToPythonInstallation>;<PathToPythonInstallation>\S
cripts

pipinstall gives this and ted wouldn't start after this (no a suprise).
tededitor says:

Traceback (most recent call last):
File "ted-editor.py", line 12, in <module>
import CanvasX as CX
File "C:\Users\xxx\Downloads\TPE_mods_toolbox\ted-editor-ted-editor-0.2\Ca
nvasX.py", line 2, in <module>
import linalg as la
File "C:\Users\xxx\Downloads\TPE_mods_toolbox\ted-editor-ted-editor-0.2\li
nalg.py", line 1, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
python version 3 not found on your system. create the file pythonenv.bat in this
directory
and insert a line PATH=<PathToPythonInstallation>;<PathToPythonInstallation>\Scr
ipts; @ and try again
Press any key to continue . . .
 
Looks like a problem with numpy, you can try to install manually by typing in

Code:
python -m pip install numpy

in a command window, if python.exe is in your PATH.
 
Looks like a problem with numpy, you can try to install manually by typing in

Code:
python -m pip install numpy

in a command window, if python.exe is in your PATH.
Is on path, will try soon. Thanks in advance.

one step further..
Code:
Traceback (most recent call last):
  File "ted-editor.py", line 13, in <module>
    from PIL import ImageTk, Image, ImageFilter
ModuleNotFoundError: No module named 'PIL'
python version 3 not found on your system. create the file pythonenv.bat in this
 directory
and insert a line PATH=<PathToPythonInstallation>;<PathToPythonInstallation>\Scr
ipts;    @ and try again
Press any key to continue . . .
still not working.. :(
 
Last edited:
It's still missing the Pillow and requests libraries, the last messages are just wrong output from my batch file. Try it again manually:

Code:
python -m pip install Pillow
python -m pip install requests
 
It's still missing the Pillow and requests libraries, the last messages are just wrong output from my batch file. Try it again manually:

Code:
python -m pip install Pillow
python -m pip install requests
Goes tomorrow. Thanks.
 
It's easier opening the cmd box inside the python folder, it saves having to type the entire address. That's how I got round it.
 
Has anyone seen a track load fine but freeze a few seconds into driving? It was also weird the first time I loaded it and it dropped me in the middle of turn one. Any thoughts on what I could be running into?

Here is the ted.

 
Has anyone seen a track load fine but freeze a few seconds into driving? It was also weird the first time I loaded it and it dropped me in the middle of turn one. Any thoughts on what I could be running into?

Here is the ted.



Haven't had a freeze, but I've been dropped in the wrong corner once. No idea what caused it.
 
@tarnheld Up and running, thanks!
Now I just need few extra hours to day.. :)

Improvement ideas:
Making track piece angle and lenght fonts bigger or repositioned such way at those are visible under control points.
Big "fail" in current form is straight length markers, those are currently marked in center of track piece, they should be on corresponding sides of track, as on TPE side of marking represents which side track is cambered, numbers are always on "high side", like all sides in TPE are meaningful for same reason, showing camber side.
Biggest improvement would be track lenght counter on all sections/control points, value showing total length from start to that point, or when pointing mouse cursor to track it shows total lenght to that point, makes easier to see exact location for elevations to make, now had to count manually all section lengths and use approximate values for middle of section elevation changes. (Printed track picture and normal pen with calculator is common tool currently)

Best thing on this editor: ctrl-left mouse hold, moving section "middle point" where ever you want without upsetting other control points or angles, perfect for fine tuning camber change points, but blind at current form due above "fail" of not showing camber sides by length positioning.
 
Last edited:
Has anyone seen a track load fine but freeze a few seconds into driving? It was also weird the first time I loaded it and it dropped me in the middle of turn one. Any thoughts on what I could be running into?

Here is the ted.


My console always freeze when using those modded track above 2 hours. :crazy:. I think Eifel still not as stable as Andalusia. Maybe I'm wrong. :nervous:

Ps; Freeze (black screen)
 
Last edited:
@tarnheld With @OdeFinn 's suggestions above, here is how I handle the label positioning and angle in the Layout Creator.

First about the data types. I'm using segment point objects (sp), which are basically like the cp points of the ted file (although there is only one segment point per turn, while there are two cp points). They look like this:

Code:
class SegmentPoint():
    def __init__(self, corner, x, y, x2 = 0, y2 = 0, radius = 0, sweepAngle = 0, startAngle = 0):
        self.corner = corner #-1 = left turn, 0 = straight, 1 = right turn
        self.x = x #same as in the cp data
        self.y = y #same as in the cp data
        self.x2 = x2 #same as in the cp data
        self.y2 = y2 #same as in the cp data
        self.radius = radius #the radius of the arc
        self.sweepAngle = sweepAngle #the angle of the turn
        self.startAngle = startAngle #straights are given a startAngle, but the sweepAngle is 0
        self.length = None #this value is added later on, it's the length of the segment

This is then run:

Code:
def draw_Labels():
    '''the first level contains functions that generate segment data (and storing it in a global segment list) from the basic polygon structure'''

    def drawing_it(): #this is the level where the label is actually drawn

        def check_textAngle(textAngle): #for handling the angle of the text (so it doesn't go upside down)
            if textAngle > radians(90):
                textAngle-=radians(180)
            if textAngle <-radians(90):
                textAngle+=radians(180)
            return textAngle

        global segments
        lineWidth= roadWidth.get()*zoom #*zoom converts from meters to pixels (/zoom converts from pixels to meters)
        borderWidth = lineWidth+30*zoom
        labelDistance = borderWidth/2 + labelOffset
      
      
        for index, sp in enumerate(segments[1:], 1): #skip first segment point as that is just the start point (length 0)
            prev_sp = segments[index-1]                    #the previous segment point

            #draw labels
            #1. Calculate the label position and angle
                       
            textDistance = labelDistance                          #the distance between the label and the point it's referring to
           
            if sp.corner is 0 or abs(degrees(sp.sweepAngle)) < 2: #if straight or <2 degree corner   

                if relativeDistance.get():
                '''if relative distance mode enabled (for showing segment length
                labels are located at the center of the segment)'''
                    textCoords = interpolate(prev_sp, sp)        #linear interpolation, default if halfway between the points
                    textVector = sp.startAngle                         #the vector of the label relative to the point it's referring to
                    textangle = check_textAngle(textVector-radians(90))              
                else:
                '''if relative distance mode disabled (for showing the distance of the sp point
                labels are located at the segment point)'''
                    textCoords = sp
                    textVector = sp.startAngle+radians(90)
                    textangle = check_textAngle(sp.startAngle)
               
            else:                                                                 #for corners              
                if relativeDistance.get():
                    textCoords = Coordinate(sp.x2, sp.y2)        #label position is based on the arc center
                    textDistance = sp.radius*zoom + labelDistance #use the radius of the turn to align the label with the track
                    textVector = sp.startAngle+sp.sweepAngle/2 #vector of label is halfway through the turn
                    textangle = check_textAngle(textVector-radians(90))                
                else:
                    textCoords = sp
                    textVector = sp.startAngle+sp.sweepAngle+radians(90)
                    textangle = check_textAngle(sp.startAngle+sp.sweepAngle)

            #2. Calculate label content
                  
            if relativeDistance.get():
                text = '%d m' % sp.length
                anchor = 'center'
                offset = Coordinate(cos(textVector)*textDistance, sin(textVector)*-textDistance)
          
            else:
                thisDistance = sp.length+sum(trackLength.lengths[:index])
                text = '%d m' % thisDistance
                if textVector < 0 or degrees(textVector) > 180:
                    anchor = 'e'
                else:
                    anchor = 'w'
                offset = Coordinate(sin(textVector)*textDistance, cos(textVector)*textDistance)
                          
            if index == mainStraight and sp.length < 500:
                thisLabelFill = RED
            else:
                thisLabelFill = textFill

            #3. Draw the label to the canvas.
            w.create_text(textCoords.x*zoom+offset.x, textCoords.y*-zoom+offset.y,
                          anchor = anchor, text=text, fill=thisLabelFill, font=labelFont,
                          angle=degrees(textangle), tag='label')
 
My console always freeze when using those modded track above 2 hours. :crazy:. I think Eifel still not as stable as Andalusia. Maybe I'm wrong. :nervous:
I haven't noticed, but the game works better when it's not online. Less staring at the stopwatch.
 
I read that the tracks are retrieved from "servers". At least I am using them online only (but not in online mode, like lobbies).
Is it those freeze/hang cause from my WiFi ? Its freeze not from lobby. By the way I'm using ethernet CAT5 20m cable from my router to my PS3 :irked:
 
Is it those freeze/hang cause from my WiFi ? Its freeze not from lobby. By the way I'm using ethernet CAT5 20m cable from my router to my PS3 :irked:

The servers are only needed for loading the track. Once the track has been loaded you can keep driving on it even if you lose your internet connection.

Edit: And the track files are really small, just a few kilobytes, so even with a bad internet connection it shouldn't take more than a second or two to download.

Does your game freeze for any course maker track or are there some special tracks that makes it freeze?
 
The servers are only needed for loading the track. Once the track has been loaded you can keep driving on it even if you lose your internet connection.

Edit: And the track files are really small, just a few kilobytes, so even with a bad internet connection it shouldn't take more than a second or two to download.

Does your game freeze for any course maker track or are there some special tracks that makes it freeze?
From this few months experience only those tracks made from Eifel (mod.TPE) cause the ps3 black screen freeze, while those from Andalusia doesn't have this problem even with lobby online.
Maybe the anchors I put over the limit or too many tight corners cause it to freeze. :crazy:
 
Last edited:
From this few months experience only those tracks made from Eifel (mod.TPE) cause the ps3 black screen freeze, while those from Andalusia doesn't have this problem even with lobby online.
Maybe the anchors I put over the limit or too many tight corners cause it to freeze. :crazy:

How long are these tracks? I know that Eifel is more sensitive to track length than Andalusia, so perhaps that is the problem.
 
Back