Search Unity

Assets [BETA RELEASED] CityGen3D | Procedural city generation from map data

Discussion in 'Works In Progress' started by CityGen3D, Jan 28, 2018.

  1. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    229
    Yes CityGen3D now supports streaming of large environments via the Landscape Manager component which loads your terrains on demand at runtime using the Unity SceneManager API.

    There’s more info on setting this up in the CityGen3D manual which is available from the website.

    I’ve not forgotten about the Andorra screenshots!
    I’m going to use them to show off a new feature in 0.82 as soon as that’s ready.
     
    w34edrtfg likes this.
  2. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    229
    Version 0.82 not too far away now so sharing some screenshots of an Andorra test to demonstrate how CityGen3D works with a hilly environment, as requested originally by @w34edrtfg

    I'll follow this up in a few days with a more detailed explanation of one of the new features: Auto Heightmap Levelling for roads. I'll likely release a video as well of me driving around a bit.

    One of the things I really enjoy with CityGen3D is the organic environments it produces like this, that are genuinely exciting and fun to explore - and that my limited artistic ability could never produce. I don't know if there's a rally stage in Andorra but it looks well suited!
    I dropped the sports car from other demos in favour of this pickup truck as it was more suited to the terrain.:)

    Note that that everything you see (apart from the car) was generated automatically within Unity using the CityGen3D interface. No additional coding or object placement.

    screenshot0.png

    screenshot8.png
    screenshot4.png
    screenshot17.png
    screenshot23.png

    Notable changes in v0.82 will include:
    * Improved coastline support and instructions for how to generate coastline data files for your location anywhere in the world.
    * Improved terrain detail prefabs.
    * Improved terrain textures (added normal maps).
    * Reorganised project into two libraries to better split up Editor functionality and code that needs run-time access. An important first step in tidying up the API.

    Obviously things will look more city-ish from v0.9 when the procedural buildings should finally make an appearance.
     
  3. DJ_Design

    DJ_Design

    Joined:
    Mar 14, 2013
    Posts:
    60
    Curious why this isn't on the asset store? I've had problems buying assets from external sites, them going offline or worse.. when (if at all) do you expect to make an offical marketplace appearance?
     
    CityGen3D likes this.
  4. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    229
    Thanks for your interest in the project.

    Up to now, it's simply a case of it not being ready.
    For a project this size I thought it was important to do a smaller scale "early access" release so I could get initial feedback and iron out some issues first.
    The Beta over the last year has been really worthwhile and has helped to create a really exciting tool.
    I can't wait to see what people do with it when it reaches a wider audience!

    Although even without the exposure the Asset Store brings I've been really encouraged with how far and wide it's reached. I'm aware of it being included in two university research projects around Europe, for instance.

    So current plan is to submit for Asset Store release around Easter.
    But given the scale of the project it could be a while after that before it gets approved for release, but I'll keep everyone updated in this thread.
     
    DJ_Design likes this.
  5. w34edrtfg

    w34edrtfg

    Joined:
    Nov 23, 2014
    Posts:
    41
    @CityGen3D Oh i also forgot to share this link with you:
    https://github.com/maajor/OSMTrafficSim
    (not mine)
    This guy already builds a performant traffic system for unity using OpenStreeMaps. So maybe it's easy to integrate in your creation.
     
    CityGen3D and hopeful like this.
  6. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    229
    Yeah I came across this a while back, really useful resource.

    Although any official CityGen3D Traffic add-on module will likely not appear for some time, I’m currently working on some useful functions that you can call for easy access to road lanes that you can use for navigation waypoints.

    This will allow you to start hooking up CityGen3D scenes to your own traffic systems (or third party ones).
     
  7. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    229
    Video from a recent Andorra test:



    I was only on keyboard controls this time so driving not the best I’ve ever done... :)
     
  8. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    229
    So one of the new features that I'm quite excited about coming up in v0.82 is automatic road levelling.
    This feature was used in the recent Andorra test.

    This makes hilly environments with roads much more realistic and turns a default real-world heightmap into something suitable for high detail rendering, especially when dealing with roads on hills.

    Here are two images to demonstrate what it does.
    The first image shows the default heightmap from this location based on real world heightmap data.
    The camber along the road is really extreme and completely unrealistic. That doesn't make the real world heightmap data wrong, but you have to keep in mind that publicly available heightmap data is sampled around 30 metre intervals, which obviously can't consider all the detail required around roads and such like.

    before.png

    So how do we make the heightmap suitable for close-up rendering, such as in a driving game?

    Well a few button clicks away is the second image which has had auto road levelling applied and the terrain retextured based on the new heightmap. Much easier to navigate!

    after.png

    Please take a look at this video for a closer look on how roads can easily be generated around hilly environments in CityGen3D, to create really exciting environments. The earlier video in this thread shows off more of the Andorra environment that was created in the same way.

     
    Last edited: Feb 12, 2020 at 8:27 PM
    StevenPicard likes this.
  9. chmodseven

    chmodseven

    Joined:
    Jul 20, 2012
    Posts:
    39
    Hey, great asset. I bought it a while back and have been following your progress with interest.

    A couple of thoughts. I have done some prototypes with pulling in UK data from Open Survey, including the DSM/DTM heightmaps which go down to 50cm, and their Open Zoomstack free tier product which I have found is significantly more up to date with building footprints than OSM.

    Here's an example of just dumping the DSM ASC data into a Unity terrain heightmap for my street, for example.

    VisualizeOpenZoomstackData.png

    And here's the footprints from Open Zoomstack, and a fairly crude attempt on my part to use the height variance between DSM and DTM, inside the bounding of the footprints, to create a building shell mesh of my house. A lot of those footprints are missing from the OSM data, incidentally, although oddly enough some of the road naming was better in OSM in a few stray cases I checked.

    2VisualizeOpenZoomstackData - PC, Mac & Linux Standalone - Unity 2019.3..png

    Anyway, do you have any plans to integrate importing those data sources into the asset? (And I would presume there other popular data sets out there for the U.S. and other countries, so perhaps some sort of modular framework where such data could be added as needed might be cool.) It'd certainly go a long way to saving me a lot of time generating the city detail using your asset, as long as I could mix and match the data sources to get the best data.
     
    CityGen3D likes this.
  10. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    229
    Hi,

    Thanks for supporting CityGen3D and for your feedback.

    The feature set up to first full release is pretty much locked down now.
    So focus over next few months will mainly be on building generation and map editing functionality.

    After full release, the direction CityGen3D will take will largely be based on demand from users like yourself, so it's always really interesting to hear the different ways people are using it and for what type of projects.
    Naturally the more people mention something, the higher up the priority list it will go!

    Following your message I have downloaded some Ordanance Survey data for experimentation.
    However, I can't promise anything will come of it in the short term, because the OSM to Unity parsing is a huge part of what CityGen3D does.


    Although the higher res heightmap is quite interesting, it does seem like it combines natural terrain with manmade objects, which in most cases would perhaps be undesirable.

    One of the really great things about the NASA heightmap data is that it's detailed enough to have recognizable features, without the artifcats you get from higher resolution.
    So you have something useable straight away, with the option to add your own detail to make it more realistic, either through CityGen3D options (like the new road levelling feature, which has just been released in v0.82) or other tools compatibile with Unity terrains.

    However, I certainly think there's benefit to hi-res heightmaps outside of urban environments, for recreating real world natural features in high detail.
    A few users have contact me about wanting to use their own privately sourced hi-res heightmaps in CityGen3D, so it may be a case of trying to make that a bit easier in future, if possible.

    The tool already supports heightmaps from multiple sources, so this is perhaps a more feasible short-term aim than embedding something like Ordanance Survey data as a primary data source, but I will certainly do some investigation in this area.
     
    Last edited: Feb 17, 2020 at 2:10 PM
unityunity