OSM Importer SOP

The OSM Importer lets you import data from the Open Street Map data. This is an open database of most of the planet. 

The idea is to use real data to generate representations of existing cities, or to use as a starting point for new cities. A few tools to aid building generation will follow, but the first step is to get the raw footprint shapes constructed or imported. 

You can download this tool from our Github Repository



Houdini 16.5 Update

Updates to the OSM tool with some better attribute handling.

Extruding Building Shapes from OSM Data

Likely the first thing you'll try to do is extrude the building shapes, but there is a small gotcha on the way the data is being generated. This video will help you sort through that and show you a trick with using the generated data as a random seed. 

COMMENTS

  • Doudini 6 years, 8 months ago  | 

    This is some great stuff Luiz! We have been on the look for some good OSM importer for Houdini and ended up using blender to get the Data. This looks really good! Cant wait to test it.

    • lkruel 6 years, 8 months ago  | 

      Glad you like it! Please report back after you have tested. I would love some feedback

      • Doudini 6 years, 8 months ago  | 

        I tested it with some Data we had laying around from the last project and so far it just works great! I like how all attributes get imported which makes it very easy to separate all the geo. Also the import was very quick and fast for a 25mb data. I will throw some bigger files at it and see that we can use it in production soon. :) Great Work!

        • lkruel 6 years, 8 months ago  | 

          Awesome! Glad you noticed those 2 things in particular (speed and completeness of the data) that's something that was pretty deliberate.

          I've gotten up to just over a gig with my OSMs. It was a large map of Tokyo, I think it took maybe around 10 minutes to load and it was something like 20 million points. It's designed to stream in the XML data so it shouldn't blow out of memory. Let me know what is your rough use case size once you get to that point.

          Thanks!

  • yiannisr 6 years, 8 months ago  | 

    In apprentice there is not osm

  • Andr1 6 years, 8 months ago  | 

    omg... thanks! Going to try it soon

  • Andr1 6 years, 8 months ago  | 

    Hello Luiz,
    have you ever played with the Umap implementation?
    It works like google mymap (but it's better) and allows you to create custom shapes, lines, and markers over the map.

    It would be super useful to be able to import them in Houdini as well!
    Please have a look here: https://umap.openstreetmap.fr/en/

    cheers!

  • Rates 6 years, 8 months ago  | 

    Hi I cant seem to get this to work on Linux, the python node fails with:

    File"", line 203, in
    File"", line 129, in build
    AttributeError:'Geometry'object has no attribute 'createPoints'

    works fine on osx

    • Rates 6 years, 8 months ago  | 

      got it working, it was the python api
      moving from h 16.0.5.39 to 16.0.633 fixed it.

  • kevinthebright 6 years, 8 months ago  | 

    Might be missing it but it doesn't show up on GitHub now, under the linked page or sidefx main page. Something change?

  • JohnDraisey 6 years, 6 months ago  | 

    This is brilliant! I got it to work on a small city section, and it's giving me a good starting point for procedural generation of the buildings in that section.

  • JohnDraisey 6 years, 6 months ago  | 

    Quick question, how do you open a ".map" file? I took your advice and clicked on the "Overpass API" link for a large region of OpenStreetMap.

  • mapoga 6 years, 5 months ago  | 

    This is amazing! Great work. Its super fast just what i needed.

    After having played with it a little I was looking into the possibility to import and merge multiple maps from separate files. And found it difficult to do with how the node works right now.

    I fiddled around and played with the code a bit so that it wouldn't be re-centered but stayed at its Mercator projection position.
    That worked but i had a small offset for each map generated from the bounding box of the captured file having less precision than the nodes themselves.
    Removing the involvement of the bbox altogether fixed my issue.

    If this node ends up being part of the full version of Houdini I think it would be nice to have that option.

    Thank you Luiz!

    • lkruel 6 years, 5 months ago  | 

      Oh nice! Yeah I could see that being useful.

      Thanks for the tip

      Luiz

  • CHEESECAKE 6 years, 5 months ago  | 

    That plugin is pretty cool!
    In order to mold the streets I tried to join all the single Bezier Curves of one street into one NURBS curve, so I can arrange lines along it and use Sweep afterwards.
    But somehow it seems impossible to join the lines into a single NURBS curve. Any ideas how I could do it?

    Thanks you!

    • lkruel 6 years, 1 month ago  | 

      try using the PolyPath node, usually does a good job for me

  • tamte 6 years, 1 month ago  | 

    pretty useful, one note
    wouldn't osm_* be better attribute prefix choice than hou_*?

    • lkruel 6 years, 1 month ago  | 

      Yeah, you're right again. I'll update the tools to match this

  • Igor Batrakov 6 years, 1 month ago  | 

    Hey, Luiz!
    I've spent some time to figure out why "rand" function wasn't working. Cause hou_id is in string format! So you need firstly to conert it and code is looking like this:

    rand(atoi(s@hou_id))

    Just wanted to make you know.

    • lkruel 6 years, 1 month ago  | 

      Yeah, currently all of the attributes are string attributes. I thought it might be confusing to have some as int and some as string. But I supposed some of the most commonly used should be handled. I ran into some the same issues messing around with height, having to convert it to to a float so I can extrude based on it. Could be simpler

  • Danil Shaposhnikov 6 years, 1 month ago  | 

    Great tool! Very useful. I`ve combine that with https://terrain.party/ world height map. Now I have a model of my hometown with all the landscape around :)

    • mahialise 5 years, 11 months ago  | 

      How did you attach the two together so that the buildings are deformed to the underlying geometry?

  • RodTebisx 6 years, 1 month ago  | 

    very nice!! but, how to convert string height attributes to float to use on extrude??
    i tried use attribute wrangle, but not figured how to use atof() to call @height values... any ideas?
    thanks Luiz :)

    • lkruel 6 years, 1 month ago  | 

      Check out the OSM Buildings node, it does that conversion in there.

      • RodTebisx 6 years, 1 month ago  | 

        in the Python code? hmm...
        i'm searching for stuff like " prim.setAttriValue("heigth"... " or similar, but can't found.
        :(

        • RodTebisx 6 years, 1 month ago  | 

          now i got it! with atof() thanks!

  • mahialise 5 years, 11 months ago  | 

    Is there a way to attach the buildings to a heightfield object so it looks like they're 'built' into the landscape?

  • DCornibert 5 years, 10 months ago  | 

    Total newbie question however I am Having trouble getting the attributes to view using the blast node on the *.OSM file. The variables do not look like your example. have I done something wrong?

  • Jan Adamus 5 years, 7 months ago  | 

    Thank you very much for this really helpfull tool!

    I would like to use it in field of real world architecture. Sorry for my noob question, how can I make polyextrude that every building will have its own "height" parametr from OSM(not random)? Thank you very much.
    Jan

  • josianturpin 5 years, 5 months ago  | 

    Hi,
    i'm using houdini apprentice and working in GIS. So, after manually install gamedev tools, i've this error :"canno't fond the tools script'

    • szinubuntu 3 years, 11 months ago  | 

      Hi did you found the solution/cause? I am having the same issue, Blast node doesn't do anything.

  • 3W 5 years, 5 months ago  | 

    e..Hi~
    I'm using Houdini 17.0+
    There is no attribute of "Hou_ID".
    Do I missing something.

    • 3W 5 years, 5 months ago  | 

      just "latitude","longitude"and points

  • Alec Bartsch 5 years, 2 months ago  | 

    Hi Luiz,

    I'm trying to work through this Entagma tutorial:

    http://www.entagma.com/houdini-game-tools-assembling-a-3d-scan-of-the-earth/

    but I'm stuck because I'm not getting latitude and longitude coming in as point attributes, as seen in the tutorial. I'm using Houdini 16.5.663 and GameDev toolset 1.98. What am I missing?

    Thanks,

    Alec

  • NodemadNomad 5 years, 1 month ago  | 

    Hi,
    Thank you Luiz for the OSM nodes.
    There is a problem of normals after using SOP osm importer with SOP osm buildings, here is a screenprint that shows the normal problem in Houdini:
    http://prnt.sc/mwzxke
    And here is one that shows it in an external renderer:
    http://prnt.sc/mwzxm3

    It would be great if you could have a look at the normals in the SOP osm buildings, I can send you the hip file. Thank you

    • lkruel 5 years, 1 month ago  | 

      Can you send this as a bug to support@sidefx.com?

      • NodemadNomad 5 years, 1 month ago  | 

        I've done it. Thanks.
        but there is now something else with Houdini 17.5, there is new problem: the sop OSM filter doesn't clean the white lines, it was great in Houdini 17.
        http://prnt.sc/mxyox6

        These OSM nodes are amazing, it would be great if they get fixed. Thank you

  • Mohit Pundir 4 years ago  | 

    just watched the first video of importing osm data and filtering through it.. my question is can be create a digital asset of the importer and use it though Houdini Engine for Unity?

  • petr.chel 2 years, 5 months ago  | 

    how so city put on terrain? (each building on ground)

Please log in to leave a comment.