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.
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.
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.
Is there an ETA for the Beta? I really want to get my hands on this.
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).
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.
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:
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.
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?
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!
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.
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.
@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.
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.
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.
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.
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.
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.)
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.