Rick's Blog

Terrain in Blender - Option 1: BlenderGIS

Wasatch Range, Northern Utah Wasatch Range, Northern Utah

I have tried creating environments in Blender and other 3D programs.  Usually it involved a lot of time and effort and resulted in frustration.  Part of my problem was that I tried to create too much of the world that was never to be seen by the camera, leading me to my Lessons Learned #1.  I've recently experimented with two Blender add-ons that make the process easier; BlenderGIS and Mirage.  They each have their strengths, depending on what you want to do.

BlenderGIS is a free addon, available here.  Its strength is dealing with maps, shapefiles, terrain elevation data, etc. which are geographically referenced (georeferenced for short).  If you want to combine images from multiple sources and you don't want to try to align then manually, BlenderGIS is for you.  If you want to quickly use terrain elevation data and cover it with procedural grass, rocks, trees, etc., then Mirage may be better for you.  I am sure, at the graduate level, there are ways to combine the best of both worlds, but if you can do that already, this post is probably not the best use of your time.

BlenderGIS
Scene Georeferencing Panel

Installation instructions are available via the github link above; they are fairly standard for Blender.  When you start a new scene, you will need to select the overview map (also known as the 'basemap') cache location.  Future files will use this location or you can switch it at any time.  To start your project, I suggest setting the geographic center of your scene.  On the N-panel, under the 'View' tab, there should be a 'Geoscene' sub-panel.  I have had the best luck using 'Web Mercator' as the Coordinate Reference System (or CRS).  You can also use this panel to choose coordinates for the center of your scene, but I find the basemap method faster and simpler.

Basemap Dialog
Creating a Basemap

 In the 3D viewport, the menu bar should now include a 'GIS' option.  GIS > Web geodata > Basemap will bring up a dialog for the basemap.  If you didn't set the CRS above, or if you want to change it, you can also do that here.

Basemap As a Reference Image
Initial Basemap View

​Usually, the default selections are fine.  Selecting OK will bring up a map (as defined by the 'Source' and 'Layer' options) that you can zoom and drag.  Dragging your point of interest to the center of the Blender grid is important because any georeferenced information will be relative to these coordinates and blender may misbehave the further things get from the center.  (floating points, bits of precision, hand waving, blah blah.....you get the idea.)   Once you have the map centered and zoomed to your liking, press escape.  BlenderGIS will import your view of the basemap as a reference image.  However, one of the benefits of using BlenderGIS is that any other information you import will be aligned properly (with a few caveats I'll discuss).

Initial SRTM Plane

Now you have a map, but I generally want elevation data too.  There are two easy methods to get elevation data: 1) SRTM and 2) import DTED.  SRTM (Shuttle Radar Telemetry Mission) are elevation data from NASA.  BlenderGIS has two (as of this writing) online sources for the data.  Again, slide and zoom in the 3D viewport until the basemap shows you the area of interest, then GIS > Web geodata > SRTM.  A plan with subdivision surface and heightmap modifiers should appear within a few seconds, depending on the size of the area you requested.  The 6 subdivisions help create additional vertices for elevation data, but the initial plane will probably be slightly underwhelming.   I generally increase the heightmap Strength to about 5, reduce the subdivisions to level 1 or 2, and subdivide the plane about 10-20 times.  This gives a good initial view.

Georaster Import Options

If you want a color map overlayed on top your now-glorious elevation plane, the simplest method is to select GIS > Import > Georeferenced Raster and select the image blender is using for the basemap.  This file will probably be in the same folder as your blender file.  In my case, because I used Google maps, with the Satellite layer and a Web Mercator projection, the file was named GOOGLE_SAT_WM.tif.  YMMV.  Before selecting 'Import Georaster', check the options on the right side.  For this purpose, 'Basemap on mesh' should be selected with the object ('srtm') as the Object.  Change the viewport shading Material Preview to get an accurate preview.  

That is the quick and easy way to get started. 

