Height Maps from the APK

  • Thread starter Outspacer
  • 217 comments
  • 33,882 views
Since the length is more than 20 times greater than the height (12000 m long, about 560 meters high) it is very flat, so it's hard to see the terrain features.

That's a shame, but understandable. Unless you can scale up the height? Multiply all the height points by a factor of 10. It will look exaggerated, but at least we can get the general idea 💡

Also, would it be too much work to get a similar detailed contour map for Death Valley? I know it's mostly flat, but I just like having the full collection :D

I also find it annoying that the most interesting areas and steepest hills are out of bounds. Would be awesome to try and drive up the mountain bordering Death Valley. Also there's a lake in the lower left corner of Andalusia but we can't go near it :grumpy:
 
The four largest files in the APK are Unity height maps. I've made images from them where height = red * 256 + green. Quite hard to identify which is which (apart from the flat one, haha), because they don't seem to correlate well with the background image used in the editor. So I'm not sure if they're even correct (if they aren't actually used in the editor, they could be out-of-date), but maybe they'll be useful.

Eifel Flat (file 9bacceb1a11cc4e4fbd104bc1de3c395)
View attachment 463594

Eifel? (file a8b1e792f40ab864694fd23c411c3b06)
View attachment 463595

Andalusia? (file 3c9fc867f1d804640a4eebcaf566a957)
View attachment 463596

Death Valley? (file 359aeb739b399bc488767817f4894b87)
View attachment 463597

Do you think there is any way we could clip the data in the height maps to co-ordinates produced by the path editor bin files ?
 
Do you think there is any way we could clip the data in the height maps to co-ordinates produced by the path editor bin files ?

Not sure exactly what you mean... but anyway, why?

It seems to tolerate track outside the allowed area of the map, it's just that you might see gaps in the ground. I'm pretty sure the height data is made to fill the scenery extents (as in, the outer perimeter of the grey border in the editor).
 
Not sure exactly what you mean... but anyway, why?

It seems to tolerate track outside the allowed area of the map, it's just that you might see gaps in the ground. I'm pretty sure the height data is made to fill the scenery extents (as in, the outer perimeter of the grey border in the editor).

It could be useful to know the height at a co-ordinate, is that what the height map files contain ?
 
It could be useful to know the height at a co-ordinate, is that what the height map files contain ?

Oh, right. Yes - at any coordinate within the square area. I don't exactly know the extents of the areas yet though! What I assume are extents in the heightmap files are clearly ignored by the editor (they're in the 100s, not 1000s, and not centered on 0,0). The scenery files are better, but Eifel (and Flat) are scaled. These are upside-down...

Andalusia... the points at +/- 3500 seem correct for the edge of the grey area...
Andalusia_scenery_points.png


Death Valley... +/- 2994...
DeathValley_scenery_points.png


Eifel... the points at +/- 8000 must be scaled in to the edge of the grey, which is at about +/- 6000...
Eifel_scenery_points.png

(Eifel Flat is the same extents as Eifel).
 
The terrain extents, and the home straight positions, are tucked away in the Scenery files :)
Andalusia...
Code:
  <Terrain>
    <aabb_min>
      <float>-3499.99975586</float>
      <float>-3499.99975586</float>
    </aabb_min>
    <aabb_max>
      <float>3499.99975586</float>
      <float>3499.99975586</float>
    </aabb_max>
    <division>
      <int>7</int>
      <int>7</int>
    </division>
  </Terrain>
  <HomeStraight>
    <position>
      <float>-1992.65332031</float>
      <float>-156.142700195</float>
      <float>1484.98742676</float>
    </position>
    <rotation>0.927519738674</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>187.417663574</float>
      <float>-148.772750854</float>
      <float>-1068.47705078</float>
    </position>
    <rotation>0.609797716141</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>1323.75634766</float>
      <float>-109.511604309</float>
      <float>2001.01879883</float>
    </position>
    <rotation>2.42968559265</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>1104.85766602</float>
      <float>-186.014343262</float>
      <float>-1031.76586914</float>
    </position>
    <rotation>1.94424974918</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>2011.58764648</float>
      <float>-171.739349365</float>
      <float>-276.501647949</float>
    </position>
    <rotation>-0.427982777357</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>-464.453552246</float>
      <float>-143.309082031</float>
      <float>1255.82739258</float>
    </position>
    <rotation>-2.32052254677</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>195.58416748</float>
      <float>-189.548233032</float>
      <float>-214.716003418</float>
    </position>
    <rotation>-1.19497334957</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>32.995059967</float>
      <float>-159.442138672</float>
      <float>1994.12561035</float>
    </position>
    <rotation>-4.34244298935</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>-1521.0682373</float>
      <float>-209.649383545</float>
      <float>-550.846862793</float>
    </position>
    <rotation>-4.34300470352</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>2075.76928711</float>
      <float>-194.417999268</float>
      <float>1648.62915039</float>
    </position>
    <rotation>-2.51636862755</rotation>
    <width>20.0</width>
    <length>100.0</length>
  </HomeStraight>

