Blender for GIS / Mapping Help - Blender GIS add on not working

Hello Everyone,

My background is in mapping and I have recently started learning Blender for assisting with the presentation of maps. I have used the Open Street Map add on to import OSM files and make 3D city scenes from them. I have also been using Blender to import LiDAR data and make 3D contour maps of mountains and topography using the Displace Modifier.

I have some .shape files that I would like to import into Blender and make city scenes with in the same way as the Open Street Map add on. There is an add on called Blender GIS here: https://github.com/domlysz/BlenderGIS which should allow me to import .shape files. I have followed the add on instructions, saved the files into my Blender install directory correctly but when I go to user preferences the addon doesnā€™t show up. What am I doing wrong? All the online sources suggest that this add on works correctly and should allow me to do what I want. I donā€™t understand why it doesnā€™t work.

I COULD convert my shape files to osm files, but this is actually quite difficult and it would be much easier if I could import shape files into Blender. Can anyone help?

Thank you

Addon Import Shapefile from the link you posted works here: random shapefile import.

I would suggest downloading master zip from the github page, unpacking in some folder and making zip file of folder ā€œio_shapefileā€. This new zip file when installed from User Preferences, Addons using button Install from File works here and shows addon in a list after. You have to put a checkmark for it to be available in menu later.

Thank you for your reply and for confirming that the add on works for you. Helpful to know.

There are 8 or 9 script files in the download in three sub folders. I have unzipped them and saved the files to a new folder as you suggest.

I have tried saving the files to my blender install folder / scripts / add ons. I have also tried creating new folders in the download folder called "io_name of file with the files inside. I have also tried installing them manually using the User Preferences / Install from File. I have tried this with ALL nine files in the download.

In each case Blender seems to accept the add on but when I go to user preferences to checkmark the new add on to enable it then it is not there. I have tried searching user preferences for ā€œshapeā€ ā€œshpā€ and ā€œESRIā€. I am confused and frustrated as to why it doesnā€™t appear to work for me.

Would you be able to confirm for me how you installed the add on? Did you use User Preferences / Install From File? If so can you confirm if you needed to do it for all the files in the downloads or just one? If it was just one can you confirm which one it was?

Many thanks! :slight_smile:

Hi rkemp78,

Iā€™ve updated the wiki a little, hope itā€™s help.

@domlysz Thank you for sharing a code and updating install instructions. While iā€™m not involved in any architectural or georeferencing activities directly addons might come handy at moments. Especially, Delaunay triangulation is a great tool to have.

@rkemp78 To be able to import shapefiles you would need just one folder ā€œio_shapefileā€ you copy to where your other addons for the blender installation are ā€¦/2.7x/addons/io_shapefile Inside this folder should be files init.py, op_export_shp.py, op_import_shp.py and shapefile.py

Indeed, i did use ā€œInstall from Fileā€ option however as i wrote before i compressed just one folder io_shapefile from downloaded and then unpacked Master zip. This is somehow a common operation for the github something-Master.zip downloads to do.

If you had done Install from File on whole Master.zip what happens is blender does install this and you have all separate functions&addons under the ā€¦/addons/BlenderGIS-master folder but blender does not recognize addons there. You can manually toss out included there folders and files to ā€¦/addons and delete empty now BlenderGIS-master folder.
After blender restart (or pressing F8 in 3dview) you will be able to find shapefile import (and others) in your addons list.

Iā€™m not new to this topic, but its very confusing given I"ve not donā€™t a ton of it. I need the data now given Iā€™m doing Game Development.

Iā€™ve targeted a few geo locations of interest and downloaded a raster file but sadly I rarely get anything useful that doesnā€™t mandate a lot of manual work to get into a game engine.

Current file is a tif, so Iā€™m wondering given that file takes a lot of work to get a heightmap out of, are these options included in this addon better ?

If so, which is going to give us the best output Iā€™m wondering, is it point cloud which looks awesome, or dem to plane, uvmapped to mesh or what ? :wink: Iā€™ve rarely had great luck with exact measurements with displacement as I doubt its designed for that.

I found a way to use the tif in blender by yes, displacing it and then ( no other way seemed doable at that time) then moving verts with prop. editing on and then making heightmap with the ramp.

Fine but hardly ideal.

For now Iā€™ll try point cloud as it seems very nice for realtime terrain, pls let me know if there is a better option. The most ideal method is one that would allow me to go directly from import , to exporting ( with the least amt of work ! :wink: ) something that I can take into another app ( gimp I guess) and create a raw 16 file ready for my game engine.

Thx anyone
jb

As to the tiffs - idk, they come in different formats, but initially subject was shape file importā€¦

