Made a real world terrain generator

So a while back i was trying to figure out how to make a terrain generator based of elevation and after some time i’ve finally achieved it, i also added terrain colouring to add realism.

Gn Raung:
Roblox:


Real Life:

PS: this is obviusly made only for showcase and not to be played since it causes a lot of lag.

10 Likes

That’s amazing! How did you do it?

I used bing maps api to get elevations and then construct a the terrain from it, then i used mapbox raster api to colour the terrain,

Bing maps API: Get Elevations - Bing Maps | Microsoft Learn
Mapbox Raster API: Raster Tiles | API | Mapbox

5 Likes

How did you manage the implement Bing Maps API? I tried using HttpService:GetAsync but always returns HTTP 400 (Bad Request).

2 Likes

this is the coolest thing i have ever seen! Keep Up The Good Work!

Is your API token correct? On the website for the Bing Maps API, there are FAQs and useful documents that will tell you know why the HTTP 400 (Bad Request) REST code shows up.

When I used Mapbox API for something similar, my token would be correct, but then when I output the url that contains my token in my game & copy it into my browser, the link would lead to no where. To an HTTP 401, unauthorized error. It helped me figure out why it was not working, even with my token being valid.

Double check and make sure the link with your API Token that’s being outputted is a functional link, then paste it into your browser. The token could be correct but the link might not be constructed correctly. Basically in my experience, my link had my API token and worked correctly, but in the output, it was being constructed differently due to the scripts I wrote being a bit complex.

I had something like x, y, z for the token, Mapbox style, and my Mapbox username, and it messed up my link when it ran because I formatted the x y z into the url incorrectly. I ultimately managed to correct it by adding a print statement after the final URL, pressing F9 when testing the game, and pasting that link that shows up in the output into my browser. The links kept showing up as HTTP 400 or 401, so I saw the help documents of Mapbox API and there were example links that had my API token, so I can see how I should construct the url in my game.

If the url is working in my browser, it should work in game. However, these are just example links in the help documents. Don’t just copy and paste them into your scripts, it depends what you are grabbing for the link to work. I’m using Mapbox instead of Bing so it is a bit different. I used Mapbox Styles if you are interested in that route.

Bing Maps API Tutorial Documents

Bing Maps API Status Codes, like HTTP 200 & HTTP 400, so you can see if the link is actually working or not.

Go through the help documents and see if there are example links that contain your token. This is how your link is supposed to be constructed.

1 Like


i made it in abt a few hours but just useing mapbox i had to create my own backend but heres how it turned out

2 Likes

Does anyone know how I can do this with roblox terrain and an entire country?