Showing posts with label 3D. Show all posts
Showing posts with label 3D. Show all posts

Sunday, July 7, 2024

3D Modeling Earth’s Surface


Have you ever wanted to create a 3D model of a specific section of earth’s surface? I heard that it could be done using topographic data from the U.S. Geological Survey (USGS). So I asked ChatGPT to tell me step by step how to convert USGS topographic data into a 3D model in .stl format (see thread here). In response, ChatGPT told me that I need to:
  1. Download USGS topographic data
  2. Preprocess the data using GDAL to convert to ASCII Grid
  3. Convert ASCII Grid to a 3D mesh using QGIS and the DEMto3D plugin
  4. Optionally refine the 3D model in MeshLab
  5. Save the final model in STL format

That sounded complex to me, as it involves applications and file formats that I have not previously worked with. Fortunately, I discovered that there is a much easier and faster way to get 3D models in .stl format. Simply use a website that provides this specific service. Here are 2 options:

Terrain2STL is a website that allows you to create .stl models of the surface of Earth. Its interface is pretty straightforward. You can zoom/drag to a location using Google Maps which defaults to Terrain View. You can also enter GPS coordinates (refer to this post for a refresher). Next, enter details about the width, height, and other details related to the dimensions of your desired model. Then adjust settings related to water and base height and finally export your model in .stl format. Terrain2STL has the advantage of its simplicity, but its main disadvantage is its resolution which is limited to 90 meters. Here is a screenshot of Terrain2STL (click to enlarge):


TouchTerrain is another website that allows you to create 3D printable terrain models. Similar to Terrain2STL, TouchTerrain allows you to zoom/drag to a location using Google Maps, but TouchTerrain also allows you to search for a place by its name, address, or GPS coordinates which can be very useful. TouchTerrain also allows you to choose from 3 different elevation data sources, each of which has varying resolution ranging from 10 to 2000 meters, depending on its purpose. For me the default USGS data source with 10 meter resolution produced a model with the level of detail that I was looking for. It also has inputs for 3D printer settings such as your build plate dimensions to help you determine the maximum size of your model. After inputting the relevant settings, generate and download your .stl model. Here is a screenshot of TouchTerrain (click to enlarge):


After you get your desired model from either Terrain2STL, TouchTerrain, or another method, you’ll be ready to slice and 3D print your model.

Saturday, January 16, 2016

3D Virtual Reality on my iPhone

One of the current tech trends is 3D virtual reality (VR), so I decided to get some first-hand experience in this area. Perhaps one of the best known companies in this space is Oculus VR which was acquired by Facebook in 2014 for a boatload of money and whose Oculus Rift head-mounted display is considered by many to be one of the industry-leading virtual reality devices even though it is only available for pre-order at the time of this writing.

On the low-end side of VR devices are a number of Google Cardboard viewers. These products are literally made of cardboard, they require manual assembly, and they all adhere to the standard Google Cardboard specifications. And as the name implies, they are all dirt cheap. While there are many to choose from, I purchased the EIGHTones VR Kit XL ($16.99 plus tax at Amazon) for my iPhone 6 Plus. Assembly was aided by a helpful video and was pretty straightforward.

After getting my device assembled, I downloaded some virtual reality apps from the Apple App Store. Here are some free iOS apps that I played with:
  • Dive Zombie: This is a zombie shooter game where you aim your gun by simply looking in the direction of the oncoming zombies. The gun fires automatically since there is no "trigger" for the user to pull.
  • Moorente: This is a duck hunt game that is similar in concept to Dive Zombie. Note that the app is written in German, but it is fairly easy to figure out how to operate the game even if you cannot read German.
  • Roller Coaster VR: This is an app that demos VR capabilities, it basically allows you to look in all directions as you ride a virtual roller coaster.  Pretty neat if you've never seen VR apps before.
  • Dive City Rollercoaster: More or less the same as Roller Coaster VR, and this one features a 360-degree loop.
  • The Height: In this app, you basically walk through a VR landscape and collect as many items as possible. The only confusing part of this game was that it took a while to figure out that you have to look down to start and stop walking.
All of these apps were more or less designed to showcase VR capabilities so were not rich in features. I suspect that VR games will improve in the future, but playing with these apps was a fun way for me to explore new and interesting 3D worlds on my iPhone.