Heightmaps from tiffs - if tiff is 16 or more bit greyscale in a range 0 to 1 representing heights - what else would you need to displace dense enough mesh?
If you had some pointcloud which would be a bunch of floats representing z coords on xy grid - that wont be a greyscale tiff for sure. Youā€™d need to ā€˜skinā€™ such pointcloud making sure there are faces you can render and then likely youā€™d use normalized Z-pass to render heightmaps straight out of the blender.
Skinning itself is quite a subject, so unless you share more dataā€¦And i seriously doubt game engines use heightmaps to deal with terrains.
I might be wrong ofc, but still - http://www.decarpentier.nl/scape-render

Game engines , at least most ( no idea about bge )use ONLY heightmaps , at least thatā€™s what Unrealengine 4 uses. Well I should say, a heightmap ( PNG 16 bit) in addition to ā€˜rawā€™ files, but I have no idea what kinda of data that is honestly. Unity mainly just raw ( at least direct import via its terrain UI in the editor)

I donā€™t recall getting a wrl file when I downloaded my file from open topography, so Iā€™m going to do this again to verify, I may have downloaded the wrong file.

thx

One other thing, is there only one place to get raster data that comes with a .wrl file ?

Open Topography, only gives you a geoTIF file, there is no wrl file with it , where do we get such files from then ?

From the website page for ā€˜rasterā€™ :

" For the datasets listed below, pre-computed raster data are available from OpenTopography. These data include digital elevation model (DEM) layers computed from aerial lidar surveys and raster data from the Satellite Radar Topography Mission (SRTM) global dataset. DEMs from aerial lidar surveys are available as bare earth (ground), highest hit (first or all return), or intensity (strength of laser pulse) tiles. Some datasets also have orthophtotographs available. All raster data can be output in common GIS formats and are compressed to reduce their size. "

http://opentopo.sdsc.edu/lidar?format=sd

Btw: " It also optionally rely on GDAL for advanced features. " < what features, anything to do with raster images from this website ?

thx

Please read the wiki carefully, I know my english is not very good but Iā€™ve spent lot of time to write it and explain how the addon works.

Features provided using gdal option are described here

  • Import any GIS specific raster data format that Blender canā€™t natively read
  • Process large raster data source by cliping the DEM according to the working extent
  • Process any raster bit depth
  • A worldfile isnā€™t necessary needed

Geotiff format can store georeferencing informations directly in the file, but jpg or png needs an external file named worldfile to store them. I quickly describe this file format here. You can get a worldfile from a geotif with QGIS as Iā€™ve described here. There are also lot of GIS specific raster formats that can be processing anly throught GDAL.

Please read also this part of the wiki where I explain how the DEM import work, with or without gdal the main workflow is the same:

Before import a DEM you need a mesh to apply the displacer on. Standard workflow is to import beforehand a texture map like topographic map or aerial photo on a plane. This plane will define the working area and will be used as reference for the DEM import.

Donā€™t except Blender to be able to deal with with very large dataset (lot of km2 in high resolution like 1 meters by pixel). Youā€™ll need to clip beforehand your dadaset and maybee decrease the bit depth. If so, you can do it with QGIS as described here.

Got it working now. Thanks to all for their help! :slight_smile:

Hi rkemp78, I am having the same issues that you experienced in attempting to instal Blender GIS. I am a novice to Blender and any assistance with installing the Blender GIS would be appreciated.

Hi

How to install hereā€¦ https://github.com/domlysz/BlenderGIS/wiki/Install-and-usage

Just use install from file as shownā€¦Donā€™t unpack itā€¦Point to the zipā€¦Click install.

Activate and save.

Tai

Hi Tai, Thank you for assisting me and for the simple instructions for installing the add on. I was confused by all the other posts. You just made it simpler, thanks.

Hi

Thank Youā€¦And welcome to a Great forumā€¦From a Noob <<<<<<ā€¦:slight_smile:

It a good habit to keep thing so simple as possibleā€¦Also in 3 dā€¦Make life so much easier.

Donā€™t let Your Brain fool Youā€¦Puff Puff

Tai

Hi domlysz

well your add on is really great!

but i have some problems with the raster image. im work with arcgis from 10 years and know how work this world, but im not really pro with gdal and opensource geodataā€¦ the thing is im working now on mac with blender and 3d stuffs and i can install the add on, the problem is after make the tin with from a contour lines (mesh) i cant add the raster tiff file. this comes from a export from arcgis. the original file was a mrsid file. so if the shp is in the same coordinate system than the raster file, why have problems for add the raster layer? maybe thereā€™s something in the set up but i made all the steps from your instructionsā€¦



Attachments


the results::



Thanks for your domlysz work, Iā€™m working with blenderGis.
And the work Iā€™m saving is incredible.
A greeting and my thanks.

Sorry to necro this thread but i was trying to use blender gis and so far i cannot found clear explanation on how to use it and even the help from the wiki is not very clear.

What i am trying to do is to import a geotif and load it as a displacement or if possible browsing data from map and directly import elevation data?

Any help will be greatly appreciated.

Its bugged on my mac atm but this video shows you how to do it.

Hope it helps.

1 Like