Eifel...
Code:
  <Terrain>
    <aabb_min>
      <float>-6000.0</float>
      <float>-6000.0</float>
    </aabb_min>
    <aabb_max>
      <float>6000.0</float>
      <float>6000.0</float>
    </aabb_max>
    <division>
      <int>6</int>
      <int>6</int>
    </division>
  </Terrain>
  <HomeStraight>
    <position>
      <float>106.504615784</float>
      <float>213.528411865</float>
      <float>-463.171234131</float>
    </position>
    <rotation>0.785398185253</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>-2646.78759766</float>
      <float>381.610748291</float>
      <float>-492.279754639</float>
    </position>
    <rotation>-3.32771730423</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>1154.79321289</float>
      <float>381.610748291</float>
      <float>1496.43908691</float>
    </position>
    <rotation>6.04304456711</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>2140.25683594</float>
      <float>381.610748291</float>
      <float>-26.0204391479</float>
    </position>
    <rotation>-0.540590047836</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>1473.16113281</float>
      <float>381.610748291</float>
      <float>-2770.81396484</float>
    </position>
    <rotation>-4.27777338028</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>642.83013916</float>
      <float>381.610748291</float>
      <float>-1583.97180176</float>
    </position>
    <rotation>-5.36454534531</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>-1019.58563232</float>
      <float>381.610748291</float>
      <float>2893.55786133</float>
    </position>
    <rotation>-2.08325219154</rotation>
    <width>20.0</width>
    <length>100.0</length>
  </HomeStraight>

Death Valley...
Code:
  <Terrain>
    <aabb_min>
      <float>-2993.89501953</float>
      <float>-2993.89501953</float>
    </aabb_min>
    <aabb_max>
      <float>2993.89501953</float>
      <float>2993.89501953</float>
    </aabb_max>
    <division>
      <int>5</int>
      <int>5</int>
    </division>
  </Terrain>
  <HomeStraight>
    <position>
      <float>-1139.67675781</float>
      <float>-182.217803955</float>
      <float>485.311065674</float>
    </position>
    <rotation>2.78901743889</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>1113.3269043</float>
      <float>-187.835189819</float>
      <float>-1055.3503418</float>
    </position>
    <rotation>0.223674491048</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>-137.422058105</float>
      <float>-168.443817139</float>
      <float>-1560.61608887</float>
    </position>
    <rotation>1.89941227436</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>-71.1572036743</float>
      <float>-190.176757813</float>
      <float>1512.41259766</float>
    </position>
    <rotation>4.40943622589</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>-319.645965576</float>
      <float>-185.828979492</float>
      <float>-599.779174805</float>
    </position>
    <rotation>2.54247307777</rotation>
    <width>20.0</width>
    <length>100.0</length>
    <position>
      <float>591.496887207</float>
      <float>-182.888519287</float>
      <float>667.540893555</float>
    </position>
    <rotation>-0.964025437832</rotation>
    <width>20.0</width>
    <length>100.0</length>
  </HomeStraight>

Scenery files... more questions than answers! I've made some SVG files from them (using just the vertices and the triangles, ignoring the KD tree) and rendered them. Each triangle has an attributes value, not a colour, so I just assigned a unique colour for each attribute value. In all cases (at least) the orange area is 'outside' the height map area entirely; we never see it.

Eifel Flat (file: cfe1e8bafd7bc0f45b09adfb04c84b82)
(orange -9600,-9600 to 9600,9600 / grey -8000,-8000 to 8000,8000 / terrain -6000,-6000 to 6000,6000 division 6,6)...
Eifel_Flat_scenery.png

... ok I guess, not much to correlate there.

Eifel (file: 0327ce0504420e54fa826624d0ed189c)
(orange -9600,-9600 to 9600,9600 / grey -8000,-8000 to 8000,8000 / terrain -6000,-6000 to 6000,6000 division 6,6)...
Eifel_scenery.png

... no wait, what? Why are the Forest areas scaled up? (How does that even work in a mesh?)

Death Valley (file: 765fb1a0d6b38b042a8c7153a1d0652e)
(orange -3592.67,-3592.67 to 3592.67,3592.67 / grey -2993.89,-2993.89 to 2993.89,2993.89 / terrain -2993.89,-2993.89 to 2993.89,2993.89 division 5,5)...
Death_Valley_scenery.png

... where's the grey gone? It's behind the yellow...
Death_Valley_scenery_1.png

... no further questions there, except, why the two layers?

Andalusia (file: d71517d7c4fbe714999594a8f346963e)
(orange -4200,-4200 to 4200,4198.18 / grey -3500,-3500 to 3500,3498.18 / terrain -3500,-3500 to 3500,3500 division 7,7)...
Andalusia_scenery.png

... really? PD, what on earth is going on there?! Why does only the grey correlate to what we see on the backdrop?

edit: Updated images showing 1km grid, home straights and terrain outline (from the file data, except I made the home straights 600m long). Added the names of scenery files in the .apk.
 
Last edited:
Will there be anyway to overlay the real elevation atop the CM?

I don't know. That would only be possible if they use a texture to show the areas of forest, city, etc and we can replace that texture with a nice high-res one, in the .apk.

I'm starting to think the areas must be on a texture, since a) the above scenery files simply do not match apart from the grey, and b) it just looks more like a texture than polygons (soft edges, possibly low-res).
 
@eran0004 That map for Andalusia includes the non-drivable areas as well right? Do you mind adding in the border of the drivable areas & the start/finish straights? And also add a pdf version if possible. Sorry if I'm too demanding! :P Great work as usual 👍
 
@eran0004 That map for Andalusia includes the non-drivable areas as well right? Do you mind adding in the border of the drivable areas & the start/finish straights? And also add a pdf version if possible. Sorry if I'm too demanding! :P Great work as usual 👍

Well, Andalusia has very complex borders. I'll see if I can just copy the path from one of the earlier documents and paste it on top.

If you click the "Pop out" button you can download the full resolution image.
 
Well, Andalusia has very complex borders. I'll see if I can just copy the path from one of the earlier documents and paste it on top.

If you click the "Pop out" button you can download the full resolution image.

Yeah it's certainly not easy. I think you've done it before with a less detailed Andalusia map (page 2 of this thread I think), so maybe just copy paste from that?

Thanks! I missed that button lol.
 
Yeah it's certainly not easy. I think you've done it before with a less detailed Andalusia map (page 2 of this thread I think), so maybe just copy paste from that?

Thanks! I missed that button lol.

I saw that @Outspacer shared images of the SVG-files he created in this post, so I simply grabbed the image of Andalusia and extracted the borders from that image. Grabbed the home straight locations as well, and this is the result, in HD resolution :lol:

 
@eran0004 - I made a higher res png-from-svg-from-script-from-scenery image for you...



Getting the outline as a line from the SVG or Scenery is difficult. Easier to do as you did and make one from detecting the edges in a bitmap version.

This one is 2048x2048 - why is your image 2049x2048?
 
@eran0004 - I made a higher res png-from-svg-from-script-from-scenery image for you...



Getting the outline as a line from the SVG or Scenery is difficult. Easier to do as you did and make one from detecting the edges in a bitmap version.

This one is 2048x2048 - why is your image 2049x2048?


My image is 2049x2048 because it was created in Adobe Illustrator, and the artboard just loves to interfere with the grid so when you create a rectangle to crop the image, it will either snap to the artboard or to the grid and it's hopeless to know which unless you zoom in 600% and correct it manually.

Edit: Can you create a high resolution image of the home straight locations?
 
My image is 2049x2048 because it was created in Adobe Illustrator, and the artboard just loves to interfere with the grid so when you create a rectangle to crop the image, it will either snap to the artboard or to the grid and it's hopeless to know which unless you zoom in 600% and correct it manually.

Edit: Can you create a high resolution image of the home straight locations?

Ah, I see - what a pain!

