Advertisement

Wednesday, February 8, 2017

Free Elk Plugin – Import Topography Into Dynamo (or Grasshopper)

From the HKS LINE website:

By Timothy Logan

About four years ago during my first stint here at HKS, I wrote a plugin for Grasshopper named Elk.  The original intention was to find a way to get a map into Rhino, not necessarily for use with architectural projects, but just to see how it could be manipulated and make something out of it.  The first project I made was a laser etched acrylic map with some paint added to the etching to make it pop a little more and differentiate it.  It was subtle, but turned out alright for what I was trying to do.

After this, some of my colleagues prodded me to release it as a plugin on the Food4Rhino website. The first release only dealt with data from OpenStreetMap.org (OSM), a open source and website with crowd sourced mapping data.  It was able to use exports from OSM and translate the latitude and longitude coordinates for the boundaries and paths of most major roads, bodies of water, and railways so that you could create points and lines in Grasshopper to represent them.  I generally used the plugin to make stylized maps using the data for cool desktop backgrounds, but there seemed to be more interest from people wanting to use it for “real” work.

To that effect, I started working adding the ability to generate topographies from Elk as well using Shuttle Radar Topography Mission (SRTM) data.  This was data resulting from a shuttle mission in 2000 that scanned the elevation of most of the earth and presented it in a 1°x1° tile.  Once the topography component was added Elk was more or less stable.  I made several updates and rewrote it once, but the changes never made much deviation from the initial plugin that I wrote. A couple of years ago I even made a Revit plugin that generated a topography from SRTM data, but I didn’t have an active website at the time so Autodesk wound up pulling the app from the store earlier this year.

Over the last few years, it started becoming pretty obvious that major changes needed to be made again and on top of that I felt that I should probably also write a version of it for Dynamo and be more prepared to port it to other software in general.  It’s hard to get excited about redoing something again several years later so it took a little effort and time to psyche myself up to rewriting it again, but I finally set about rewriting Elk while keeping in mind that I wanted to use it with multiple software.

I’m happy to say that most of the work is finally done.  Last week I released a new version of Elk for Grasshopper which contains several improvements (and I’m sure a few bugs) over the last version that I released two years ago.  It gives access to most though not necessarily all of the OSM data and also opens up the ability to use GeoTIFF and IMG files to generate topographies rather than just the SRTM HGT files.  This gives not only better resolution data, particularly with 1/3 arc second IMG files, but also alleviates problems with voids that appeared in the HGT files.  Just a note, the image I’m mapping to the surfaces show below are from Mapbox Studio, which seems to be in beta at the moment.  It allows you to export an image from a specified longitude/latitude bounding box, making it line up pretty well with Elk’s generated topographies, and the quality of their images are great.


This week I’m happy to announce that I’m ready to release the Dynamo version of this plugin too.  The Dynamo version of Elk is not quite as elegant as the Grasshopper version, at least not yet.  I’m still pretty new to creating plugins for Dynamo and my early attempts at a fully custom node were fairly unsuccessful.  I wound up using their Zero Touch plugin implementation, and while the user experience is somewhat lacking, the functionality is almost all there.  The one bit of functionality that it’s lacking is the automatic 3d building generation that the Grasshopper version has, however all of the information is available to generate those extruded buildings yourself.


In addition to the Elk for Dynamo and updated Elk for Grasshopper, I’ve also taken the time to make an updated plugin for generating topo’s directly in Revit using the same processes.  This is a plugin I originally wrote for Autodesk’s Portathon back in 2013.  It gave me an excuse to do something that I had tinkered around with, using Elk’s functions to generate a topo in Revit, but in the end my apps were pulled from the App store because I didn’t have a personal website to link to.  When this happened I was already planning the updated Elk for Grasshopper and making it work with Dynamo, so I just let the apps die with the intention of releasing them as a Dynamo package.

Elk_Example_Revit

Elk for Grasshopper is available from Food4Rhino, and for Dynamo via it’s Package Manager (search for Elk).  The Revit plugin doesn’t have a home at the moment, primarily because I’m not sure about the demand given the Dynamo version will let you do more, but if there’s interest leave us a comment and we can see about uploading.

If you are interested in seeing how it works, you can view a relevant video from Elk2 group on my Vimeo account.



There's more information available on the HKS LINE website

No comments: