Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Map-ity Open Street Map data for Unity - Official

Discussion in 'Assets and Asset Store' started by RewindGameStudio, Oct 21, 2013.

  1. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    Since terrain often is not even, maybe there can be a relatively shallow "foundation" block placed under each building ...?
     
  2. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Yes, that would work for some users depending on what they needed.
     
  3. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    @RewindGameStudio Hello! Could you explain the purpose of your asset? I have watched YouTube videos and read the forum, but it is still not clear to me.
    I am using World Composer. Is your asset helpful to me? If yes, in which way, please?
    Thank you!
     
  4. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Hi, our asset pulls map data into Unity for you to use.

    So for example if you wanted to draw a road in its real world location then Map-ity gives you the Unity coordinates.

    It can also provide you with the outlines of buildings.

    Or tell you where rivers are.

    It can tell you place names, street names, speed limits.

    Pretty much any data you'd expect from any other map service like Google, difference being this data come from an open source site.
     
    OfficialHermie likes this.
  5. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    @RewindGameStudio Thank you! I am also using EasyRoads. I have asked the author if he would support Map-Ity, and he said that it was rather a question if Map-Ity supports EasyRoads.
    Can you please tell me something about this?
    Thank you!
     
  6. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Version 3 of Easy Roads will support an API for road generation. We'll put together a sample when it releases.
     
  7. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    I have investigated a bit, and I think my problem would be that all houses on my map (which are not either restaurants or shops or similar) will be not recognized by map-ity because they are not listed in Google Maps or other companies's software. I was thinking about if it would not be possible to use OpenCV to detect houses. I think this is what most users would really need.
     
    Last edited: Oct 1, 2015
  8. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Unfortunately we can't control the quality of the data, but since it's an open source project you can contribute yourself and improve the data for your home area.

    If you want to send an email to support we can check the quality of the data for your area.

    Thanks.
     
  9. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    @RewindGameStudio Unfortunately for my country, Map Maker does not allow painting / adding living houses. That is why I was thinking about OpenCV to automatically detect them. I know that it would involve much work on your side, so it will probally never happen.

    Here is an image from Google Maps. You can see that Google marked the roads correctly (I have painted red lines on them), but the houses are ignored / not listed, so Map-Ity can not detect them. Am I right?

     
    Last edited: Oct 2, 2015
  10. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    @hermie Map-ity doesn't use Google Maps, nor does it use Map Maker. So I don't know what you are using to determine what data Map-ity will pull. Go to http://www.openstreetmap.org and enter your address. That will show you what data is available for your area? What is your lat/lon?
     
    Last edited: Oct 3, 2015
  11. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    @Tinjaw OpenStreetMap pulls even less buildings than GoogleMaps.
    Why are you asking?
     
  12. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    Because that is what Map-ity uses for data. Not Google.
     
  13. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    @Tinjaw Thank you! I was confused because when I used OpenStreetMap, it used Google Maps at some point of time. Something like openstreetmap.org/maps/GoogleMaps or so.
     
  14. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
  15. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Thank you, that is a great help. Do you know what the blue circles mean? In which way does Map-Ity handle them?
     
  16. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    @hermie : If you click on them, they will display data on the left hand side. These look like the may be building numbers or some other kind of identifier.
     
    RewindGameStudio likes this.
  17. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    They are nodes and you can access the data through Map-ity e.g.
    upload_2015-10-8_23-55-45.png
     
  18. MAeStROx

    MAeStROx

    Joined:
    Mar 20, 2015
    Posts:
    15
    Hello,
    I just now bought the package, and would like to know if it's possible to use the package to make an animation run
    between two junctions if I have their lat/lon positions.
    Like have a car drive along a road, or atleast get the unity-space position according to lat/lon and say have the object it's referring to like the junction.
    Where will I find it in code? Is there such function in place? something like: getMapityObject(lat,lon) or maybe getMapityRoadJunction(lat,long)

    Thanks
     
  19. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Hi,

    You should be able to use the function GeographicToWorldCoordinate.

    It takes a geographic position and returns a world position.

    public Position GeographicToWorldCoordinate( Position geographic )

    Let us know if this worked for you.

    Regards.
     
  20. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Hi Everyone,

    Just advance notice that support may be slower of the holiday period.

    Regards.
     
    MAeStROx likes this.
  21. MoonbladeStudios

    MoonbladeStudios

    Joined:
    Oct 14, 2013
    Posts:
    185
  22. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Right now we're optimizing Map-ity for XML parsing speed and memory usage. We're not sure what we'll be doing next.
     
    MoonbladeStudios likes this.
  23. daeuk

    daeuk

    Joined:
    Mar 3, 2013
    Posts:
    67
    is easyroads3d can now be used with mapity?
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hi daeuk,

    Just in case it is not supported, if Map-ity gives you access to the OSM data, something like a Vector3[] for each road object, you can use the EasyRoads3D v3 API to auto generate the roads.

    Please ask in the threads in my signature if you have questions about this.

    Thanks,
    Raoul
     
  25. daeuk

    daeuk

    Joined:
    Mar 3, 2013
    Posts:
    67
  26. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    We'll be starting to work on a sample soon ;)
     
    hopeful likes this.
  27. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    Hi is it possible to provide custom height data. Or simply have Map-ity build on top of terrain that is already in the game?
     
  28. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Yes. Just use the snap to terrain option.
     
  29. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Announcement!
    Work on version 2 of Map-ity is nearing completion. As such we'd like to notify our users that we will be dropping support for Unity 4.x.

    The reason for this is that it slows down development, having to support multiple versions is very time consuming. We don't do anything special that is Unity 5 only so the code will likely continue to work, but as a publisher we have to submit from multiple versions of Unity for every package.

    Also our sample partners have mostly switched over too so it will be easier all round.

    New Features:
    Map-ity 2.0 uses a custom data parser to translate the data with minimal memory overheads.
    It also now does this on a separate thread so it no longer blocks the main thread while parsing.
    Actions are used to handle data as it is parsed which are publicly available to hook into if you need it.

    Any questions / feedback don't hesitate to comment.
     
    Tinjaw and hopeful like this.
  30. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Any volunteers for a beta test? Message us with your invoice number.
     
  31. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    For anyone looking to define custom zoom levels.

    Just add what you need to the enum :
    public enum MapZoom
    {
    ZoomLevel_0 = 1, // Approx 217m x 217m
    ZoomLevel_1,
    ZoomLevel_2,
    ZoomLevel_3,
    ZoomLevel_4,
    ZoomLevel_5,
    ZoomLevel_6,
    ZoomLevel_7,
    ZoomLevel_8,
    ZoomLevel_9,
    ZoomLevel_10,
    ZoomLevel_11 = 100,
    ZoomLevel_12 = 500
    }
     
    hopeful likes this.
  32. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    We've submitted Version 2.0 for review, and it will hopefully be live soon.

    Look forward to your feedback.
     
  33. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Map-ity 2.0 update is live. Enjoy :) Let us know if you have any issues / questions!
     
    hopeful likes this.
  34. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    How can I use BuildR and Map-ity together?
     
  35. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    If you own both Map-ity & Buildr, load both packages into your project.

    Open the BuildR sample package provided with Map-ity.

    Run either example scene for a quick demo of how they can be used together.
     
  36. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    Just trying out the new release - and liking it - but there are a couple of bugs in the BuildR demo. Not sure if it is on Mapity's end or BuildR's end.

    First, while the buildings do appear in most building slots, there are still a few empty slots on the map that could have buildings. Not sure why those spots are rejected, but the same spots are consistently rejected in repeated attempts.

    Also, when the buildings form, they appear to be using wall / window textures on the rooftops, or occasionally there is no top at all. When I run BuildR by itself, it makes the rooftops correctly, so I'm guessing something - and probably something relatively simple - is off in the Mapity demo.

    UPDATE: Okay, so what it looks like is the wall material (first material) is the only one that is in correct order. The doors have a window texture, the windows have a door texture, and one window has the roof texture.
     
    Last edited: Mar 22, 2016
    RewindGameStudio likes this.
  37. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Thanks for the feedback!
    Have you got an example location which produces empty slots?

    We'll look at addressing the texture ordering as well.
     
  38. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    We've fixed the texture issues with the samples, will submit a new version soon.
     
    hopeful likes this.
  39. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    I don't know if you still need this, but here are the spots in the demo where no building ever appears:

    mapity-spots.png

    Maybe these are just spots that look like they should have buildings, but for some reason actually shouldn't ...?
     
    RewindGameStudio likes this.
  40. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Thanks! Have you turned on building rendering in the debug drawing section. Buildings will be a purple / pink color. It looks like they might not be buildings.
     
  41. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    Ahh! You are right. They aren't building spots after all. I did not know about checking the box under Gizmo Drawing for Building Plans, and what that meant. Now I do. :)
     
    RewindGameStudio likes this.
  42. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    same wait for road :)
     
  43. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
  44. nakiks

    nakiks

    Joined:
    Dec 4, 2011
    Posts:
    24
    I cannot make it work with BuildR can you provide any more info on that? The demo scene is not working.
     
  45. TheVoidPT

    TheVoidPT

    Joined:
    May 27, 2016
    Posts:
    4
    In the manual you mention that the "Road Architect" is compatible with Map-ity.
    I can't find this asset. Is the name correct? Are there any alternatives?

    Thanks
     
  46. TheVoidPT

    TheVoidPT

    Joined:
    May 27, 2016
    Posts:
    4
    For runtime building creation:

    Get all MapBuilding in Mapity.Singleton.mapBuildings.Values
    Each MapBuilding has several buildingWays.
    Each buildingWay has several wayMapNodes.

    With that in mind:

    Code (csharp):
    1.  
    2.                     BuildrPlan plan = ScriptableObject.CreateInstance<BuildrPlan>();
    3.                     List<Vector2z> bounds = new List<Vector2z>();
    4.  
    5.                     // Loop over the nodes
    6.                     for (int j = 0; j < buildingWay.wayMapNodes.Count; j++)
    7.                     {
    8.                         // Get the node
    9.                         Mapity.MapNode node = (Mapity.MapNode)buildingWay.wayMapNodes[j];
    10.  
    11.                         bounds.Add(new Vector2z(node.position.world.Longitude, node.position.world.Latitude));
    12.                     }
    13.  
    14.                     plan.AddVolume(bounds.ToArray());
    15.  
    16.                     //BuildrData
    17.                     newBuilding.plan = plan;
    18.  
    Just make sure the BuildrData.plan is not getting overwritten somewhere
     
    RewindGameStudio likes this.
  47. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    Road Architect has been deprecated and removed from the Asset Store. Future versions of Map-ity will be integrated with EasyRoads v3. It is not there yet, but promised.
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    And until this is supported directly by Map-ity you can probably already use the EasyRoads3D v3 API to generate roads, something like:

    Code (csharp):
    1.  
    2. ERRoadNetwork roadNetwork = new ERRoadNetwork();
    3. ERRoadType roadType = roadNetwork.GetRoadTypeByName(string name);
    4. ERRoad road = roadNetwork.CreateRoad("Road Name", roadType, markers);
    5.  
    Where markers is an array of Vector3 representing the Map-ity osm coordinates.

    Thanks,
    Raoul
     
    MrIconic and RewindGameStudio like this.
  49. TheVoidPT

    TheVoidPT

    Joined:
    May 27, 2016
    Posts:
    4
    Thanks for the info :)
     
  50. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Sorry for the delay, what's stated above is correct we'd now recommend Easy Roads.

    Will make a note to update the docs. Thanks!