A downloadable addon

Download NowName your own price

Loads maps from MapBox and renders it in 3D alt text alt text

This is still a work in progress, some features need improvement (and help is welcome). Please note that on version 3.1 is not properly working (cannot generate meshes while on editor (tool mode), I'm planning to fix it soon, but there's no date yet.

The module tries to represent that data as accurate as possible and being as fast as possible, being this way ideal to load dynamically the terrain (imagine flight simulator that can load terrain from anywhere in the world as you go).


Some coordinate you can use to test the script

IGUAZU FALLS lat: -25.695277777778 lon: -54.436666666667

FLORENCE - lat: 43.771388888889 lon: 11.254166666667

COTOPAXI lat: -0.680556, lon: -78.437778

MOUNT FUJI lat: 35.36 lon: 138.73

HIMALAYA lat: 27.988056, lon: 86.925278

Mapbox Attribution

As this module is using Mapbox services, you should follow the guidelines mentioned here: How attribution works, if you plan to use the maps publicly. You can see an example in the main scene.

TODOs

Godot 3.1 is out! And with lots of new features and improvements. Also this addon have some improvements, actually, I've started a complete rewrite of this, some of the things I've done are:

  • reduced the size of the meshes (I directly generate an ArrayMesh, no mo surfacetool)
  • hand made normals, that avoid the seams visible when you create multiple tiles
Still to be done:
  • A rudimentary LOD system.
  • At lower zoom levels render earth's curvature.
  • at very low zoom levels a sphere with only texture and normal maps will make it faster to load.

Usage

First thing first (after you downloaded the addon files in the "addon" folder, or added it from the Godot Asset Library) you have to activate the addon in the Project Settings page.

In editor usage demo

Create a scene with directional light, a camera, etc. Then add a TerrainLoader node. And then in the node's properties set latitude, longitude and zoom level (It's the Coordinates setting, or Tilecoords if you want to enter directly the tile X/Y/Z). You can load multiple tiles by just changing the coordinates, usually, once entered the first Lat/Lon/Zoom you may want to just change the tile, so that you have contiguous tiles. The "Arrange Tiles" checkbox will enable automatic alignment of the tiles, based on their tile position.


Coordinates Settings
You can enter here the latitude(x), longitude(y), zoom (z)

Tilecoords
You can enter also the tile with it's X/Y and Z(oom) values.


Download

Download NowName your own price

Click download now to get access to the following files:

GodotMapLoader
External

Comments

Log in with itch.io to leave a comment.

Deleted 199 days ago
(+1)

you mean the coordinates?

You should check the gif demo.

There are properties in the terrain node thst allow you to do that, zoom and lat-lon.

Deleted 199 days ago
(+1)

I've updated the page, also corrected a small issue with code.

There is a setting where you can enter x=latitude, y=longitude and z=zoom

Deleted 199 days ago

cant get the demo to run on godot 3.1. says that set_squareHeight is not defined in the current class. this is after activating the addon from the addon menu

(1 edit)

Hi, I'm really sorry, I haven't updated it to 3.1, if you can wait I'll might be able to fix it this week.

I mean, I have started a complete new version for 3.1, that should be faster, and solve the seams problem. But that one will take much longer.

Hey, how ya doin'...

I just finished updating the module, can you test it again?