Author Topic: Make tracks in game from real sattellite data?  (Read 3854 times)

IronHorse

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Make tracks in game from real sattellite data?
« on: October 02, 2016, 08:40:22 AM »
I heard this is true that you can take terrain info from google earth (I think?) and import it into a program which you can make a custom track out of? I would like to make my local twisty road track.

TheFatController

  • Full Member
  • ***
  • Posts: 224
    • View Profile
    • MXB-Central
Re: Make tracks in game from real sattellite data?
« Reply #1 on: October 02, 2016, 08:45:19 AM »
I use real height data from Google earth when making motocross tracks, but the method I use only allows me to extract the heightmap data..

See https://youtu.be/m91V9rCSrLo

For larger areas you can zoom in when grabbing geolocation area and run it multiple times to build up a larger image.

But, once I have the heightmap in L3DT I can then export it as a mesh (3ds or obj) and import that into Blender. You could do this for the surrounding terrain, then re-create the road as it's own surface to use for riding on.

This stuff isn't easy though, I mean it is easy enough, but it's a lot of work to make something to be proud of ;)

Hawk

  • Hero Member
  • *****
  • Posts: 5849
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: Make tracks in game from real sattellite data?
« Reply #2 on: October 02, 2016, 09:38:58 AM »
You can take terrain from google earth but you have to be using the correct software to do it, and it's not always accurate data either as far as the height data is concerned. Google data is offset by 2 secs to discourage people stealing their data.

"TheFatController" has already given you some good advice above, but I find the best software for grabbing google earth data is probably Google "Sketchup/Pro", but there is plenty of software out there, some free. Just use google or look up tutorials on YouTube which often point you to software to use that will also do the job.

You could even use "Race Track Builder(RTB)" for grabbing google earth terrain data but RTB or BTB alone doesn't do a very good job of creating track surfaces good enough for GPB in my opinion.

Hawk.


Guiga

  • Full Member
  • ***
  • Posts: 195
    • View Profile
    • YouTube Channel
Re: Make tracks in game from real sattellite data?
« Reply #3 on: October 14, 2016, 11:39:08 PM »
There's also LiDAR data you can find/use. If you're lucky enough to find also CAD that would be great.

http://isiforums.net/f/showthread.php/22897-Emery-s-Public-LiDAR-Database?highlight=

Hawk

  • Hero Member
  • *****
  • Posts: 5849
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: Make tracks in game from real sattellite data?
« Reply #4 on: October 15, 2016, 12:13:50 AM »
There's also LiDAR data you can find/use. If you're lucky enough to find also CAD that would be great.

http://isiforums.net/f/showthread.php/22897-Emery-s-Public-LiDAR-Database?highlight=

Very nice! Great link GTP... Should come in very handy! ;D

Thanks mate!  ;) 8)

Hawk.

Grooveski

  • Sr. Member
  • ****
  • Posts: 409
    • View Profile
Re: Make tracks in game from real sattellite data?
« Reply #5 on: October 15, 2016, 04:26:34 PM »
Another option is to work straight from the DEMs.
I think Google Earth is based on STRM3.
http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/

If it's not the same data, it's very similar.



There may better data out there depending on where the road is.  STRM3 coverage is global though so it's the handy one.
« Last Edit: August 05, 2017, 02:44:03 PM by Grooveski »

Hawk

  • Hero Member
  • *****
  • Posts: 5849
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: Make tracks in game from real sattellite data?
« Reply #6 on: October 15, 2016, 04:32:46 PM »
I don't think it's the same data source Groovski..... The other link is saying it's down to 50cm resolution for the Lidar data. Google Earth is something like 5 - 10 meter resolution at best probably more in some cases if I remember rightly?  :-\

Hawk.

Grooveski

  • Sr. Member
  • ****
  • Posts: 409
    • View Profile
Re: Make tracks in game from real sattellite data?
« Reply #7 on: October 15, 2016, 04:55:11 PM »
I meant STRM3 and Google Earth are the same(or similar).  The first pic is GE, the second is the STRM for Estoril.
STRM3 is 90m, GE about the same.  The OS data I used for OM and Knockhill was 50m.

The first try at a landscape for OM was from GE.  I used Autocad Map 2009 which had a utility for scooping both the mesh and aerial overlay out of GE.  It was like magic, you just zoomed in GE to the extent you wanted, went to Map, punched an icon and tadaaa!   :D
Autodesk and Google had a falling out though and they pulled the function.

Thon Open Data LIDAR resource looks like a belter.  That's a new one on me too.    ;D
Scarborough data downloaded, now to get it into Lightwave and have a look see.   :P

Grooveski

  • Sr. Member
  • ****
  • Posts: 409
    • View Profile
Re: Make tracks in game from real sattellite data?
« Reply #8 on: October 15, 2016, 05:49:37 PM »
Mmmmmm - DEM porn!    :P



Cheers for the link GTP.    ;)
« Last Edit: August 05, 2017, 02:45:38 PM by Grooveski »

Hawk

  • Hero Member
  • *****
  • Posts: 5849
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: Make tracks in game from real sattellite data?
« Reply #9 on: October 15, 2016, 08:02:30 PM »
Wow! Impressive Groveski!  ;D

Looks like a lot of cleaning up work though, but the detail is definitely there by the look of it mate!  ;D

I presume most of those spikes in the data are simply trees or bushes, or even buildings? Impressive!

Hawk.

Guiga

  • Full Member
  • ***
  • Posts: 195
    • View Profile
    • YouTube Channel
Re: Make tracks in game from real sattellite data?
« Reply #10 on: October 15, 2016, 11:50:10 PM »
Mmmmmm - DEM porn!    :P



Cheers for the link GTP.    ;)


Don't thank me! I only linked to a topic I knew elsewhere, hoping it would be of use. All the thanks must always go to the guys who put the effort at achieving high quality in their shared creations.

Hawk

  • Hero Member
  • *****
  • Posts: 5849
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: Make tracks in game from real sattellite data?
« Reply #11 on: October 16, 2016, 11:50:09 AM »
You misunderstand mate..... I know you didn't create it, but you posted the pic.... It was the view in the pic I was saying "Wow!" about and how impressive it looked. Lol   ;D 8)

But no doubt to use that data you will need to put in a lot of cleaning up work, but it would be worth it I believe.  ;D

Hawk.

Grooveski

  • Sr. Member
  • ****
  • Posts: 409
    • View Profile
Re: Make tracks in game from real sattellite data?
« Reply #12 on: October 27, 2016, 06:57:49 AM »
Thon LIDAR data is cool-as so I've picked a pet project and thought I'd take some grabs and talk through setting up the data for a build.
[I should mention straight off that there's stuff in here that you don't need to do.  I like lots of overlays but some of them never really get used.  This is the long winded version - you can decide for yourself how much can be skipped]  ;)

First wave of data is:

Aerial LIDAR - from http://environment.data.gov.uk/ds/survey/index.jsp#/survey
(using the 2m data to start with.  There's 1m coverage of about half the circuit which I'll introduce later but there's 90-odd percent coverage with the 2m so I'm using that to locate the model initialy)



DEM - from https://www.ordnancesurvey.co.uk/opendatadownload/products.html
(using Land-Form PANORAMA ASCII grid [DTM])



1:250,000 Scale Colour Raster - also available from https://www.ordnancesurvey.co.uk/opendatadownload/products.html but I pinched it from Memory map instead.



1:25,000 Scale Colour Raster - Memory Map
(the real image is 3000-odd pixels square)



I deliberately made the model square - and the maps - just to simplify things.  The Land-Form tiles and 250k map are 40x40km.  The 25k coverage is 8x8km.

The Memory Map tiles were pinched by zooming in to a decent resolution, taking a screengrab, pasting into photoshop, moving along to the next bit of map and repeating until I had the whole area as a bunch of layers.  Then I cropped away the window border, upped the canvas size and moved each layer into place to form one big image.  They took 9 grabs each (3x3) and this process can be used with most mapping programs or online map sources....
....but not Google Earth - it's a pain and acts a bit like a wide angle lens, the grabs don't match up when you piece them together(Google Maps is fine) - more on this later when the maps are getting replaced by aerial photos.

The LIDAR and DEM data were both processed exactly the same way - as described the other day in the OM thread:

Quote
Autodesk Infraworks

Procedure:
Start IW > New Model > Give it a name.
Select all the tiles you want to convert for the job in Windows Explorer (Do them all in one go and IW will join them together)
Drag and drop them into the Data Sources list.
A configuration window will open - Rummage through the Coordinate System list(the little icon at the side of the dropdown) and choose BritishNatGrid then hit OK.
The new source should be listed as 'Configured' and when it's selected the little refresh button above the list should be green(it'll be greyed off if IW isn't happy with the data/co-ord system combo).
Punch the refresh button.
The display window will change and draw out the model.
Once it's done, hit the Settings and Utilities icon then Export FBX.
Use the Define Interactively function in the Export dialogue to trim down the model if you like(double click for the final point on the loop).

At first I was getting an export error with the lidar model - it didn't work until I trimmed the model so I think there may be a limit.
Don't know what it is but the working attempt came out at just under 700k polys(the not-working attempt was maybe three times the size).

This LIDAR model came out at 1.7m polys so either it just squeezed under the limit or the error I got before had nothing to do with poly count. 
I did have a problem first attempt this time as well - was trying to browse the net while it exported and everything crashed(machine lockup).  When I set it up again, set it off exporting and left it to it it worked fine.

So, converted the exported Land-Form model from FBX to LWO using Deep Exploration(or SAP Visual Enterprise Author as it's called these days) and loaded it into Lightwave.

Rotated it by a bawhair(that's Infraworks being a smartarse and spinning things from grid to true north - can probably be switched off but I haven't spotted the tickbox yet(oh - maybe there's a preferences setting for magnetic declination that can be set to zero)) and moved it into position with the bottom lefthand corner at 0,0.



Applied the 1:250k map as an auto-size planer UV.



Quick zoom in to check it was lining up ok.  Trig points pretty much in the right places and contours following the hillsides.  The maps won't be on the final model but the closer the better nonetheless(later on I'll be changing these skins to aerial photos which I'll crop to the same extents as the maps).



Changed everything to a new surface and applied the 1:25k map, also as an auto-size planer UV.
At first it covered the whole model so nothing was lining up.  It takes a little number crunching and UV tweaking:

First I scaled the UV:

Main tile(250k) is 40000m
Inner tile(25k) is 8000m
Division of main by inner = 5
Divide 1 by that = 0.2
So it's 0.2 of the size, meaning the polys in the UV selection have to be scaled by 500% to make the texture map shrink to the right size.
(Yes - the last two steps can be skipped, you simply add 00 to the end of the division number.  Just thought I'd talk through the full process because in some modeling programs you may be scaling the size of the image against the model instead of the other way round - in which case you'd use 0.2 as a scaling factor)

....then moved it into place:

Difference between insertion points is 16000,18000.  (x,y in m)
Inner tile size is 8000
Divide the vector by the size = 2,2.25
So the UV texture map offset is -200% and -225%.  (-ve movement of the model to move the UV map in a +ve direction)



Next thing to do is select the polys that fall within the inner tile...



...hit invert selection...



...and flick the outer part of the model back to the 250k surface...



....and that's the first construction layer done.

Switched to another layer and loaded in the lidar model.



One minus the other to move it into place(the cursor isn't visible on the screengrabs but it's pointed at the same feature on each model).



Checked how it looks at the other end(lining up nicely).



Yeah, looking the part. :D





To be continued.....
« Last Edit: August 05, 2017, 02:59:35 PM by Grooveski »

doubledragoncc

  • Moderator
  • Hero Member
  • *****
  • Posts: 4366
  • If it dont fit HIT it!!!!!!!!!
    • View Profile
    • GPBOC Live Streams
Re: Make tracks in game from real sattellite data?
« Reply #13 on: October 27, 2016, 07:53:56 AM »
This is fasinating me. Great work

I am so glad I live in a place called London as I would hate saying I live in Cockermouth...............who the hell came up with that town name???

I am working with the Texas Police Dept on rider awareness and they need  software with city and country roads, could this be done in GPB for a real USA city too? I cant see why not. Only thing is they need traffic too.

Google maps also has 3D I believe with buildings is that usable for GPB?

DD
GPBOC Live Streams: https://www.youtube.com/c/IASystemsComputerControls

Teamspeak: Server IP: 82.43.148.211  user password "yougetin"

i5 7600 5.0GHz z270 ASUS Maximus Code Mobo 16GB 3866MHz DDR4 RAM ASUS Strix GTX1050Ti OC 4GB DDR5 Kraken X62 AIO Cooler

Stout Johnson

  • Hero Member
  • *****
  • Posts: 670
    • View Profile
Re: Make tracks in game from real sattellite data?
« Reply #14 on: October 27, 2016, 08:08:21 AM »
I am working with the Texas Police Dept on rider awareness and they need  software with city and country roads, could this be done in GPB for a real USA city too? I cant see why not. Only thing is they need traffic too.

Put those Texas roads in game and as soon as online works properly, then put up a server and we can do some road carnage for better awareness :P
    -----------   WarStout Kawasaki Team   -----------