• Welcome to PiBoSo Official Forum. Please login or sign up.
 
March 28, 2024, 07:16:51 PM

News:

World Racing Series beta14 available! :)


Make tracks in game from real sattellite data?

Started by IronHorse, October 02, 2016, 08:40:22 AM

Previous topic - Next topic

IronHorse

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.

TFC

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

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.



Hawk

Quote from: GTP 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=

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

Thanks mate!  ;) 8)

Hawk.

Grooveski

October 15, 2016, 04:26:34 PM #5 Last Edit: August 05, 2017, 02:44:03 PM by Grooveski
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.

Hawk

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

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

October 15, 2016, 05:49:37 PM #8 Last Edit: August 05, 2017, 02:45:38 PM by Grooveski
Mmmmmm - DEM porn!    :P



Cheers for the link GTP.    ;)

Hawk

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.

Hawk

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

October 27, 2016, 06:57:49 AM #11 Last Edit: August 05, 2017, 02:59:35 PM by Grooveski
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.....

doubledragoncc

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; i7 12700K 5.1GHz Z690 ASUS Strix Z690-A Mobo 32GB 3600MHz DDR4 RAM ASUS Strix RTX3080 OC 10GB DDR6X ASUS Ryujin 360 AOI Cooler ROG Thor 1200w PSU in ROG Helios Tower Case.

Stout Johnson

Quote from: doubledragoncc on October 27, 2016, 07:53:56 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   -----------

doubledragoncc

LOL Stout. The problem is the systems are mobile and taken to events and need software that is not dependent on internet, so offline is important.

Shame Piboso has no AI for this or mix cars and bikes on same track!!!

DD
GPBOC Live Streams: https://www.youtube.com/c/IASystemsComputerControls; i7 12700K 5.1GHz Z690 ASUS Strix Z690-A Mobo 32GB 3600MHz DDR4 RAM ASUS Strix RTX3080 OC 10GB DDR6X ASUS Ryujin 360 AOI Cooler ROG Thor 1200w PSU in ROG Helios Tower Case.