Height Maps from the APK

  • Thread starter Outspacer
  • 217 comments
  • 33,889 views
I've added an apk to create drastic elevation changes on all themes,
Another to place the home straight wherever you like.
:gtpflag:

This is awesome, great work, many thanks for doing and for sharing.

I just want to highlight for others, the 'free home straight' APK also supports importing background images on non-flat themes.

Which means... you can import the height map images posted earlier on this thread. So now you can actually fit your track to the contours of the land, rather than making wild guesses.

You could also modify the images by drawing a track onto them in an image program (or pasting a map of a real track) over the top of the contours, then follow the line in the editor.

Basically this is a huge improvement in being able to make good courses, combined with the existing 'no red' mod which allows sharp 90 degree corners for street circuits / bus stop chicanes etc, we should be able to achieve really good tracks now!
 
Last edited by a moderator:
If I install the modded APK over the top of my current vanilla 1.0.2 on Bluestacks, will it retain all my old tracks? I don't want to root my Bluestacks so backup is tricky.
 
If you install the modded APK.At first you uninstallation 1.0.2 on Bluestacks.
tracks filesFolder backup need
 
must backup your tracks before.
To install Modified APK 1.0.2 over existing 1.0.2 you have to UnInstall the Old One first.
Then Install Modified APK
then Restore Saved tracks.

Maybe someone Knows..
unzip the APK, which files to Copy to the existing Install 1.0.2 ??

also, if you Only have 1.0 version installed.
then you can install the modified 1.0.2 APK with out loosing tracks. ( this works as an upgrade because Version number is different )
 
This modified CM sounds amazing :drool:, but I'll leave it to people more tech savvy than me to mess around with it :lol:

Once again when PD fails, the community comes to the rescue 👍
 
must backup your tracks before.
To install Modified APK 1.0.2 over existing 1.0.2 you have to UnInstall the Old One first.
Then Install Modified APK
then Restore Saved tracks.

Maybe someone Knows..
unzip the APK, which files to Copy to the existing Install 1.0.2 ??

also, if you Only have 1.0 version installed.
then you can install the modified 1.0.2 APK with out loosing tracks. ( this works as an upgrade because Version number is different )
Have you tried to copy modified apk over original, without install?
 
