Import Google Earth Terrain from Sketchup to Unity3d
by Ty Miller
Here is a method to import a Sketchup Google Earth Terrain into Unity3d and convert it to a Unity3d terrain, making full use of terrain tools in Unity3d.
This method uses:
A. PlayUp Tools: http://www.playuptools.com/downloads/
B. Unity Object2Terrain script: http://www.unifycommunity.com/wiki/index.php?title=Object2Terrain
1. Change sketchup units to meters (to get needed measurements for Unity settings, which are in meters)
2. Grab your desired terrain area using the geo-location feature in Sketchup 8.0
3. Measure X-Y dimensions of this Google Earth Snaphot (Sketchup RGB dimensions = Unity XYZ dimensions)
4. In Layers window, check Google Earth Terrain view and measure lowest point to highest point (elevation). This is your Z measurement in Unity later…
5. Right-click on this Google Earth Terrain mesh and select PlayUp/Export Selected Geometry from Sketchup (right-click on component)
Now we go to Unity:
6. In Unity, drag terrain onto scene
7. Apply -90 degree (or +270 degree) X-axis rotation
8. Create new terrain
9. Select menu item Set Heightmap Resolution and match to the Sketchup measurements we took earlier. (Sketchup RGB dimensions = Unity XYZ dimensions). Here you can also set the resolution of the terrain. Experiment with a few different resolutions to see what works best for your project.
Note: If you go back to adjust your Unity terrain heightmap resolution, you’ll need to repeat the above steps 6-9
10. Select Sketchup Google Earth Terrain you dragged onto scene. (make sure to select the mesh itself, not the parent)
11. Select Terrain/Object to Terrain (Unity script from above. The script will mold to replicate the imported Sketchup terrain mesh)
Now we have the terrain shape, but we have no texture. We go to our image editing application.
12. In your image editing application, open: Assets/PlayUp/Objects/Materials/Textures/Google Earth Snapshot.tga.
13. Rotate (not ‘flip’) the image 180 degrees, then save as a new file keeping the .tga extension. You can name this file anything you want. This file should live in the same folder.
Back to Unity:
14. Select terrain and add the new .tga texture, entering the proper x,y tiling values from our measurements above.
Done! Now your texture lays over the Unity3d terrain and you are able to use the terrain tools over the Google Earth Terrain.
Additional info:
——————–
After creating models in Sketchup, then importing these components into Unity, set the FBX settings on imported objects to .025 and click Apply. This will bring measurements into equivalent Unity scale.