How's this, for now? If you can handle SVG directly, that might be a better way for me to provide a full set. (I'm using batik-rasterizer to produce the PNGs).

 
I saw that @Outspacer shared images of the SVG-files he created in this post, so I simply grabbed the image of Andalusia and extracted the borders from that image. Grabbed the home straight locations as well, and this is the result, in HD resolution :lol:

Thank you very much! That's perfect 👍

Would it be too difficult to create a detailed map for Death Valley? Or is the elevation differences too small to be useful? I already have Eifel so this will be to complete the set.
 
Thank you very much! That's perfect 👍

Would it be too difficult to create a detailed map for Death Valley? Or is the elevation differences too small to be useful? I already have Eifel so this will be to complete the set.

Well, it's possible to cut off the mountains on the sides and increase the contrast in the valley. Then it looks something like this:

Death_Valley.png
 
Well, it's possible to cut off the mountains on the sides and increase the contrast in the valley. Then it looks something like this:

View attachment 472682

Awesome, thanks! You can't drive on the mountains anyway so you don't really need it. Possible to also plot the boundaries and straights? I don't think it's been done before for DV so you have to start from scratch unfortunately...
 
Awesome, thanks! You can't drive on the mountains anyway so you don't really need it. Possible to also plot the boundaries and straights? I don't think it's been done before for DV so you have to start from scratch unfortunately...

Can drive on mountains with some shenanigans ;)

I'm not sure if increasing the contrast is the right thing to do, but until we have some reference for what the actual heights are, why not! The alternative is using the same colouring for all the maps, which would show that some are hillier than others. Neither choice is a clear winner.

I'll upload a complete set of boundaries and home straights (in both SVG and PNG) when I get home :)
 
Right, here's a dump of my current Scenery folder.
I restyled the home straights to look a bit more like PD's, but with a deliberately larger white triangle.
Scripts are included, but if the SVGs and/or PNGs are useful already then there's no need for them.
(The XML files are the original data).

 
Can drive on mountains with some shenanigans ;)

Serious? Does the road actually go up the mountains or you just go straight through it (i.e. the mountain is not modelled)?

There's also a lake in the lower left corner of Andalusia and a huge cliff on the left side of Eifel Flat. Can you drive on those as well?
 
Serious? Does the road actually go up the mountains or you just go straight through it (i.e. the mountain is not modelled)?

There's also a lake in the lower left corner of Andalusia and a huge cliff on the left side of Eifel Flat. Can you drive on those as well?
Indeed, it does build a roadbed on air if you will, just don't look down!
 
Serious? Does the road actually go up the mountains or you just go straight through it (i.e. the mountain is not modelled)?

There's also a lake in the lower left corner of Andalusia and a huge cliff on the left side of Eifel Flat. Can you drive on those as well?

The out-of-bounds mountains are partly modeled, some of the bits you can't see from the in-bounds area have no visible model. But the heightmaps fill the square, and appear to match the visible model (I haven't tested it much). Laying track works wherever there is height data, since it puts an extra model on top of the terrain. But of course, you have to use shenanigans to escape the limits in the editor - see the 35km track thread :)
 
Indeed, it does build a roadbed on air if you will, just don't look down!

The out-of-bounds mountains are partly modeled, some of the bits you can't see from the in-bounds area have no visible model. But the heightmaps fill the square, and appear to match the visible model (I haven't tested it much). Laying track works wherever there is height data, since it puts an extra model on top of the terrain. But of course, you have to use shenanigans to escape the limits in the editor - see the 35km track thread :)

Awesome :D Can either of you guys make a track and share it? I'm not that tech savvy to mess around with the editor lol.

Death Valley up the mountains.

Eifel Flat up the cliff.

Andalusia across the lake.

That would be super 👍
 
Awesome :D Can either of you guys make a track and share it? I'm not that tech savvy to mess around with the editor lol.

Death Valley up the mountains.

Eifel Flat up the cliff.

Andalusia across the lake.

That would be super 👍

Click on Shared Courses in PR1VATEJ0KER's signature. I'm planning a Subi Reef track for the lake..... when I get time :(
 
I've saved a track that's mostly on the lake. Don't get excited, it's a terrible track to drive! I was really enjoying it on Eifel Flat, but when moved to Andalusia the home straight gets longer, the track narrower, and it doesn't quite fit inside the lake :(

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

I don't think I'll leave it up for long!

Sweet, thanks! Don't worry, I'm not too concerned whether it's nice to drive or not, I just want to see close up what the lake and its surrounding scenery is like :D
 
Back