Hopefully the amount of anchors can modified. I really do want to recreate the 96 Hours of Hell as a whole.
I tried but even if you could have more anchors the course will crash your PS3 due to the length :(
Just like the Isle of Man TT :(

A bit of promoting here but check out my new Spa Full Circuit I just uploaded using the new TPE (wink wink nudge nudge say no more) in the GT6 track database :) I'm proud of it anyways.
 
Last edited:
I'm a bit of a noobie but is there a way to modify elevation? Is it the "a" value on the modifier tool? Is the apk with height change already preset?
 
I'm a bit of a noobie but is there a way to modify elevation? Is it the "a" value on the modifier tool? Is the apk with height change already preset?

No way to set custom heights as yet, and yes, the modded APK is preset. The "a" value is the tracks angle.
 
Nice, I really appreciate the mass effort put into this. It's fun creating 20 mile long courses with a topo map as reference. Though using Bluestacks on my PC. I have found it very difficult to scale down and align the topo maps correctly.
It took me over an hour the other night just to get it to fit right in Andalusia.
I wish I could get the topo map file to scale down automatically like a kml file.
 
Nice, I really appreciate the mass effort put into this. It's fun creating 20 mile long courses with a topo map as reference. Though using Bluestacks on my PC. I have found it very difficult to scale down and align the topo maps correctly.
It took me over an hour the other night just to get it to fit right in Andalusia.
I wish I could get the topo map file to scale down automatically like a kml file.
Me too mate. Still, adds to the experience and enhances the sense of achievement when you've done creating a track ;)
 
With the map files that were created could we say save them as raw files and put them in the apk so you get the topography view for each location?
 
Using the height maps I calculated the elevation profile of one of my tracks:

alba_elevation.png


The way I did it was that I first cropped the full .raw heightmap so that I only got the bit where my track was layed out, and then in Photoshop I posterized it by 60 levels to get the contours:

contour_60.png


Then in Illustrator I traced lines of the contour map and placed the track map on top of it. I then labelled the contour lines 0, +1, +2, +3 etc (in the picture below the values are converted to metrics, +8.0 is where 0 used to be, etc.)

alba_map_main.png


In the TPE app I went to the "place trackside object" mode, used the navigator at the top of the screen to move the cursor to the start of the track. I then compared the location of the cursor to the map, and measured the corresponding location on the map.

Using a ruler, I measured the distance from the data point to the contour lines immediately above and below it, and then interpolated a height value based on that. For instance, if the data point was halfway between line 0 and line +1, the height value is halfway in between, i.e. 0.5. If the data point was located at 75% between line +2 and +3 (with 0% being +2, and 100% being +3), the height value is 2.75. I took a sample every 100 meters, so in total there were 43 samples on this 4300 meter long circuit.

Once that was done, I offset all the height values so that the lowest value is 0. Then I checked the elevation difference in the game, divided the elevation difference with the greatest height value in my list, which gave me a factor to multiply all the height values with to obtain the metric values (relative to the lowest point of the track). The blue data points on the map above are the original contour labels converted to metric values.

Finally I plotted all the data points in the chart at the top of this post, and offset them so that 0 meters is at the start line, rather than at the start of the home straight.

As you might have guessed already there was quite a lot of work involved in doing this, so I wouldn't recommend doing it unless you really want to know the elevation profile of your track...

Although maybe there is a way to extract the track data straight from the app, and automate the process of plotting an elevation profile? Do the anchors in the app contain elevation data?
 
Using the height maps I calculated the elevation profile of one of my tracks.
First of all, awesome work!

As to some of your questions...
Finally I plotted all the data points in the chart at the top of this post, and offset them so that 0 meters is at the start line, rather than at the start of the home straight.
The elevation points in the final track data start at the beginning of the homestraight.

Do the anchors in the app contain elevation data?
Example:
First block is the homestraight which in your track contains 75 elevation points for the distance of ~600 meters.
Second block contains 6 elevation points for the distance of ~18 meters.

Now those points are evened out for the lenght specified in the data.
78eddbda50ebdd62d540be136a86ecca.png

There is 79 Bank blocks in your track

Then the elevation points are stored in another structure:
817f150d1e6a250ef02c286a95032dc6.png

There is 633 Height blocks in your track

This is what I managed to do with your track data:


 
First of all, awesome work!

As to some of your questions...

The elevation points in the final track data start at the beginning of the homestraight.


Example:
First block is the homestraight which in your track contains 75 elevation points for the distance of ~600 meters.
Second block contains 6 elevation points for the distance of ~18 meters.

Now those points are evened out for the lenght specified in the data.
78eddbda50ebdd62d540be136a86ecca.png

There is 79 Bank blocks in your track

Then the elevation points are stored in another structure:
817f150d1e6a250ef02c286a95032dc6.png

There is 633 Height blocks in your track

This is what I managed to do with your track data:




Wow, great to see it in detail! :cheers:
Looks pretty similar to the profile I made by hand, although I didn't catch the bump halfway down the straight after turn 7, as it fell in between two sample points.

I used the data you gathered and calculated the grade between each height block (difference in elevation divided by difference in length). The blue line is the elevation, while the purple / red line is the grade (purple for uphill, red for downhill). I set the X axis so that 0 is at the finish line, so the start of the home straight is now negative.

grade_elevation.png


So, it looks like the grade is static (running in the horizontal direction) for the most part of each segment, but when it changes from one segment to another there is a linear interpolation, which makes the elevation curve slightly rounded at the edges (otherwise it would be jagged).

It would be interesting to compare this to a track that was made with the 1.0.1 version of the TPE, to see the grade curve there. Before 1.0.2 there were a lot more bumps and jumps.
 
It would be interesting to compare this to a track that was made with the 1.0.1 version of the TPE, to see the grade curve there. Before 1.0.2 there were a lot more bumps and jumps.

Yeah, for example Eifel Flat in 1.0.1 wasn't actually perfectly flat and had very small elevation changes. However in the 1.0.2 the same track was perfectly flat.

If you make the 1.0.1 version of the same track, I can give you the data in the same format as above for it.
 
Yeah, for example Eifel Flat in 1.0.1 wasn't actually perfectly flat and had very small elevation changes. However in the 1.0.2 the same track was perfectly flat.

If you make the 1.0.1 version of the same track, I can give you the data in the same format as above for it.

I don't have a 1.0.1 version of the same track, but the difference between the versions should show up on other tracks as well. Maybe this one for instance? https://www.gran-turismo.com/gb/gt6/user/#!/friend/eran0004/course/1097389/
 
I don't have a 1.0.1 version of the same track, but the difference between the versions should show up on other tracks as well. Maybe this one for instance? https://www.gran-turismo.com/gb/gt6/user/#!/friend/eran0004/course/1097389/

I'll take a look at this track later today.

And if you still have the *.Bin and *.Meta files from your track, you can just load them with the older APK version and upload it again to get the another version of that track.

EDIT:

Didn't have time to fire up my PS3 today but I had the data from the Eifel Sample Track which PD made. Will it do the trick?



 
Last edited:
@Razerman

I figured out a way to detect bumps in the data: First you calculate the slope of the track (difference in height / difference in length) for every point, and then you calculate the slope difference between each point.

The image below is a close-up on a section from the sample track, at about 1000 meters from the start of the track. The blue line is the elevation of the track, the red line is the slope of the track (in %, i.e. 1% = 1 meter vertically for every 100 meters horizontally) and the black line is the slope difference (also in %). The dashed white horizontal line indicates 0%. If the red line is above 0%, then the track goes uphill, and vice versa. If the black line is above 0%, then the car gets heavier (more G's) and if it's below it gets lighter (less/negative G's).

bump2.png


This bump here of -1,9% looks like a quite big one, I've compared against my own track and the greatest bump I've got is -1,5%, which is just enough to jump at about 200 km/h.

I suspect that there is additional interpolation though, that doesn't show up in this data. It's about 7 meters between each point here, and I think the actual track in game has a higher resolution than that. So maybe what changed in 1.0.2 is the interpolation between these points?

I guess the next step would be to fetch the height data of one the extreme jump track and see if the jumps show up in the graph as well. Would you be up for it? :D
 
@Razerman
So maybe what changed in 1.0.2 is the interpolation between these points?
There is alot of code to look out for but it's possible to check out exactly what they did :). I don't have time for such thing though.

I guess the next step would be to fetch the height data of one the extreme jump track and see if the jumps show up in the graph as well. Would you be up for it? :D

Sure!
 
Here is a chart of the elevation and slope data from one of my hillclimb tracks, this one was made with the 1.0.1 version of the app. Blue line = elevation, red line = slope (how steep the hill is), black line = delta slope (difference in slope). Typically, a negative slope delta means negative G and a positive delta means positive G.

Montemaggiore_elevation-dat.png


There are a couple of dramatic slope spikes, for instance between 2000 and 3000 meters. I guess that those are at the turns of the serpent road, because they often have a pretty dramatic climb that quickly levels out again at the top of the corner.

I've still got this track in the app, so I'm going to save a 1.0.2 version of it, and then we'll have something to compare this with.
 
Here is a comparison between 1.0.1 and 1.0.2. It's a close-up on a crest. The blue line is the elevation (m), the black line is the slope (%) and the red line is the slope difference (%). The transparent lines are from 1.0.1, and the non-transparent lines are from 1.0.2.

crest_comparison.png

What I found interesting here is that the slope starts (10%) and ends (5-6%) on the same values in both versions, but that the transition begins much earlier and ends much later in 1.0.2. In 1.0.1 the transition is about 15 meters long, while in 1.0.1 it's about 45 meters long. The slope curve of 1.0.1 also have a wave-shape, dropping below 5% before returning back up there.

In the red slope difference curve we can see that the slope difference is small in 1.0.2, while in 1.0.1 it's much more dramatic, with a drop of about 4%, followed by a peak of about half the size.
 
Back