Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Assets 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:
    44
    Hi,

    Creating a 3D city environment complete with terrain, roads, street lighting, railways, buildings, trees and other prefabs can be a very time consuming process.
    It usually involves learning several different tools and getting them to work in sync with each other, then manually creating and placing many game objects.
    Even before the creation of the scene, a lot of planning is required to design a believable city, which if you simply want to prototype an idea very quickly can be a big hurdle to overcome, especially when working on your own or in a small team.

    So I've been experimenting with how to automatically convert 2D map data into a 3D scene in Unity, with a view to improving the workflow and allow creation of city environments with relatively little effort.
    Rendering 3D maps is nothing new, but other approaches are usually not detailed enough to be suitable for game development.
    A key goal of this project is to be able to create cities detailed enough to be explorable at ground level and therefore useable in first-person games.


    CityGen3D is a work-in-progress Unity Editor extension and requires no additional coding. Simply specify a location using latitude & longitude and real world map data will be downloaded and parsed by CityGen3D within Unity ready for scene generation.
    You can then use the CityGen3D interface to choose your textures and prefabs, before CityGen3D generates your scene using a combination of procedural geometry, texturing, terrain deformation, and prefab spawning.

    Perhaps the best way of explaining what CityGen3D actually does is to show some screenshots and to say that nothing you see was manually placed in the scene.
    All the terrain, roads, buildings and trees were created or spawned using real world map data and rule sets.

    Please note that some of the art assets shown are third-party and used just to demonstrate the system. These include lovely trees by SpeedTree and fantastic buildings by rik4000.

    screenshot4.png

    screenshot0.png

    screenshot2.png

    screenshot3.png

    screenshot5.png

    Over the coming weeks and months I'll be releasing more information on this thread (and via www.citygen3d.com and @CityGen3D) on how CityGen3D works and what it can do, but here are a few of the notable features:
    • Downloads and parses 2D map data from OpenStreetMap, ready for conversion into a 3D scene using user definable rules from within the Unity Editor.
    • Generates and textures Unity terrains to create the base of the environment.
    • Adds trees and detail to the environment automatically based on surface data.
    • Procedurally generates geometry for creation of roads. The unique way in which the scene is created means that complex junctions and intersections are created automatically.
    • Spawns road-side objects, such as street lighting and safety barriers.
    • Automatically spawns prefab buildings in realistic locations.
    Please let me know if you have any questions, and I look forward to sharing more progress with you.
     
    Last edited: Feb 7, 2018
  2. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    One of the most time consuming tasks when creating a 3D city scene is making roads. This is particularly the case when attempting to build complex junctions and intersections.

    However, CityGen3D can be used to generate a large network of roads based on real world map data, all at the click of a button.
    The unique way in which roads are generated means it's capable of building different types of layouts such as roundabouts, without the need for custom mesh creation in advance.

    It can also handle multi-lane highways, as well as junctions to join and leave the motorway.
    The end result is an organic looking road network that's diverse and fun to explore!

    screenshot10.png screenshot12.png
     
  3. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Once map data has been downloaded, CityGen visualizes it within Unity using Map View.
    Different map objects are selectable in this view so you don't have to find specific points of interest from the heirarchy alone.
    It's possible to toggle between this view and your normal scene view via the menu and a keyboard shortcut.

    mapview.png

    Much of the UI is still work-in-progress, but I'll be providing more details and screenshots of this soon. That should make the workflow a bit clearer, so you can see how you would go about customizing your scene through rule sets before generation into 3D.
     
  4. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Before CityGen3D can generate your scene (terrains, roads, buildings, etc), you need to specify a real world location.
    Up until recently this meant looking up the latitude and longitude of your desired location on the internet.
    Now that I'm starting to think about tutorials and walkthroughs, it didnt feel right that one of the first things you needed to do was to use an external tool.
    So I've been implementing a 2D map within Unity so you can browse around and pick a location without leaving your development environment at all.

    locationselect.png

    At the heart of CityGen is a powerful terrain generator, so you don't have to make city scenes with CityGen. I'm doing a lot of work at the moment in getting the terrain generation working well in different environments, so here I'm trying the sparsely populated island of St Mary's.

    screenshot200.png

    Terrains are generated and stitched together automatically. Different biomes and landuses are textured differently depending on the rules you set via the CityGen UI within Unity.
    In a future update I'll show how all that works, with some close-ups of the generated island.
     
    Zoey_O likes this.
  5. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,477
    I saw your post in the Terrain Workflow, Interesting tool btw.
    Is there any reason why the generated terrain is entierly flat?
     
  6. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Thanks for your interest in CityGen3D.

    All the screenshots posted so far do look decidedly flat.
    Although strictly speaking none of them are entirely level because a heightmap is automatically applied to form the coastline and other bodies of water.

    I'm doing a lot of tests at the moment with the island in the last screenshot, which is sixteen terrains in a 4x4 grid (although a few of them are entirely underwater).

    However the land above sea level is essentially flat in all the above screenshots, so its a fair question. This is mainly because OpenStreetMap doesn't have detailed elevation data included in its database and the terrain wasn't manually modified in any way.

    The good news is that CityGen3D will also support downloading and applying of heightmap data from another source, most likely Bing Elevations API. I've had this working on a single terrain for a while, where CityGen provides an interface to the API so you just click a button to get the heightmap data for your location.

    I was actually working on the multi-terrain implementation of this over the weekend, so your question was good timing, and I hope to share some more interesting topography with you soon!

    It's certainly worth emphasizing that CityGen3D is built upon Unity terrains, so all the tools for adjusting heightmaps and painting terrains will function as normal after CityGen3D has provided you with a starting point.

    It also means that any shaders and assets you use already should work really well in scenes generated using CityGen. I'm having lots of fun enhancing my scenes with MicroSplat at the moment.
     
  7. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Some progress on auto heightmap generation...

    CityGen already knows your chosen location, so will download the raw data for you from the internet within Unity.
    It samples data every 32 metres (so 1024 times for one 1024x1024 terrain), which is very quick to download in my tests.
    It masks that relatively low resolution data with the detailed OSM surface data and applies a smoothing function. This takes a bit of time, but you can adjust the number of iterations it runs.
    You also can apply an offset for different surface types. I tend to increase rock heights and decrease sand, for example.

    The end result is realistic environment, resembling the real life topography of the desired location.
    Here's a few screenshots of St Mary's again, now with with the final heightmap applied.

    screenshot5000.png

    screenshot200.png

    Note that the roads are built and aligned to the heightmap automatically as well.
    Similarly the terrain is textured and detailed procedurally by CityGen, although it's being rendered with the MicroSplat shader for additional detail.
     
    HeadClot88 and SirTwistedStorm like this.
  8. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    655
    Hey @CityGen3D - I have a few questions

    1. Is there a planned price for this asset?
    2. Is the world generated at run time or Is it saved as a scene file?
    3. Will this work with other services such as Google Maps, MapBox, etc?
     
  9. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44

    Thanks for your questions!

    1). The price hasn’t been finalised yet, but one of the main purposes of CityGen3D is to help indie devs prototype their game ideas quickly. So the aim is to make it as affordable for hobbyists as possible.

    The current plan is to release a beta version first, for no more than $50. Early adopters will get to download future updates for free, so it will be worth getting it early and help to influence certain aspects of it. The final price would most likely be somewhere around $100.

    CityGen is royalty free, so there are no additional costs beyond the fixed price of the asset.


    2). That’s a very good question and it’s worth emphasising that CityGen is an Editor extension for creating detailed scenes at design time, instead of relatively low detailed scenes on the fly at run-time.
    In other words, you wouldn't use CityGen to make a game similar to Pokémon Go, where the location changed dynamically at run-time, but you could use it to make a scene based on a fixed location anywhere in the world.
    For example, a first-person shooter or street racing game with levels in London, Miami and New York (or wherever).

    You can think of it as a terrain generator, but where the functionality of most terrain generators stops after the creation of trees and foliage, CityGen also has an integrated road and buildings solution. So prototyping ideas in more detailed game worlds can be done so much quicker.

    The downloaded raw map data is saved as an asset within your project, so it doesn’t have to be downloaded each time you load Unity.

    The resulting environment is simply saved as a standard Unity scene file and CityGen effectively doesn’t exist at run-time. So there’s no additional processing cost or memory overhead once your scene has been created.


    3). CityGen uses OpenStreetMap as its main data source. Elevation data is currently downloaded via Bing Elevations API. There aren’t currently any plans to integrate with Google Maps or MapBox, but I certainly keep an eye on what’s happening with thoses services. So further down the line if you can see a particular area in which integration would help, please let me know.

    There are a few areas of integration with other Unity assets that I am exploring. For instance, the developer behind BuildR has been very encouraging and we are both keen on integrating that into CityGen.
    Although CityGen will have an integrated solution for procedurally generated buildings, that’s an example of where an existing asset could slot in nicely to supplement CityGen.

    But in the short term, especially while in beta, the main focus will be on ensuring CityGen does the fundamentals well.


    I hope that answers your questions, but let me know if something isn't clear, or you have any more.
     
    HeadClot88 likes this.
  10. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    655
    Hey @CityGen3D - A few more questions from me.

    1. When Can we expect the beta version of CityGen3D?
    2. What is the artist workflow like with CityGen3D?
    3. What versions of Unity will this be compatible with?
     
  11. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Hi, thanks again for your questions:

    1). There is no fixed date, other than to say as soon as possible! I’d like to have an initial release out over the Summer though. I’ve been greatly encouraged by the feedback and response so far, so I’m really keen on getting it out there so people can try it out and help shape it’s development.

    Short term goals will be to start sharing more information on the work-flow, UI and get some tutorial videos ready for release. The plan is to release both via the website at www.citygen3d.com and eventually via Unity Asset Store.


    2). I’m conscious of the fact that most of what’s been shared so far is of generated scenes, rather than the process of how you get there. So I’m working hard to fine-tune the UI, and I’ll be giving out more info on this very soon.
    But the goal is to make it user friendly so it should be usable by artists and designers. CityGen has a custom UI for specifying rules and assigning textures and prefabs (more screenshots coming).
    You’ll be able to define what different surfaces look like (eg farmland, beach, swamp, etc), by assigning textures to them with noise filters. You’ll be able to define how each surface spawns trees and foliage and how each road type is rendered.

    Buildings can either be prefabs or procedurally generated. For the procedural buildings you’ll be able to specify the use of different textures and meshes to make the buildings, depending on the type of building it is (eg. so skyscrapers can look different to houses).

    You'll be able to hook up different map features to different spawning systems. This will allow you to auto extrude walls and fences where they are mapped in real life, for example.

    Essentially though you will have full control over the look of your scenes, whether you are making a sci-fi game or medieval game, you are really only limited by the art assets you have.


    3). CityGen3D doesn’t rely on any specific Unity features, so this will largely be decided by the community during beta testing. But technically there’s no reason that it can’t work on old versions of Unity, we’d just have to have a sensible cut-off to avoid a large testing overhead. So definitely 2017.x (and 2018.x), possibly 5.x if there’s enough demand for it, but unlikely to go back further than that. But like I say, certainly open to suggestions on this.
     
  12. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    More info on the CityGen3D user interface coming, I promise!...

    But for now, here's another screenshot showing how prefab buildings are auto spawned to align with terrain and roads.

    The other screenshot is from the same scene and only the car was manually dropped into the environment.
    The terrain, roads, buildings and plants were all auto generated from OSM data and Bing Maps Elevation data, either by using procedural geometry, or instantiating prefabs.

    screenshot301.png
    screenshot102.png
     
    Last edited: Apr 25, 2018
  13. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    My first video!
    A CityGen3D scene with a few props added to make a racing circuit.

    Car and track prefabs from Edy's Vehicle Physics Pro.

    I've now destroyed productivity as I need to beat my best lap! ;)

     
    Kurt-Dekker and Neviah like this.
  14. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    655
    This looks pretty good so far :)

    Keep up the awesome work!
     
    CityGen3D likes this.
  15. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Thanks for the encouragement, HeadClot88!

    Also thanks to Edy and Dreamback that set me on the right path so I could code support for my racing wheel on this thread https://forum.unity.com/threads/vehicle-physics-pro-beta-feedback-welcome.381241/page-2
    Knocked off at least 7 secs once I ditched the keyboard for my wheel & pedals :)


    Just in case anyone wondered, in the following image I've highlighted where I put the sector markers to create the race track in the video.

    As noted earlier in the thread, I've been testing a lot with the largest of the Scilly Isles in the UK. The whole island was created by CityGen3D but only a relatively small portion of it is shown in the video: the red line route. The blue markers are where the start line and two sectors were placed.

    If you want to replicate real world locations in great detail using CityGen3D, you can with a bit of research and suitable models & textures. But equally, you can use the raw data to create largely fictional environments that are realistic but organic looking. You have the whole world to choose from - that's a lot of data!

    Even with the same source data, you are free to play around with how you use it. I could decide the forests were actually the residential areas and the large built up area of Hugh Town was actually a dense forest.

    racetrack_sectors.png

    I quite like the island location with the mix of beach, countryside and small towns. But I'll be showcasing more built up locations soon as well (to more closely fit the name of CityGen!), when my testing turns more to the building generation as opposed to the terrain.
     
    HeadClot88 likes this.
  16. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    A Unity terrain is a single mesh, so you can only assign one physical material to it.
    However CityGen3D gets round that by allowing you to assign a physics material to each of your terrain textures.

    In this video you can see how the car struggles for traction on the grass compared to the road.
    The tyre marks and particle effects are also different depending on the surface each wheel is on.

    This technique is useful in lots of gameplay situations, not just driving games.
    Such as deciding what sound your stealth character would make on a creaky wooden floor versus a soft carpet... :)

     
    Neviah, tnaseem, Zoey_O and 1 other person like this.
  17. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    As you can see from earlier screenshots, CityGen3D can auto fill your environments with prefab buildings based on rules you set.
    However, OpenStreetMap often has building data available which can be processed by CityGen3D to make specific buildings.

    CityGen3D will have BuildR2 integration so users of this asset are able to auto generate buildings based on map data from within the CityGen3D UI in Unity, which can be then modified further using the BuildR2 interface.

    I'll release more info on this later, but here's a few test screenshots in London showing auto generated BuildR2 buildings on top of a CityGen3D environment.

    screenshot0.png

    screenshot1.png
     
    Neviah and HeadClot88 like this.
  18. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Time for a new video showing a park in London!

    Water fountains are often mapped in OSM, so I always had the idea of putting a nice particle system together and have it spawn in the right place :)

    Almost everything in this scene is generated or spawned by CityGen3D using the UI within Unity, but I added the birds manually using the cool Bird Flock asset.

    The buildings are generated using BuildR2 integration and the terrain detail is rendered using GPU Instancer, although it was originally all placed automatically by CityGen3D.

     
  19. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    655
    This is amazing :)
     
    CityGen3D likes this.
  20. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Here's a screenshot of the CityGen3D interface within Unity showing how you tell the tool to find different map entities within the OpenStreetMap XML data.

    You can assign a little icon to each type for easy identification on the map.

    This is a 2D representation of the 3D park in the video. You can toggle between 2D and 3D very easily and the 2D view is quite handy for finding and selecting objects (rather than always using the hierarchy, or getting lost in 3D).

    Once the data is processed any entities will show up on the map and you can assign prefabs to each one ready for 3D scene generation.

    map_entities.png
     
    Bartolomeus755, Neviah and HeadClot88 like this.
  21. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Getting nearer to first beta release now, so working on integrating the help system into the UI in the form of help-boxes and tooltips. Trying to make using the tool as easy as possible, although once you are familiar with the UI you'll be able to turn off the help to give you more screen space.

    This screen also shows how much control you have over placement of prefabs in your scene and you can auto correct anomalies in the original OSM data to ensure your postboxes dont appear in the road, for example.

    citygen3d_help.png
     
    Neviah and Bartolomeus755 like this.
  22. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    183
    Looks very promising so far. This asset could be a game changer for real world locations in Unity. Great work!
     
    CityGen3D likes this.
  23. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Thanks for the encouragement!

    I think that one of the exciting things about it, is that even if your project is based in a fictional location (most are), you can prototype the idea quickly using real world data as a starting point. Or you can use the data without attempting to make an exact replica of real life.
    My most recent video with the fountain is based on Bessborough Gardens in London, but I spent no time actually making it look specifically like it does in real life, because it wasn't important.
    However the source data was perfect for the scene I wanted to create. Its quite fun browsing around the world just looking for interesting locations - you essentially have the whole world at your fingertips!


    It wont form part of early beta releases, but the long term intention is that users will also be able to generate entirely fictional maps in 2D within Unity and have the scene auto generated in 3D using the same system.
    In other words, once CityGen3D is working fully with real world data as the input, there's no reason it has to be real world data at all. There will just need to be an interface for creating original 2D data, and I have a few ideas on how that will work.
    As a kid I used to love drawing fictional 2D maps (on paper), so I like the thought of people clicking out a map in 2D and it turning into a 3D environment at the click of a button.


    In the short term I hope to release a walkthrough video next month going from empty scene to city, to better show how the tool currently works.
     
    sharkapps and Bartolomeus755 like this.
  24. sharkapps

    sharkapps

    Joined:
    Apr 4, 2016
    Posts:
    87
    Looking forward to seeing that. I love the 2D map to 3D environment idea and I can't wait to give it a spin.
     
    CityGen3D likes this.
  25. iichiversii

    iichiversii

    Joined:
    Nov 23, 2011
    Posts:
    42
    Im really looking forward to this
     
    HeadClot88 and CityGen3D like this.
  26. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    655
    Hey @CityGen3D
    Got a few questions for you.

    1. How well does Unity3D with CityGen3D Scale up for massive scenes? For example: All of downtown London or Manhattan Island. I am guessing that I would run into performance issues with Unity3D if such a large scene was made with CityGen3d.
    2. Is there an ETA for the Beta? I really want to get my hands on this.
     
    CityGen3D likes this.
  27. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Thanks for all the encouragement!

    1) That's a good question, because it's not something I've touched on yet, but it's a really important part of any project.
    As always, consideration will have to be given to performance when designing your scenes, and best practices that work normally in Unity will work for CityGen3D scenes too, such as having sensible poly counts on your prefabs and reducing draw calls where possible.

    The good thing is, you are in full control of what you do with the raw data: how many trees are in your forest, or how many buildings you decide to create from it, etc

    An environment made using CityGen3D is made up of one or more terrains. Each terrain represents a 1km area (1024x1024 metres, to be precise).
    I've been able to create fairly large environments in CityGen3D with good performance, but certainly a good development PC is recommended if you intend on working with large amounts of data and multiple terrains.

    The St Mary's island test was 16 terrains (4km x 4km).
    The Gibraltar test was even larger (I think over 20 terrains) and had a more complex heightmap, but I got good frame rates with that too (using a few tricks mentioned below).

    But certainly it's better to think of it in terms of attempting to recreate Westminster as opposed to the whole of Greater London in one scene - at least for now!
    That's because CityGen3D doesn't currently have any built-in support for world streaming, so in the short term at least, if you were looking to make super large environments you would probably need a third-party system to handle that side of things so everything wasn't in memory at the same time. I will be looking to do some tests with available world streaming assets in the future to make integration as easy as possible for those that need that scale.

    Here's a few other performance related things worth mentioning:

    * Once CityGen3D has built the scene for you in the Editor you are able to delete it from the scene, so there's no overhead in your builds from having generated your scene using it versus if you had done everything yourself manually using normal techniques.

    * Procedural geometry, such as what is created to form the roads, is automatically batched to reduce draw calls and reduce number of GameObjects.

    * CityGen3D also has a TerrainLODManager for managing multi-terrain environments and automatcailly sets up the terrains so they are paired with each other correctly to take advantage of the Unity LOD.

    * Any terrain detail shader that works on Unity terrains should work to improve detail rendering performance. I currently use GPU Instancer's detail rendering system with CityGen3D to good effect, where CityGen3D paints all the terrain detail for me and I just activate GPUI in the scene afterwards.

    * I recommend using a third party terrain shader to improve performance even futher. MicroSplat is free, easy to setup, and gives a good frame rate boost compared to the standard terrain shader. I'll also be keeping a close eye on the planned improvements to Unity Terrains so CityGen3D is ready to take advantage of them when they appear.

    * Buildings can be generated using BuildR2 integration which gives you full control over how detailed the building meshes are and which buildings have a modelled interior, etc.

    * Unity's own occlusion culling system seems to work well with CityGen3D and is easy to use. For really quick prototyping CityGen3D also comes with a basic LayerCulling script so you can simply cull different layers at different distances from camera for a quick boost during development without needing to bake the occlusion culling all the time.

    * The actual generation of the scene takes quite a long time and multiplies for every terrain you have. I've made continuous improvements, but I want to make this even better. Long term I'll be attempting to utlilise Unity Job System & ECS to make some of the processing run in parallel. (But even now, it does things in minutes that would otherwise take hours or even days of manual work).


    2) ASAP this year for sure. I'm aiming to publish a roadmap soon detailing plans for initial release and the rough order of subsequent features. I've been developing the concept for severeal years now, so I'm really keen to get it out into the wild. I'm fixing up a few bugs, but aside from that I just want to be in a situation where I have a reasonable level of documentation and tutorials available before an intitial release.
     
    HeadClot88 and Bartolomeus755 like this.
  28. trig-ger

    trig-ger

    Joined:
    Sep 1, 2018
    Posts:
    3
    Hi.
    I'm very happy that such a promising 3D city generation project is being developed and may become available in the near future.

    A couple of questions:

    1. Of course, every game engine has it's "+" and "-", but why Unity was chosen instead of, for example, Unreal Engine? UE has more realistic graphics by default and built-in world streaming support, if I'm not mistaken.

    2. How CityGen3D will be compared to the impressive 3D city builder Cities: Skylines in terms of graphics quality, max size of terrain, ability to change parameters of roads (number of lanes, etc.), and, maybe, the traffic system?
     
    CityGen3D likes this.
  29. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Thanks for your interest in the project!

    1) Many years ago when I was looking for an engine to learn, Unity was more accessible than Unreal. It was long before Unreal was affordable for indie developers, so Unity was the obvious choice back then. We are blessed these days to have so much choice!
    I come from a C++ background and would love to learn Unreal someday. So it isn't out of the question that it could find its way onto other engines eventually, but I'm committed to making a great tool for Unity first. I'm really pleased with recent developments in Unity and some of the future plans sound exciting, so it's a good place to be!

    2)
    Graphics - CityGen3D was developed with the core aim of being able to generate environments automatically that would be suitable for first-person rendering. So from that point of view it should be possible to have even better graphical quality than Cities: Skylines.
    CityGen3D will have some textures and models included for prototyping and demonstration, but in a lot of cases you would want to replace them with your own to fit your project. So the art style and graphical quality of scenes is almost completely in your control and will reflect the quality of assets you use with it and the priorities you have in your project. Many screenshots I have shown up to now actually include great UK style buildings made by rik4000 for Skylines mods, later made available on asset store.

    Size - Management of really big worlds is something I'm working on as a priority. At the very least to ensure easy integration with third-party streaming assets. Although I hope to eventually have a native solution for this. But in the short term, without a disk streaming solution, you are limited to what you can fit into memory which will depend greatly on how much detail you apply to the generation. However there are some examples in this thread showing the sort of scale you can work with. Upcoming videos showing the system in more detail will hopefully give you a better idea.

    Roads - the unique way in which the city geometry is created means that CityGen3D can support auto generation of all types of roads. At the moment it's concentrated on replicating the real world, so even if your location has motorways, junctions and roundabouts, it should just "work" and do it all for you. The only caveat to make clear at this moment is that it wont auto generate anything above or below ground level, at least initially. Although I want to at least support auto generation of bridges in the future.
    You can change the number of lanes in a particular road before you generate it in 3D via the Inspector.

    Traffic - An optional add-on is planned that will support traffic and pedestrians, but the core CityGen3D system is concentrated on the scene geometry and want to get that working really well first.
    So definitely looking at next year before any serious work is done on that side of things, but it's a really exciting prospect and one I think can work really well given the source data. I'm basically looking at an automated solution that generates AI waypoints for you at the click of a button.
     
    HeadClot88, sharkapps and Neviah like this.
  30. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    A CityGen3D environment is made up of one or more 1km terrains, which are generated automatically from map data using rules you set up via the interface.

    I've been giving serious thought to how best to manage and support larger environments in CityGen3D.
    Historically, the issue was that multi-terrain cities were hard to manage within the Editor because you had to work on the whole city at the same time.

    But I've been improving the generator so that each 1km terrain tile (called a Landscape in CityGen3D) is now a self-contained scene and can be worked on in isolation.

    For example, you may pick a 4km x 4km location, but once the initial data download and setup has taken place, you could have only one or two of your sixteen terrains loaded in Unity for you to work on.

    This could be really good for bigger teams where you can have several people working on a level at the same time, or if you want to distribute some of the processing across a few PCs if you are generating very large environments.

    At the very least this is good groundwork to make it easier for people to hook up CityGen3D environments to third party world streaming assets.

    But I will be exploring the idea of having a run-time Landscape Manager that will load and unload these 1km scenes in the background as you move around your game world.
     
  31. trig-ger

    trig-ger

    Joined:
    Sep 1, 2018
    Posts:
    3
    Flexible auto-split of the city/terrain is handy, indeed.
     
    CityGen3D likes this.
  32. sharkapps

    sharkapps

    Joined:
    Apr 4, 2016
    Posts:
    87
    @CityGen3D I hope you will consider making the size of the terrains configurable. In streaming cases, it may be necessary to reduce the size to 512x512 or 256x256, depending on the amount of additional detail that is added to the scenes by the developer. I think it is great that you are taking this into consideration as you are building CityGen3D.

    -Tony
     
    CityGen3D likes this.
  33. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    For sure, when it's all working with 1024x1024 terrains it should be fairly trivial to expose this and let developers decide what to use for their own projects.

    I can see a use for CityGen3D in disparate projects, from flight-sim to first-person shooter (and many others), where the fundamental requirements of what you need on screen are very different. So it's certainly on my mind to accommodate different uses by offering that kind of flexibility.
     
    Bartolomeus755, sharkapps and Neviah like this.
  34. GamePyro

    GamePyro

    Joined:
    Jul 28, 2018
    Posts:
    116
    Hello

    You already have idea for the price ?
    and when release

    im willing to pay now to get early access or so !?

    and will it work also for montains and country side / villages ?


    also be great if you can integrate this assets:

    Room architect can make great houses.
    (because with Buildr2 no good country side / villages - houses that look good in FPS :( ) also that terrain gets flatten at montains hills etc under the houses.

    easyroads3d or if you streets / roads system work good then not.

    traffic auto generation lanes etc for
    iTS intelligent traffic system

    vegetation studio

    world creator

    R.A.M river auto material


    all assets with the name can be found in unity asset store if you not know all of them.


    if i have other assets etc and ideas i can wrote.

    regards
     
    CityGen3D likes this.
  35. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Hi,

    Thanks for your interest in the project!

    I'm hoping to get a beta build ready for release as soon as possible.
    I've delayed this a little bit to implement better support for larger environments (see previous messages in this thread).

    But aside from that, it's not far off and I'm in the final phases getting ready for first release before end of year.
    Difficult to put an exact date on it, but I'll keep people informed.

    Price is expected to be US$ 50 for first release, going up to around US$ 100 as the tool matures and more features are added.
    (So it will be better value to buy early and get involved in the beta phase).


    Mountains/Villages - yes, CityGen3D designed to work with diverse environments. I've posted some screenshots of Gibraltar on Twitter which is perhaps the best example so far of it creating uneven terrain.

    Buildings - I'll explain a bit about the workflow for adding buildings to a scene using CityGen3D. A key feature is prefab spawning around roads. This can be used to automatically place buildings in certain areas, such as houses in residential areas and shops in commercial areas. You can use whatever assets you like to create these prefabs and have CityGen3D spawn them in the right place.
    However, CityGen3D also has the data for individual building shapes and heights (where available) so before filling out your city with prefabs you'll be able to generate specific buildings direct from the map data. What I like to do is use BuildR2 for generating large buildings (big office blocks, etc), and then use the prefab system for filling the city out with houses. I've had very good results using BuildR2 so far, but it should be possible to add in support for any building system thats capable of taking a 2D volume and turning it into a building.

    Roads - The auto generation of roads is a key component of CityGen3D. This is done in such a way that CityGen3D will generate realistic looking road networks from map data with very little user input.

    Traffic - I am planning a separate AI module next year which will add traffic and pedestrians, but the core CityGen3D system will focus on the scene geometry. However I'll be trying to make it as easy as possible to hook-up existing traffic systems in the meantime. (CityGen3D will already know lanes in roads, it's just about exposing that in an intuitive way so it can be used externally).

    Veg Studio - CityGen3D has a built-in terrain detail spawning system which will auto paint the detail on your terrains for you based on the environment and rules you set. I've been using GPU Instancer to improve rendering performance, although I believe Unity are making improvements in this area anyway to take advantage of GPU instancing.
    However, you could generate the city and then use Veg Studio to generate the detail if you wish.

    RAM - I've not used that yet, but CityGen3D creates water meshes for you and you can assign custom shaders to them. I've been using Aquas with CityGen3D to good effect.
     
    Last edited: Sep 24, 2018
    Bartolomeus755 likes this.
  36. trig-ger

    trig-ger

    Joined:
    Sep 1, 2018
    Posts:
    3
    Will the roads look smoothed, without noticeable polygon segments for sidewalks and roundabouts?
    Smooth, for example, like here:


    In the pictures in the posts above there were line-segment "corners" along the sidewalks:



    --
    Although the textures of the roads are already impressive:
     
    CityGen3D likes this.
  37. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    That screenshot certainly seems to have more polys than in current CityGen3D roads.
    My default approach was to make the geometry as low-poly as I could get away with, but I agree, it does make sense to allow generation at higher resolution to smooth the corners more. (I think that's what you meant?)
    Leave it with me and I'll ensure this is user definable in future. Can't promise that for first release, but I like the idea of it being more easily configurable via the CityGen3D user interface, so I appreciate the feedback!

    You can assign whatever seamless texture you want for the roads and different highway types can have different textures.
     
  38. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    452
    This looks really good. If I wanted to use the map data but generate something that is medieval instead of moden is that possible? Dirt and gravel roads and paths? I am assuming the spawning of houses and props is arbitrary based on what prefabs I supply. It would be nice if, in addition to MicroSplat, it supported the use of Cascade for rivers and lakes (automatically.)
     
    CityGen3D likes this.
  39. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Hi Steven,

    Yes that right. In post #21 on this thread you can see how I assign different 3D prefabs to each map entity type. The spawning of buildings works in a very similar way, where you can assign different prefabs to different regions.

    Road and terrain textures can be any seamless texture, so they don't have to be "real" looking. I own some great stylized assets by Synty so I'll do a demo using those one day to show a more cartoon style city.

    I also like the idea of generating a Western themed environment using the map data, so I'm sure I'll give that a go sometime. But you essentially have complete control over the look of your scenes and could easily use prefabs from different eras or themes, depending on your project.
     
    StevenPicard likes this.
  40. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    452
    Sounds good.
     
    CityGen3D likes this.
  41. GamePyro

    GamePyro

    Joined:
    Jul 28, 2018
    Posts:
    116
    Hello,

    How you let place the prefabs at OSM buildings / house postions that they are not at or in the other because often houses etc are very near each other.

    Also is there a way to buy it now and get the current version and then when its at unity asset store get a voucher to get it at it.

    We can wrote also PM or so if you want.

    Im very very interessted in it.


    And can it work woth Unity 2017.1.1f ?

    Regards
     
    Last edited: Oct 10, 2018
    CityGen3D likes this.
  42. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    44
    Hi,

    Thanks for your interest in the project.

    Regarding OSM buildings, a key feature of CityGen3D will hopefully be it's ability to interpret the 2D data in such a way that it doesn't replicate erroneous data when generating the 3D scene. I've already implemented an option for clipping buildings so they can't overlap roads. I should be able to extend this to prevent overlapping of buildings against each other.
    For more specific control, you can also move the 2D building in the map from within Unity using the transform handles before you actually generate it. Eventually you also be able to modify the 2D data yourself within Unity (eg drag buildings into different 2D shapes before you generate them in 3D). But that wont be available until later in development next year.

    As for automatic placement of prefab buildings, they are placed in such a way that they can't overlap. A collision test is performed on instantiation and you have full control over the collision layers that are allowed and not allowed.

    CityGen3D isn't available at the moment, but I'm really keen to release the Beta as soon as possible. As soon as I have more information I'll let you know when you can get your hands on it. Unity 2017 will be supported.
     
    ZiadJ, HeadClot88 and StevenPicard like this.
  43. GamePyro

    GamePyro

    Joined:
    Jul 28, 2018
    Posts:
    116

    Ok thanks great.

    bzt as said we can talk in pm to get early access at it and test it and help you to find bugs and if it work or whats missing etc.


    regards
     
    ZiadJ and CityGen3D like this.