Coder Social home page Coder Social logo

godotmaploader's Introduction

GodotMapLoader

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).

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).

Try it yourself

Fisrt thing fisrt (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 Cordinates 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.

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 mdule 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

Mesh dimensions should adapt so that lower zoom levels will result in bigger meshes, a rudimental LOD system.

The earth curvature at low zoom levels (up to 6 but should be less probably), is not rendering correctly, there should be some precision error, or I am misunderstanding someting about tile/pixel to latitute conversion.

Mesh size is still too big (approx 25MB per tile generated), need some logic to skip unnecessary vertices (It's almos implemented, but needs a better logic).

Dinamically generated normal maps would come handy too, especially at low zooms (approx 1 to 4), as altitudes are irrelevant, but still at certain light inclinations it should project some sort of shadows.

godotmaploader's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.