Terrain in Blender - Option 2: Mirage
OpenFOAM Baby Steps - Calculating Lift and Drag (E...

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Guest
Monday, 25 May 2020

Captcha Image

Rick's Blog

Terrain in Blender - Option 1: BlenderGIS

Wasatch Range, Northern Utah Wasatch Range, Northern Utah

I have tried creating environments in Blender and other 3D programs.  Usually it involved a lot of time and effort and resulted in frustration.  Part of my problem was that I tried to create too much of the world that was never to be seen by the camera, leading me to my Lessons Learned #1.  I've recently experimented with two Blender add-ons that make the process easier; BlenderGIS and Mirage.  They each have their strengths, depending on what you want to do.

BlenderGIS is a free addon, available here.  Its strength is dealing with maps, shapefiles, terrain elevation data, etc. which are geographically referenced (georeferenced for short).  If you want to combine images from multiple sources and you don't want to try to align then manually, BlenderGIS is for you.  If you want to quickly use terrain elevation data and cover it with procedural grass, rocks, trees, etc., then Mirage may be better for you.  I am sure, at the graduate level, there are ways to combine the best of both worlds, but if you can do that already, this post is probably not the best use of your time.

BlenderGIS
Scene Georeferencing Panel

Installation instructions are available via the github link above; they are fairly standard for Blender.  When you start a new scene, you will need to select the overview map (also known as the 'basemap') cache location.  Future files will use this location or you can switch it at any time.  To start your project, I suggest setting the geographic center of your scene.  On the N-panel, under the 'View' tab, there should be a 'Geoscene' sub-panel.  I have had the best luck using 'Web Mercator' as the Coordinate Reference System (or CRS).  You can also use this panel to choose coordinates for the center of your scene, but I find the basemap method faster and simpler.

Basemap Dialog
Creating a Basemap

 In the 3D viewport, the menu bar should now include a 'GIS' option.  GIS > Web geodata > Basemap will bring up a dialog for the basemap.  If you didn't set the CRS above, or if you want to change it, you can also do that here.

Basemap As a Reference Image
Initial Basemap View

​Usually, the default selections are fine.  Selecting OK will bring up a map (as defined by the 'Source' and 'Layer' options) that you can zoom and drag.  Dragging your point of interest to the center of the Blender grid is important because any georeferenced information will be relative to these coordinates and blender may misbehave the further things get from the center.  (floating points, bits of precision, hand waving, blah blah.....you get the idea.)   Once you have the map centered and zoomed to your liking, press escape.  BlenderGIS will import your view of the basemap as a reference image.  However, one of the benefits of using BlenderGIS is that any other information you import will be aligned properly (with a few caveats I'll discuss).

Initial SRTM Plane

Now you have a map, but I generally want elevation data too.  There are two easy methods to get elevation data: 1) SRTM and 2) import DTED.  SRTM (Shuttle Radar Telemetry Mission) are elevation data from NASA.  BlenderGIS has two (as of this writing) online sources for the data.  Again, slide and zoom in the 3D viewport until the basemap shows you the area of interest, then GIS > Web geodata > SRTM.  A plan with subdivision surface and heightmap modifiers should appear within a few seconds, depending on the size of the area you requested.  The 6 subdivisions help create additional vertices for elevation data, but the initial plane will probably be slightly underwhelming.   I generally increase the heightmap Strength to about 5, reduce the subdivisions to level 1 or 2, and subdivide the plane about 10-20 times.  This gives a good initial view.

Georaster Import Options

If you want a color map overlayed on top your now-glorious elevation plane, the simplest method is to select GIS > Import > Georeferenced Raster and select the image blender is using for the basemap.  This file will probably be in the same folder as your blender file.  In my case, because I used Google maps, with the Satellite layer and a Web Mercator projection, the file was named GOOGLE_SAT_WM.tif.  YMMV.  Before selecting 'Import Georaster', check the options on the right side.  For this purpose, 'Basemap on mesh' should be selected with the object ('srtm') as the Object.  Change the viewport shading Material Preview to get an accurate preview.  

That is the quick and easy way to get started. 

Terrain in Blender - Option 2: Mirage
OpenFOAM Baby Steps - Calculating Lift and Drag (E...

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Guest
Monday, 25 May 2020

Captcha Image