Search Unity

Map-ity Open Street Map data for Unity - Official

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

  1. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Introducing Map-ity!

    Map-ity allows you to model your environment on any real world locations by providing access to open street map data.

    https://www.assetstore.unity3d.com/#/content/11779

    Use it to get a lists of roads, waterways and buildings to use in your scene! You can even break down the data into different classifications such as:
    - Motorway (primrary or secondary road)
    - Canal or river


    Compatible with BuildR - Building Generator

    Features:
    - Download the map data for your current location on mobile devices, or use a previously saved file.
    - Get lists of: Roads, waterways, buildings, relations ( e.g. Bus Routes )
    - Render a Gizmo showing the map in editor.

    - Get the elevation for any map point.

    User Manual:
    http://rewindgamestudio.com/documentation/mapity_v108/Map-ity.pdf

    BuildR Compatible:

    Elevation Data:
    $Shot4.jpg $Shot1.jpg $Shot2.jpg
    Developed and Supported by:
    http://www.rewindgamestudio.com/

    Please ask any questions you may have or request features, we're eager to know what you think.

    Rewind Game Studio
     

    Attached Files:

    Last edited: Nov 3, 2014
    Gozdek likes this.
  2. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    hi i am interested, but where does the map data come from?

    would be nice to have video / tutoral from start to end showing how to do it. the 1m video is not enough and does not show how you set it up...

    is it like you put some longitude/latitude or zipcode and it gets the data from free web repository where this data resides and generates the gizmo

    is the data for free? do you explain how to get it. i mean in screen shot i see map and x,y. and open street map api url, but that is sort of truncated so its not clear exactly how it works.

    i guess what exactly does this mean. "Download the map data for your current location on mobile devices, or use a previously saved file."

    also, what about topographical data. could you please add that and sort of generate a model/terrain and put gizmo overlay on it. that would be most amazing.

    thanks in advance!
     
  3. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    I am also interested but the map data may contain errors and may display incorrectly in Unity 3D. How will you take care of this?
     
  4. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    wow author just released asset and is already awol :(
     
  5. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    No idea where the author is... but I can answer some of the questions. It's data from OpenStreeMaps which is a free map data service. Essentially, OSM provides some basic services and copies of the databases that you can self-host and keep updated if you want to build your own services around them. We're talking huge database though.

    So with that being said, there are some third parties (like MapQuest for example) that provide Open Street Maps APIs. I mentioned MapQuest because I've used their OSM API for web projects. There are tons of things you can do but we used it for Geocoding by zip code which gave us the Lat/Long coordinates. OSM differs from using services like Google Maps because OSM is a completely open provider and they allow you to save the data for future use.

    With that out of the way.. it appears that this asset is aimed at mobile and uses location services to get your current Lat/Long and then gets the nearby location data from an open street maps provider. I haven't used the asset, and know nothing about it... but at least I could fill you in on OSM. :)

    Fuurther Reading

    Open Street Map Website

    MapQuest Open Data API
     
  6. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    ok cool

    still sounds interesting

    sounds like the free Google Maps for Unity asset
    https://www.assetstore.unity3d.com/#/content/3573

    my biggest concerns jumps to the author not being present to support his own asset that he has just released.

    still interested but i would need to see it has real value like it could scale the images beyond what can be done with an image which is what the google maps for unity asset does.

    so it would be nice if i could blow up a map of lets say new york to be the size of what a large map someone would be working on in unity. even a section a city or an area.
     
  7. RewindGameStudio

    RewindGameStudio

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

    Sorry if you were expecting a quicker response.

    Thanks to Dustin who explained quite well that Map-ity uses Open Street Map Data.

    So to answer your questions:

    I'd be more than happy to create a video tutorial on how to use Map-ity. I should have time tonight ( Family permitting ).

    Currently you provide a position ( Longitude Latitude ) in the inspector. The X Y element you see in the screen shot ( I will hopefully write a custom editor inspector to display more meaningful names ) or you can use location services on a mobile device.

    Map-ity then does a web request for the data from a third party OpenStreetMap Data host, which is free. We don't query OpenStreetMap directly because it should only be used for editing the data.

    Map-ity then parses the data and generates some useful data structures for you to use the data. E.g. Lists of all the roads, waterways or buildings.

    It also renders the data in a gizmo to help you see what it should look like.

    We also support saving the downloaded file, so during development you can use a local copy, so you don't need to always download the data. We then parse the local file and create the useful data structures from that instead.

    We are currently implementing topographical data, which we have working as demonstrated by the video. There are some points to note. OpenStreetMap doesn't have consistent topographical data so we have to use another web service for that. This is free but does require an account. It provides one for demo use though. The second issue is topographical requests are limited to 20 at a time for free users which means it is a bit slower to gather the data as we need to do multiple requests, unlike the OpenStreetMap data which is just one. The video above shows this, as it is requesting topographical data for 20 points at a time, then doing a web request.

    I hope this answers your questions. :)
     
  8. RewindGameStudio

    RewindGameStudio

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

    Unfortunately as it's open source data we can't really control errors. You could correct the data in OpenStreetMap yourself. If there are any particular errors we could pick up we'd loved to handle those situations. Can you give any examples?

    In terms of topographical data errors we will probably just enter a height of zero. Perhaps we could look at the previous points and just use that value instead.

    Generally we're hoping to get feedback on specific issues and fix those for people as they appear.

    Thanks for your interest.
     
  9. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194

    Hi im,

    I checked out the free Google Maps Unity asset before I started developing Map-ity and essentially it just downloads an image. It contains no real map information at all.

    Regarding your concern to me not being present. I assure you I am here and will continue to be here to support my asset and anybody who purchases my asset. I'm developing this in my free time between work and family. I personally think a response within 24hrs ain't bad. Map-ity also release over a week ago now, it was the recent Unity Blog post about promoting assets which lead me to create this thread. Which seems to be working :)

    Map-ity can render New York, but New York contains a huge amount of map data!

    Are there any examples I could perhaps produce for you to help you see it's potential?
     
  10. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    hello,

    re: topographical service

    could i setup my own free account with them?

    if so that is not a problem. then i would get my own 20 request at a time...

    so when will topographical support be released?

    could you name the service that you are using for topographical data. is it standard format. i have account with govt topographical data sources in various forums.

    so if the asset came with complete source code it may not be difficult to plug it in to another source...

    plus i could also download raw topographical data from public sources.

    re: new york

    i just threw that out as an example since its as large and complex a city as i could think of...


    thanks in advance!
     
  11. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    The topographical service is www.geonames.org and yes you can set up a free account with them.

    I'm currently hoping to have it done by the end of the week and I find updates take almost a week to go through Unity QA, provided there are no issues.
    So at the earliest I would say 1 1/2 weeks but best to take that as 2 weeks :(

    Documentation for GeoNames is here http://www.geonames.org/export/web-services.html.

    Full source is provided of course ;) With documentation hosted on our website.
     
  12. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    ok thanks ill keep an eye out for it... i guess in the meantime you will be working on some tutorial or something so customers can more easily get started...
     
  13. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I've been looking at a change for grabbing openstreetmap data for absolutely ages, so this is great, how quickly does it grab the data and could it, were you to traverse one particular road for instance continually update fast enough to not run out of road, given a broadband connection

    Just this whole thing is a videogame waiting to happen in itself i like this and will be following it, in fact it has just solved a problem for me, if it can supply the information fast enough - get thee asset store hence!
     
  14. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Hi lazygunn, the download speed depends of the users connection speed so I can't comment on that. I added some timers to Map-ity and the London data above ( which is 10mb ) took 3.525158 seconds to parse and process into Map-ity data structures.

    Smaller amounts of data are very quick.

    At the moment I don't have a streaming system in place for Map-ity, it just takes an area and downloads that. If it's a requested feature then I guess I'll be adding it ;)
     
  15. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    i would think download is better than repeatedly steaming the stuff cause they will eventually get upset with all the players hitting them

    and some of it could be quite large and the services may not be all that reliable at which points players cant play...

    also i would think you would need to take the raw data and remove stuff you dont need so it could be reduced in size.

    anyways i dont know details. personally downloading is not a problem. well so long as i can like in inspector put longitude/latitude and it goes out and gets it for me. perhaps even have login stuff i could put in. i only plan to use it in editor to help me shape map and where to put things

    but most likely i wont be putting alt he stuff, just scaled down version else like in real city, even a small one very quickly it will overwhelm the game engine i would think.
     
  16. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Well openstreetmap's data is all categorised anyways, would you not be able to query one known category and receive that information quite quickly?

    Given the amount of traffic openstreetmap gets i cant see streaming a problem but might be worth talking to them about it

    I'd be using the data in a standalone to create extruded and patterned shapes to create a constantly streaming cyberspace that one can put objectives within. Dont go stealing my idea
     
  17. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    there is aleady some asset that does that... check out asset store... they have that for textures too, there is like post in forums for that. and google / others have done for google map data... still have fun...
     
  18. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    At the moment we do something like this:
    So you can easily add any extra tags you'd want, or request them and we may add support for them with data structures etc.
     
  19. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    oh that is nice

    but as you posted you giving out the complete source code

    so anyone could add their favorite tags

    still its nice to hear that you will work to get it to show up correctly.

    i have software to generate roads, rivers, buildings etc

    what i would like is like terrain / model of terrain from topographical data and like above overlay so i know where to put / generate the stuff.

    that way it would sort of be recognizable to players and like easier to me instead of looking at some image / photo and try to go back and forth between perspectives to make it look good alone

    anways im waiting for the upcoming release you posted about

    would you consider fully making available the said release of asset early with asset store invoice via lets say email?
     
    Last edited: Oct 24, 2013
  20. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Yes, if you'd like to purchase now we'd be happy to provide Beta Builds.
     
  21. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    cool, i have a question about the elevation data support

    it it able to make 3d model/terrain with the data or just draw lines on a flat plane/terrain

    from the video i cant tell what its doing with the elevation data so if you could please give some more details

    basically im interested in something that would make terrain/model
     
    Last edited: Oct 26, 2013
  22. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Hi im.

    Map-ity doesn't create a heightmap for the area you are looking at. It gets the height data for every point on the map. You could use this to make a 3D model if you wanted.

    We're planning at some point in the future to have Map-ity render basic buildings. Though, most use cases would probably want a custom solution as basic meshes would not look great.

    Check out http://u3d.as/content/jasper-stocker/build-r-building-generator/4iR
     
  23. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    What sort of things do people want to use Map-ity for? Basing a tower defence game anywhere in the world? Or what about an RTS? You could even do a top down GTA style game in your home town!

    Any other ideas?
     
  24. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    for me its open world style. i like big maps to roam around exploring.

    i have buildr and i hightly recommend it and it now does basic interiors and openings so it great for shooters

    i also have easyroad3d and terrtain tools which are very good

    but i would like to use map-ity to create basic terrain / model of terrain and have overlay with where roads, rivers, buildings, etc go so i know where to place them.

    so its like starting tool and like projection and i will take the terrain/model of terrain it gives me and shape it smooth it out and i will take the projection of roads and rivers,

    then i could use my terrain, river, road, building tools and libraries of assets i have to work it

    so it will help me build more realistic maps/scenes.

    i will also use google maps/earth street view to gett better idea of the buildings and roads and trees.

    so its getting information from lots of different sources to know what to place where

    of course it has to be scaled down. and i may not have a tree that is exact or a building that is exact but i cant get one from my library that closest match

    perhaps do some of it procedurally. i guess it depends on exactly the data i get from like map-ity.
     
    Last edited: Oct 28, 2013
  25. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Have you tried using buildR to create buildings based on Map-ity data? We're interested to see if it works?
     
  26. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    ive been putting buildr through paces and giving author feedback

    i would like to try to use map-ity with topographical data to see how to build terrain/model

    i found code for c# to take like hieght map and build like terrain/model

    and take terrain to model and model to terrain.

    bunch of c# code
     
  27. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    hi please check your email i sent you my order number. please give me access to beta builds to i could start playing with topographical data. thanks in advance!
     
  28. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    one improvement i can already think of is doing the processing in a coroutine which is basically the same thread and will road block until its down, but another native thread. c# supports native threading so its very easy. would not be hard to change. then it would be responsive and you would see it as it fills it in and be able to move around ect while its humming away

    also add ability to pan and rotate and zoom the map

    add ability to get like image (or set of images)

    and like ive posted make terrain / model of terrain from topographical data


    ad not x,y for location bug the amount of x/y blocks so its an array that you will be loading, tiles. that way you can grab a whole area
     
    Last edited: Oct 29, 2013
  29. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Threading isn't a bad idea.

    We're going to be focusing on Tiling the Map Data so it can be streamed in and Terrain generation. Both of which will take a while to complete. The main issue is the requirement for reliable web services to provide the data. We've found a few we might try.
     
  30. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    hi

    thanks for the early access

    please keep sending me updates as you come up with them

    ill play with them and let you know if i find any issues or come up with any more ideas

    best regards
     
  31. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Just finished an update which exposes ALL Open Street Map tags! :)

    They are stored in a hashtable in a Tags class.

    Will submit this to the AssetStore along with some bug fixes tonight.
     
  32. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    got it thanks

    hit i cliff cause of editor 32-bit limit

    so please add way to like grab the stuff and page through it in like tiles

    so u keep like 9 tiles loaded.

    (-1,-1), (-1,0), (-1,1)
    (0,-1), (0,0), (0,1)
    (1,-1), (1,0), (1,1)

    and the rest on disk

    as you move it always keeps you at (0,0) and fills in in direction you are going and drops in direction you are going away so its always 3x3 and you always in middle.

    perhaps write all the stuff in a tile to a file

    also i did one quick thing...

    change

    Code (csharp):
    1.  
    2.             string xmlText = System.IO.File.ReadAllText(...)
    3.            
    4.             xmlDoc.Load(xmlText )
    5.  
    to

    Code (csharp):
    1.  
    2.             FileStream stream = System.IO.File.OpenRead(...)
    3.             using(stream)
    4.             {
    5.                 xmlDoc.Load(stream);
    6.             }
    7.  
    i put ... so to obscure the source code

    also for file name instead using the date im using lon and lat bounds cause its more meaningful

    also i save and load the height data in a similarly named file with ".heightdata" appended to end.

    please consider such changes as well...

    that way you not loading it into string and having xmldoc at same time... its eats memory..

    worse the xmldoc eats more memory best to not use xmldoc at all. and use xmlreader and create data structures as you parsing xml stream

    500mb xml file using like 4gb or ram in xmldoc form!!!!! horrible implementation of xmldoc... mono sucks... just cant keep up with microsoft implementation...

    but that is a little more work...

    i did it for my character generation system and it not only ran faster

    also it much faster to save xml from website and then load it than get it using WWW, cause WWW takes like 1hr for something ie gets in like 1 second!. yes WWW is that horrible. just think of how they implemented it. ouch... they should have done it in another thread and not used coroutines... it crawls. also it doing lots of little string concats cause of it...

    perhaps have it as some .net console/window forms unity to get the xml and convert to like some binary format

    that is basically a list of from vector 3 and to vector 3 and what it is as some int then you can really fly through it drawing lines in the right color.

    or even binary format with lat/lon/ele and what it is, but that would need to be converted then at runtime which is still slow since it could have been done in like external application once.
     
    Last edited: Nov 5, 2013
  33. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    oh and i defined more zooms :) can never have enough

    Code (csharp):
    1.  
    2.         ZoomLevel_1 = 1, // Approx 217m x 217m
    3.         ZoomLevel_2,
    4.         ZoomLevel_3,
    5.         ZoomLevel_4,
    6.         ZoomLevel_5,
    7.         ZoomLevel_6,
    8.         ZoomLevel_7,
    9.         ZoomLevel_8,
    10.         ZoomLevel_9,
    11.         ZoomLevel_10,
    12.         ZoomLevel_15 = 15,
    13.         ZoomLevel_20 = 20,
    14.         ZoomLevel_25 = 25,
    15.         ZoomLevel_30 = 30,
    16.         ZoomLevel_35 = 35,
    17.         ZoomLevel_40 = 40,
    18.         ZoomLevel_45 = 45,
    19.         ZoomLevel_50 = 50,
    20.         ZoomLevel_55 = 55,
    21.         ZoomLevel_60 = 60,
    22.         ZoomLevel_65 = 65,
    23.         ZoomLevel_70 = 70,
    24.         ZoomLevel_75 = 75,
    25.         ZoomLevel_80 = 80,
    26.         ZoomLevel_85 = 85,
    27.         ZoomLevel_90 = 90,
    28.         ZoomLevel_95 = 95,
    29.         ZoomLevel_100 = 100,
    30.         ZoomLevel_125 = 125,
    31.         ZoomLevel_150 = 150,
    32.         ZoomLevel_175 = 175,
    33.         ZoomLevel_200 = 200,
    34.         ZoomLevel_250 = 250,
    35.         ZoomLevel_300 = 300,
    36.         ZoomLevel_400 = 400,
    37.         ZoomLevel_500 = 500
    38.  
    i started at 1x, cause didnt look nice to me.

    im using like 200 right now ;) 500mb xml file coming down! blows unity editor :(

    porting code to visualstudio as application going to grab it, parse it, put it in smaller binary format for poor little baby 32-bit unity to digest without choking on it. then i guess i can draw lines. at that point i guess i can start with code to build stuff procedurally. still i dont think it will handle the complexity of the city. im hoping them do 64-bit edit then its not a problem. its mostly references to prefabs anyway with some translation/rotation... would be nice to integrate with like builder. so perhaps you'all can work on these things to make this a more commercial solution. right now i guess its a start... oh dont forget paging of 3x3 tiles. cause its the only way to get it to work with any framerate worth having...
     
  34. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Thanks im, these are all really good suggestions.

    Hopefully any future changes we make don't cause you too much trouble since you customised Map-ity :)

    Good to see the code was easy to understand and change!
     
  35. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    the following way faults cause natural/water and waterway/dam are at same way id and you cant add 2 values to the same id to the hashtable

    Code (csharp):
    1.  
    2.   <way id="39641130" version="2" timestamp="2013-03-19T04:04:39Z" changeset="15415626" uid="74937" user="emacsen">
    3.     <nd ref="475146804"/>
    4.     <nd ref="475146801"/>
    5.     <nd ref="475146802"/>
    6.     <nd ref="475146798"/>
    7.     <nd ref="475146799"/>
    8.     <nd ref="475146796"/>
    9.     <nd ref="475146797"/>
    10.     <nd ref="475146811"/>
    11.     <nd ref="475146812"/>
    12.     <nd ref="475146809"/>
    13.     <nd ref="475146810"/>
    14.     <nd ref="475146807"/>
    15.     <nd ref="475146808"/>
    16.     <nd ref="475146805"/>
    17.     <nd ref="475146806"/>
    18.     <nd ref="475146784"/>
    19.     <nd ref="475146783"/>
    20.     <nd ref="475146787"/>
    21.     <nd ref="475146786"/>
    22.     <nd ref="475146779"/>
    23.     <nd ref="475146778"/>
    24.     <nd ref="475146782"/>
    25.     <nd ref="475146781"/>
    26.     <nd ref="475146793"/>
    27.     <nd ref="475146792"/>
    28.     <nd ref="475146795"/>
    29.     <nd ref="475146794"/>
    30.     <nd ref="475146789"/>
    31.     <nd ref="475146788"/>
    32.     <nd ref="475146791"/>
    33.     <nd ref="475146790"/>
    34.     <nd ref="475146763"/>
    35.     <nd ref="475146765"/>
    36.     <nd ref="475146766"/>
    37.     <nd ref="475146804"/>
    38.     <tag k="ele" v="191"/>
    39.     <tag k="gnis:county_id" v="031"/>
    40.     <tag k="gnis:created" v="07/01/1981"/>
    41.     <tag k="gnis:feature_id" v="884315"/>
    42.     <tag k="gnis:state_id" v="34"/>
    43.     <tag k="name" v="High Crest Lake Dam"/>
    44.     <tag k="natural" v="water"/>
    45.     <tag k="waterway" v="dam"/>
    46.   </way>
    47.  
    the following faults AddWaterway() when the above is added

    Code (csharp):
    1.  
    2.             // Add waterway to Hashtable of waterways
    3.             waterways.Add( waterway.id, waterway );
    4.  
    please advance how to handle dams i guess in waterway at same way id...
     
    Last edited: Nov 13, 2013
  36. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Thanks for this. It looks like a bug in the OSM data as as far as I understand it they should be 2 separate ways. I can add code to try "handle" it.
     
  37. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    yes please resolve so mapity can handle

    basically what they are saying at this spot its a water way and a dam so it would do like dam and image

    so at the hashtable where you add the key and value

    the value has to be like a arraylist of all the values that go at that way

    its not that hard to change and then it could handle the map data im (and others will be) getting

    all this data is really great because in theory it could be used to procedurally generate a map

    i mean i could in theory have a dam model and put it at the location and elevation based on it. the only thing i have not figures is direction, but that would be like i guess in direction of water.

    same with buildings. im looking at buildr and need to learn to use their api to make buildings and see how to hook up with data i get for buildings. the thing is where to place the doors. i guess towards street

    but i dont have like way to generate rivers and sidewalks and roads

    i have easyroads but i dont know their api

    so its a matter of learning a bunch of apis and learning how to tie the data all together.

    anyways we just starting
     
  38. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    here is how i solved it for now

    Code (csharp):
    1.  
    2.            ArrayList lwaterways = (ArrayList)waterways[waterway.id];
    3.  
    4.             if (lwaterways == null)
    5.             {
    6.                 lwaterways = new ArrayList();
    7.  
    8.                 lwaterways.Add(waterway);
    9.  
    10.                 waterways[waterway.id] = lwaterways;
    11.             }
    12.             else
    13.             {
    14.                 lwaterways.Add(waterway);
    15.             }
    16.  

    at least it preserves both values and the render can either render all of them or just the first one or the last one or whichever one(s) you put logic for, etc...

    also since u used Hashtable I used ArrayList to keep the style, but I would have preferred using generics version of them... ;)
     
  39. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    If there are assets to get accurate street data along with fitting topology i'd like to know where! (Or if elsewhere, why need map-ity aha) - I think if this is flexible enough as one would hope then it's a buy but I guess i might possibly get away with importing it into max as splines somehow - Making it work with something like buildR would be very much a buy, however, as i'd still export it for a lot of modelling but it would be a great base to work on.

    As an aside, i don't know if Easyroads is your best bet, I own it and i'm not sure it will follow an existing spline (maybe you know better) however something like supersplines or megashapes will follow a spline and generate a uv mapped mesh along it, maybe be useful to your needs
     
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    I have a script available for EasyRoads3D that will auto generate road objects based on Vector3[] input for the marker positions.

    A while ago I also experimented with openstreetmap data. It works great but if I remember well the map data can have rather densed data resulting in many markers. I wrote scripts to filter this data etc. I am not sure Map-ity can do that, if so, for sure it will work just fine...
     
    Last edited: Nov 14, 2013
  41. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    can easyroad handle streets with sidewalks and objects like parking meters and signs procedurally generated from like mapity data for where the street type goes

    also do you have way to handle rivers and other water ways...

    cause if you do then its just a matter of hooking it all up

    also im doing it outside of unity.


    i have mapity running in pure visual studio 64-bit im doing the crunching there. unity like i posted cant handle it both because of how much memory im using and how slow mono is. its horrible... the city of new york took about a second to get in unity it ook well over an hour just to blow up cause it cant handle half gb xml expands to 5gb dom.

    so i crunch it in few seconds. that into new binary format that is tiny... no dom, no xml... nor parsing which also took unity a long time to do.. it just does not like string stuff. all those garbage collections i guess...

    anyways. it would be nice to hook it up with easyroads easy rivers if that exists and like buildr... outside unity crunch it to like number of fbx/obj and then pack it into combined fbx/obj and then finally load it into unity... that way you dont have like million buildings but like one giant fbx. or at least fewer fbx.. i guess you could do land as terrain and not as a model.

    i guess when i finish playing with mapity i will try it with buildr and then easyroads. but like i said what would be nice is being able to call it from outside of unity. you can still make use of some of editor/runtime like Vector3. but not the actually engine since its not running...

    maybe it can be done with 64-bit unity runtime without the editor. but if editor stuff is needed then it would not work out

    also, i was thinking of dynamically loading the thing in as tiles. i got it sort of working with objects i can run infinite procedurally generated map... so i cant see how it would be different it would just be a matter of putting the data in a way i can quickly stream it in... perhaps preloading/caching some things.

    i mean i have 16gb and ssd and i can also do ram disk which is very fast.. basically you load it all into like ram disk and then read if from there. or in 64-bit space you can read it all into memory and then run it from there

    but unity editor is so far the issue. since as you get any size city and start adding to it you quickly hit memory limit...
     
    Last edited: Nov 14, 2013
  42. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, it is a matter of just hooking it up. The script I mentioned is for roads but it can be modified so it also works for rivers. But EasyRoads3D is an editor tool, if you use Unity terrain objects and you want to use all the benefits of EasyRoads3D such as processing the terrain so the shape matches the objects (also regarding rivers which is part of EasyRoads3D) you will have to run it in the Unity editor.

    The osm test I mentioned covered an area of about 25 sq. km, it included about 200 roads. Indeed it resulted in memory issues, I had to run it in a couple of batches to create all the road objects in Unity.

    If you just need roads to be created outside Unity and you have an EasyRoads3D license, send me a PM.
     
  43. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    sure sent you pm

    im running outside unity, but the stuff im creating is for inside unity. its just a memory limit with the editor...
     
  44. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    If anyone has any custom code, tweaks or bug fixes they'd like to see integrated officially let us know!
     
  45. LordAdolf

    LordAdolf

    Joined:
    Jan 3, 2014
    Posts:
    4
    Hi, Im new to Unity, but learning quickly. Can someone point me in the right direction. I want to know how to the map generated in the game window, rather than just a gizmo. Just a point ni the right direction would be great.
     
  46. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Mapity doesn't directly do this for you as it really depends on what you are trying to do.

    I would suggest a spline library from the asset store if you want to draw a road as a 3d model or perhaps a 2d asset for a top down solution.

    If you tell us what you are trying to achieve we could help further.
     
  47. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    We're pleased to announce that Map-ity is verified compatible with BuildR - Building Generator for runtime building generation based on real world map data!!!!!
    $Shot4.jpg $Shot7.jpg
     
    Last edited: Jan 22, 2014
    twobob likes this.
  48. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    is above new release coming out soon?
     
  49. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    No need that's the current version :) We just got a sample working last night.
     
  50. RewindGameStudio

    RewindGameStudio

    Joined:
    Oct 21, 2013
    Posts:
    194
    Here's a demo video!