Garry's Mod

Garry's Mod

Not enough ratings
Google Maps 3D scan of any city/town into Garry's Mod
By Alexandrovich
In this guide you will learn how to obtain a 3D model of any city/town from Google Maps and port it into Garry's Mod as a playable map.
   
Award
Favorite
Favorited
Unfavorite
IMPORTING A 3D MAP MODEL FROM GOOGLE MAPS INTO GMOD
 
 
REQUIREMENTS:


-Google Chrome
LINK[www.google.com]

-Renderdoc v1.20
BUILDS[renderdoc.org]

-Blender
LINK[www.blender.org]


-Blender addon to import Google Maps models
LINK[github.com]

-Know how to make an Infinite Map
TUTORIAL HERE


STEP 1:

In order to obtain a 3D model from Google Maps you will need RENDERDOC v1.20
Get it here. https://renderdoc.org/ IMPORTANT IT MUST BE VERSION 1.20
You will need GOOGLE CHROME for this.


STEP 2:

Search for a tutorial on how to import models into Renderdoc
https://www.youtube.com/results?search_query=renderdoc+google+maps
There are several tutorials online in different languages.

I will explain briefly anyways:


STEP 2.1:

1 Create a shortcut to cmd.exe
2 Right click, properties
3 Copy/Paste this into TARGET:

C:\Windows\System32\cmd.exe /c "SET RENDERDOC_HOOK_EGL=0 && START "" ^"C:\Program Files\Google\Chrome\Application\chrome.exe^" --disable-gpu-sandbox --gpu-startup-dialog"

4 Copy paste this into START IN:

"C:\Program Files\Google\Chrome\Application\"

Assuming Google Chrome is installed in its default location.


STEP 3:

Now you have a shortcut that will print a number we will later need to input in Renderdoc in order to inject it into the GPU process, so we can obtain the 3D model.


STEP 4:

Watch the full process below in the video I made showing how I ported Amsterdam into Gmod.
1-Start the shortcut
2-Inmediatly input the code given by the Google Chrome message box
3-Close the msgbox and find a place to capture using the 3D layer mode of Google Maps
4-Press the capture key (Some times it takes several attempts to get a good model)
5-Save the model as a RDC file

STEP 5:

Now you have a RDC model.
Import it with Blender, scale to aprox 50 times bigger (This may vary)

To get the proper scale take a car parked on the street as an example as I do in the video, then modify the scale using the Infinite Map Lua file.

Example: If the car is 1/2 size as an in game vehicle, double the scale in the LUA file.


STEP 6:

As you see in the video, it's not easy to determine where the model will spawn, so it will take some time to figure out where you want the model to spawn (normally under the players feet)

I use INFMAP HELPER TOOLS To calculate the distance I want to move the model when editing the LUA file, as you can see on the video.

It is possible that due to model complexity your map will simply not load, crash or lag if you set the model to have collisions ("3").

To bypass this, you can create an identical model in Blender and decimate geometry to lower the triangle count and load it separately in the LUA file as "2" collision only, whilst the high triangle one being "1" non solid. (Visuals only)


You can always choose not to have collisions on your map and keep it visual. This will fix most crashes/lags.


VIDEO HERE:



Video timestamps:


0:00 - Starting RenderDoc and capturing the GPU ID
0:15 - Starting Google Maps
0:53 - Rendering the map models in higher quality into GPU
2:52 - Capturing the 3D model
2:59 - Saving the model as .RDC file
3:24 - Importing the .RDC model file into Blender
4:15 - Scaling to 50 to obtain an approx. 1:1 scale
4:29 - Exporting as .obj model
5:21 - Creating an Infinite Map addon
5:47 - Deleting unnecessary .bin files
6:19 - Proper folder path for Infinite Map addon
6:30 - Fixing .mtl file folder path
6:46 - Creating the LUA file for Infinite Map addon
7:35 - Pasting an empty Source Engine map for Infinite Map addon
7:46 - Creating the map thumbnail
9:52 - Pasting skybox textures for Source Engine empy map
10:24 - Pasting the Infinite Map addon into addons folder
10:41 - Starting Garry's Mod
12:57 - Using Infmap Helper Tools to measure distance to 3D model
13:19 - Adjusting desired height on Z vector
14:25 - Using a Google Maps car render to estimate accurate scaling
15:52 - Measuring desired model distance on Z vector with Infmap Helper Tools
16:30 - Verifying desired scale on the Google Maps car render
17:00 - Adjusting desired height on Z vector
18:30 - Infinite Map finished and ready to go



Tips:

-Zoom in and out in Google Maps so you obtain a high quality 3D model as seen on the video.
-if your model refuses to render on Gmod, try to simplify it by decimating geometry in Blender or simply removing useless areas. Usually, huge parts of planet earth are captured aswell.
2 Comments
glorbo 28 May @ 10:12am 
watermelon
Clappo 23 May @ 2:09pm 
cool
:melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon::melon: