Search Unity

[RELEASED] CityGen3D - Procedural Scene Generation From Real World Map Data

Discussion in 'Assets and Asset Store' started by CityGen3D, Jul 8, 2020.

  1. CityGen3D

    CityGen3D

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

    I don’t think you can really scale down a real world environment to reduce distances between landmarks.

    Imagine you have a 2km environment with two terraced houses next to each other, and you scale that down to 1km.

    Either you scale the houses as well and there’ll be too small, or you don’t scale them and there’ll overlap.

    The solution is just not to oversize your game world to start with, sampling a smaller region.

    The 2D map editor also allows you to design any environment you want from scratch
    So from that point of view it is possible to condense varied biomes and locations into a relatively small region for gameplay purposes.


    EasyRoads is designed to work on Unity Terrains, so it works well on CityGen3D generated environments, if you want to manually place roads using the EasyRoads workflow.

    EasyRoads has its own OSM integration for procedural generation and it is possible to use that with CityGen3D generated terrains as well, although it requires custom mesh creation to join up complex intersections.

    I hope that helps but please let me know if you have any other questions.
     
    Weendie-Games likes this.
  2. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    I am getting FPS around 1.2 - 20. Performance is really poor.
    I have selected a 2km region using small scene size, and have ticked Scene Streaming in the Landscape Manager.
    When I start the game, every single landscape is loaded up, one by one. Is that how it is supposed to work? I though that as I move around, as the camera approaches a scene, it will load. No?

    I am adding prefabs to the "master" scene. Do I need to move them into the subscene that holds them?
    (I have "Trapper" master scene, and 64 subscenes.)
     
  3. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Hi,

    The range setting on the Landscape Manager controls how many scenes are retained in memory around the camera in all directions.
    If you literally only want the terrain that the camera is above to be loaded you would set range to zero, but in most cases you'll want this higher so terrains in the distance are loaded as well, but get unloaded as you move further away.
    For instance a range of 1 would give you an additional terrain in all directions resulting in a 3x3 grid of terrains that follow the camera around. (2 would be 5x5, etc)

    When you run your build, the Landscape Manager will load any terrains automatically one by one that are in this range. (You would likely hide this initial loading with a loading screen eventually).
    Then as you move around, only terrains within the specified range should be retained and loaded in as and when required.

    Here are some general tips to get the best out of the scene streaming:
    • Ensure you are using CityGen3D v1.02.
    • It should be tested in standalone builds. It will work in the Editor, but the scene loading wont be asynchronous and you'll get poor performance (This is a Unity limitation).
    • You should ensure no Landscapes are loaded in the Editor when you build your exe, so the scene streaming can handle this for you on start-up. It's a known limitation of the system at the moment that having Landscapes already loaded in memory are not identified as already being loaded at run-time, so this can cause issues.
    • Any objects you want to stream in with a Landscape should be a child of that Landscape, in much the same way that CityGen3D generates prefabs as child objects of a Landscape.
    I hope these tips help, let me know if I can clarify anything else further.
     
  4. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Okay, I see that my range is set to 2. I will lower it to 0 and see what happens.
    I have not tested a build yet, and now I see that I will have to move a lot of prefabs into individual landscapes. Did I miss this in the documentation?

    What do I do if my streets do not run along cardinal coordinates? I am working on a residential area first, and there are many fences, strip malls, bridges, and other objects that span multiple Landscapes. I assume that I now have to break up the prefabs into smaller prefabs.

    Is there a workflow that I can follow that explains how to setup the parameters, build the scenes, manually add prefabs, and gain performance? I think I may have to go 1 scene at a time rather than 64.
     
  5. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    This video talks about some of the concepts regarding setting up a project for larger environments and using the Landscape Manager for scene streaming.



    A range of 0 is unlikely to be desirable in most situations because it will mean only one terrain will ever be loaded at any given moment.

    Any object plotted on the 2D map, whether custom or from OSM data, will be added to the correct Landscape scene and saved for you when it's generated.
    So the direction of streets, or buildings overlapping terrains, is all handled automatically and shouldn't be a concern when building your environment. Have you run into a specific problem here?

    If you are adding prefabs to your environment manually you just need to add them to whichever scene you want them to be a part of, just like you would do normally.

    Are you attempting to create your own map from scratch in the 2D Map Editor and then generate it, or are you using real-world location data?
     
  6. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Seen it.

    I am using real time location data. My streets do not run N-E-W-S, they run kitty corner. This is because that is the way they look from space.

    upload_2020-10-12_23-16-29.png

    Because things don't run in straight north/south lines, fences don't run north/south either. Fences are not being created by CityGen. I am adding them manually. They cross scene boundaries.
     
  7. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    With regards to CityGen3D specifically, there are broadly two ways to get fences into your environment:

    1) You can draw them as Features in the 2D Map Editor. Then when you Generate Features, the fence will be extruded for you in 3D following the same path (just like it would be had it been mapped in OSM).
    A quick run through of the Map Editor is shown in this video. Sorry for the low volume on this one, you'll need your headphones at 100% :)

    The Map Editor is still fairly new addition to the toolset, but I want to make using this as fun and as easy to use as possible long term. For instance make it easier to connect nodes up to each other and generally improve usability.
    Therefore please to report any particular usability issues you encounter with it. The more feedback I get from people using the 2D Map Editor the better it will become.

    However, with this approach you don't need to worry about things overlapping terrain boundaries, CityGen3D will just generate it all for you and add objects to the correct scene.

    Here's a screenshot showing CityGen3D generating an area of London where fences and walls were mapped in OSM. Everything in this screenshot was generated/spawned procedurally from the 2D map data. (In this case the map came from OSM, but as I say, you could draw missing elements on the 2D map if you want to and get the same result in your location).

    screenshot5.png

    2) If you aren't specifically concerned about plotting precise fences to follow a particular route, you can also add them as part of a roadside prefab. The supplied House 05 prefab in CityGen3D has fences included and you can add these buildings automatically to your environment using the Roadside tab of the Generator.

    house with garden.png

    This screenshot shows a town being generated automatically in CityGen3D despite no house/fence data being mapped (a bit like your location). It just auto spawned the house prefabs in appropriate places in areas marked as residential using the Roadside rules of the Generator.
    screenshot3.png


    A more generic approach not specific to CityGen3D would be to use a Mesh Extrusion tool such as CurvySplines to extrude a mesh directly into the 3D scene. In this case you would need split your object appropriately at scene boundaries to add appropriate sections of it to the correct scene. Or more likely just make two separate extrusions, one in each scene, and have them join up together.

    I hope this gives you some ideas about the different ways you can approach supplementing the OSM data with your own features and prefabs.
     
    Last edited: Oct 13, 2020
    Mad_Mark likes this.
  8. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Excellent. Thank you. I will start over with a fresh project, and work on my 2D feature mapping skills. Sounds like the most efficient way to manage it.

    Do you want usability issues laid out here, or in an email?
     
    CityGen3D likes this.
  9. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    If you'd like to put specific feedback like that in an email that would be great.

    As I say, I'm aware of some of its short-comings, but the more people that start using it the more onus there is on developing that side of things further, and I'll get a better sense of what's needed to improve usability and workflow.

    Much of the focus up to now has been on getting OSM->3D working. But I think the tool has a great future for custom map editing too, so there should be some cool features appearing next year on this.

    In the meantime, zooming in quite a lot to do the more intricate things can help, but it really needs some sort of node snapping ability to take it to next level. So that's first on my list when I revisit it.
     
  10. JamesClow

    JamesClow

    Joined:
    Jan 2, 2016
    Posts:
    10
    Hi, thank you for your previous help, I have been able to create my large city landscape. One think I am having difficulty with at this point is getting the map to show for the currently selected database. It seems like the only way I can get the map to reflect the currently selected database is to go through "process" again which takes many hours. I found that when I switched database I couldn't generate any elements for it. Now I realize that it's behaving as if the database I've selected isn't the current one which is why it won't generate houses or show the map for the currently selected database. Is there any way of getting it to switch to the currently selected database without having to process it again? (I'm using 1.02). I'm certain it will be me missing something very simple but for the life of me I can't see what I'm doing wrong.
     
  11. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Hi James,

    Oh I replied to you via email a while back on this topic, but I'll post my reply again here anyway as it's probably useful info for everyone:

    Unfortunately as things stand at the moment it does require re-processing of the map each time.
    I'm aware that this probably the most annoying part of the workflow when working with larger environments, and I need to give it some more thought on how best to improve this.

    A processed database is basically one which has map objects parented to the CityGen3D object. However to reduce overheads, this is overwritten each time you process a map.
    I'm going to experiment with different ways to preserve CityGen3D data so it can be saved and loaded more easily when you load a database, then there'll be no need to actually reprocess it and it will just need to be loaded back in.

    So while I can't promise a quick solution here, it is something I'm aware of and is definitely something I will be looking to improve on long term.

    In the the short term, manually saving the CityGen3D game object after processing and loading it back in may alleviate some of the pain, if you can find a good manual workflow for doing that in the meantime.
     
  12. JamesClow

    JamesClow

    Joined:
    Jan 2, 2016
    Posts:
    10
    Thanks for the tip, I'll save the CityGen3D game objects :).
     
    CityGen3D likes this.
  13. chmodseven

    chmodseven

    Joined:
    Jul 20, 2012
    Posts:
    120
    I'm not sure if this is an issue/limitation or something I'm doing incorrectly, but I have noticed in testing a very large area that tiles far from the origin point don't seem to get processed properly.

    In the test involved, I placed an origin coordinate far to the southwest of the city's centre, the idea being that I could increment from there to the tile x,y areas that I wanted to keep the tile numbering and origin point good. Then, with terrain size of Large and axis increased to 1000, I navigated using the arrows to around tile 180,170, did the Download and then hit Process. Both of these appear to complete successfully given that objects do get added in the hierarchy, however in the Map view none of the road/surface etc objects in the hierarchy are showing up in the Map window (or the Scene view) and doing a Generate won't produce anything either. However, if I process a tile with x,y closer to the origin then it works as normal. I also tried keeping to the default of axis 100 and found that tiles still have the issue.

    I spent a bit of time trying to find a pattern but couldn't in the end - sometimes the surface gets placed but the roads when you try to F for focus on them are miles from the tile, and sometimes the surface isn't there at all. Anyway here's the lat/lon and tile values if it helps you debug:

    2020-10-17 15_40_44.png

    Another possibly related issue I came across in the process is when you concatenate tiles (i.e. turn Auto Clear off and process multiple tiles via incrementing the arrows). It looks like when a surface (and possible other types) has the same name as that used by a previous tile then the coordinates or display can get messed up. For example these tiles have "Grass (Land)" and two of those get created in the hierarchy but the bottom left one you can see isn't showing anything. However, if I process one tile, move those objects out of MapSurfaces to a new empty and then process the second tile, it works fine. This suggests to me there's some sort of loop through during the processing that's not expecting the case where existing objects of the same name might already be present.

    2020-10-17 15_33_16.png

    Cheers!
     
    hopeful and CityGen3D like this.
  14. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    I think most likely cause is that the physics engine isn't working properly that far from origin.
    CityGen3D uses batched raycasts in various systems, so if they are not working at extreme distances that would cause issues.

    I have previously experimented with an option where CityGen3D will generate your current region local to Unity origin.
    So the good news is that I already have a head start on a possible solution to this.
    I will likely revisit that and work out what needs to be done to make that a viable option.
    I'll run some tests here, and let you know when I have more news.
     
    chmodseven and hopeful like this.
  15. chmodseven

    chmodseven

    Joined:
    Jul 20, 2012
    Posts:
    120
    Okay, thanks for looking into that. I never knew raycasts were being used, so that's kinda fascinating to learn. :)

    One thought I had to make tiling away from the origin easier, although I'm not sure how feasible it is, would be to allow for negative numbers, so that you can tile south or west away from 0,0 and have say a -1,-1 tile recognised in the naming and by the landscape manager. It feels a little cumbersome at the moment to have to guesstimate a suitable origin way down to the southwest, whereas being able to define an origin at the beating heart centre of your city and then spread out to tiles in any cardinal direction would feel more intuitive.

    Alternatively, if negative tile numbers aren't possible due to an implementation limitation, perhaps an option for setting the "origin tile ID" to some explicit value rather than 0,0 - i.e. if axis is 100, maybe allow the centre to be overridden to say 50,50 or some user values that best suit the city involved. That way you could still go southwest from the centre until you hit the 0,0 or northeast until you hit the axis,axis limits. I don't imagine that the tile index matters all that much to the majority of the logic as to whether it's positive or negative or offset, other than for naming and the landscape manager, so hopefully there's some possibilities there.
     
    CityGen3D and hopeful like this.
  16. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Hey i just bought the city gen last week...have not used it much but i really do Like what i have been able to do so far, im just wondering how powerful is it, like is possible at the moment to export the map after being generated to work in a external application Like Blender or even Unreal engine? I know not with the building facades and water shaders and everything but like the shape of buildings and the generated layout of the environment generated by osm?
     
    CityGen3D likes this.
  17. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    CityGen3D generates Unity terrain objects and normal Unity meshes.
    So while the tool itself doesn’t have any export system (aside from being able to save scenes as normal), Unity is full of third party tools for doing this type of thing.

    A few that spring to mind are the FBX Exporter for meshes and Exodus for Unity->Unreal.
    I'm aware MicroSplat also has a terrain to mesh module.

    I think I've used FBX Exporter before but not the other two yet, so I'd be interested in hearing how you get on if you use them with CityGen3D at all.

    Main thing to keep in mind is that the built in scene streaming is designed to work specifically for the Unity terrain workflow, so while you may be able to export content out of Unity, getting it back in and all working again may be tricky, depending on exactly what you want to do.

    Also keep in mind that CityGen3D is designed so that you can hook up your own prefabs and textures before 3D generation, rather than exporting it and modifying afterwards.
     
  18. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Wow that is amazing news because i thought the reply would just be an outright no , so im glad there is some light at the end of the tunnel for possible conversion. I would mainly just want the terrain data and possibly the buildings without textures for grey boxing so im pretty sure this will work very well in my case, and I will definitely be posting my results here for you and others to see, Thanks so much!!
     
    CityGen3D likes this.
  19. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Yeah what happens behind the scenes is pretty cool at times!

    A more specific example is that when you run the Generate action for terrain texturing on the SplatMap panel, CityGen3D fires off over a million raycasts at the 2D map (Large terrain 1024x1024) to identify the surface type at each point before calculating how it should texture it based on the rules you have defined on the SplatMap panel.

    It also fires another million raycasts at the terrain to query the height map altitude and gradient so you can use that data in your rules.

    Thanks to Burst and Jobs this all happens in just a second or two and long term I should be able to make it even quicker. :)


    Completely agree with all your other points. The tricky bit tends to be ensuring I don't break existing projects with changes, so it will be baby steps towards improving this over time.
    The first one is if you press Shift while selecting your location in v1.02, CityGen3D will set the origin keeping your clicked location in the middle of current region.
     
    chmodseven likes this.
  20. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    You made tremendous progress on this asset over time. Good work!!

    One thing I've wanted to see improved in CityGen3D is the spawning of vegetation and trees. More organic look with random tree sizing (within ranges) and rotations. Also, rivers and lakes need some sort of shore or softening of the edges to look more natural.
     
    CityGen3D and chmodseven like this.
  21. chmodseven

    chmodseven

    Joined:
    Jul 20, 2012
    Posts:
    120
    One more small usability request: I was running an 8x8 large tile generate yesterday, which took several hours as expected. I wanted to leave that running in the background and do other things with the PC, however the progress popup bar keeps leaping back to the centre of the screen every time it finishes a step. If there's a way to somehow set an option to turn that popup off and restrict to just the console logging, that'd be great, as it would allow for more of a "batch mode" way of getting through long processing jobs without tying up the machine or constantly having to move the popup over to the edge.
     
    hopeful and CityGen3D like this.
  22. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    I actually looked into the tree spawning recently, but the tree range settings seems broken in Unity as far as I can tell.
    No matter what you specify as a valid height and size range, Unity ignores it on the 3D object and only applies it to the billboard. I speak more about this here so I'd be interested if anyone else can reproduce this problem. That is, add a tree prefab and set different size ranges via the Terrain Inspector and see if it makes any difference or not when you paint them on the terrain, because in my experience it doesn't. But not sure if that's a specific issue with certain tree prefabs or not.
    The Vegetation Studio Pro integration is also in progress and expected for release before Christmas. This will allow you to use the VSP systems for defining biomes and have these biomes linked to CityGen3D surface types.

    You can apply heightmap smoothing to help with the hard edges, although I agree it's harder than I want it to be to get good results here at the moment, so I'll definitely look at this again.
    Another feature on the horizon which will help to make roads and rivers look better is automatic spline interpolation between the data points. This will help to make roads and rivers curve around corners more naturally (albeit at the expense of more polys), so I'm quite excited for this feature.
     
    StevenPicard likes this.
  23. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Actually I think Jeff requested something similar once, so I'll bump this up priority list.
     
  24. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    Interesting. I'll see if I can reproduce it. BTW, I'm just throwing this out there, but perhaps the item could be spawned and then the transformation applied?
     
  25. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    @CityGen3D Hey so i have actually just decided to stay in Unity instead of trying the whole Unreal export, even though it might have been interesting. I do have a question about CityGen i think this will be a yes but still thought I'd ask, As I understand 3d models can be changed to whatever you'd like but. is it possible to swap out the terrain for another system like Gaia or another terrain system, I want to create a lowpoly city but use the osm data including terrain height map data.
     
    CityGen3D likes this.
  26. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    This post and those just before it talk about using Gaia (and third party terrains in general) with CityGen3D.
    I've not yet had chance to try it myself but other users have experimented with this and it is possible.
    If you do try it it would be great to get additional feedback as I'll be looking to improve the workflow here in future.
     
    Aaron2348 likes this.
  27. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Awesome, Thanks for the link
     
    CityGen3D likes this.
  28. WizzleOfOZ

    WizzleOfOZ

    Joined:
    Nov 16, 2018
    Posts:
    30
    First I must say this is an awesome asset. I have been using this in HDRP an it looks amazing, my only problem comes from the roads having black spots on them, any clue on how to fix this? STREET ERRORS.jpg
     
    CityGen3D likes this.
  29. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Thanks, I'm happy to hear you are enjoying it!

    As you have discovered, CityGen3D does broadly work in the SRPs already, but I'm in the process of finishing off an official HDRP package at the moment, which has all materials and shaders converted over.
    It shouldn't be more than a week or two away. A URP package will likely come later in the year.

    Main thing to keep in mind for HDRP is that the Unity terrain shader only supports 8 materials at once (compared to 16 in the legacy pipeline), so any additional ones will not be rendered correctly. Any black texturing on the terrain will likely be because it's referencing a texture outside this range.
    CityGen3D doesn't put any restriction on the interface in case you use a third party HDRP terrain shader that supports more than the Unity shaders can, although I'll see if I can drop a warning on the SplatMap interface at some point if it looks like you've gone over the default limit.

    I'm interested to find a reproducible example for the spotting of the texturing.
    If you'd like to share your location settings (lat/lon, area+terrain size) I can run some tests here and hopefully include a fix in the next update.
     
  30. WizzleOfOZ

    WizzleOfOZ

    Joined:
    Nov 16, 2018
    Posts:
    30
    When looking in the terrain layers I have 14 different ones. I'm going into the splatmaps and reduce the different terrain materials most will be able to share the same types.
     

    Attached Files:

    CityGen3D likes this.
  31. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    @CityGen3D hey so i was tryna practice generating some data of a harbour the problem is i don't see the ocean generating is there somewhere else i generate water?
     
    CityGen3D likes this.
  32. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Hi,

    Please see the Coastline section of the manual for details on how to process coastal regions correctly.

    Once you have done that, CityGen3D will be able to identify land/sea boundaries and you can click Generate Ocean on the Water window to add a water plane to your scene.
     
  33. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    I'm delighted to announce that CityGen3D is included in the Unity Best of Super Sale.
    You can get it for half price until December 4th. :)
     
  34. dajnooo

    dajnooo

    Joined:
    Feb 22, 2019
    Posts:
    12
    How big can the environment get? Is it possible to for example drive from one country to another?
     
    CityGen3D likes this.
  35. CityGen3D

    CityGen3D

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

    There’s technically no upper limit as to the size of your world in CityGen3D.
    Each terrain tile can be up to 1024 metres in size and you can generate as many of these as you want to in the Unity Editor, time permitting.
    You are really only constrained by build size, which naturally will increase for every terrain tile you have in game.

    To be honest, the main constraint when considering the scope and scale of a project is whether you have the human resources to manage it, rather than any technical constraint.
    Because once you get over a certain map size it’s quite difficult to manage from an art and content perspective, even for larger studios.

    So my recommendation is always to prototype a project in smaller environments. This will allow you to iterate on design and development much more easily (and you'll have much more fun). Then you can increase the scope and scale later on as appropriate.

    This tutorial video explains the CityGen3D workflow and some of the considerations you have to think about when making large environments. If you have any further questions just let me know.
     
    dajnooo likes this.
  36. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Hi everyone,

    I just wanted to gauge peoples opinion on minimum supported Unity version for CityGen3D.

    My current preference would be to increase this to 2019.4 LTS from the current earliest supported version of 2019.1.1
    This allows people to stay on the 2019 tech stream, but keeps them on the LTS version so they have increased stability with the latest Unity fixes.

    I get occasional support requests from users still on 2019.3 and some earlier Unity releases had quite bad bugs in regarding asset import and compiler issues, which are now fixed in 2019.4 (and when users upgrade everything works fine).

    Another added advantage of this is that I can keep the upcoming CityGen3D HDRP package release in line and support 2019.4 LTS as minimum version, whereas Unity HDRP wasn't out of preview back in 2019.1

    Is there anyone reluctant to upgrade from an earlier 2019 version to the LTS, that wouldn't be happy about losing 2019.1/2/3 support, or does a minimum version of 2019.4 LTS make sense to you?

    Thanks in advance for any feedback!
     
  37. chmodseven

    chmodseven

    Joined:
    Jul 20, 2012
    Posts:
    120
    2019.4 LTS is fine with me. I’ll never go older than the most recent LTS anyway.
     
    StevenPicard and CityGen3D like this.
  38. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    I'm in complete agreement.
     
    CityGen3D likes this.
  39. miuulm

    miuulm

    Joined:
    Aug 8, 2018
    Posts:
    3
    For me as well.
     
    CityGen3D likes this.
  40. takeuchihidekijp

    takeuchihidekijp

    Joined:
    Mar 2, 2018
    Posts:
    5
  41. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Hi,

    The easiest thing to do is just to select the same location from within CityGen3D using the built-in OSM map.
    This will give you precise control over terrain tiling and ensuring you get the data you need to cover your intended environment.

    Here's a screenshot showing how you would select a similar region in the Unity Editor using CityGen3D:

    japan.png
     
    takeuchihidekijp likes this.
  42. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Hi,

    The latest update for CityGen3D is now available!

    103_update.png

    Please note that v1.03 is supported on Unity 2019.4.15 LTS or later.
    If you are still on an earlier version of Unity 2019 please update to the latest LTS version for improved stability and all recent Unity fixes.

    If you wish to use CityGen3D with the High Definition Render Pipeline, simply create a new HDRP project and locate the CityGen3D HDRP package inside CityGen3D\Packages.
    You only need to extract that, as shown in the image below, and then you can import that package into your project instead.

    hdrp_import.png

    For Built-In Render Pipeline, import the contents of the main package as normal, although you can save some disc space by unchecking the HDRP package if desired.

    The only important thing to remember is that you only need the contents of one of the packages in any project, they both contain all libraries and assets set up appropriately for the chosen render pipeline.

    A Universal Render Pipeline package will be included in a future release and other third party integrations will be made available from this Packages folder in future as well.

    Here's the changelist for v1.03, which includes some fixes requested in this thread:
    • Minimum supported version now 2019.4.15 LTS.
    • HDRP package now included for use with HDRP projects. (Extract CityGen3D\Packages\CityGen3D HDRP v1.03.unitypackage and import this instead for use with HDRP).
    • Fixes to location map to prevent attempts to download invalid map tiles.
    • Removed limit of 4 prefab output slots.
    • Added alternative Generator prefab to demonstrate how you can use different Generator configs for different purposes and art styles.
    • Editable Layer field for MapRoads.
    • Road texturing fix.
    • Fix for custom road surfaces not generating sidewalks.
    • Fix for Unity Editor periodically regaining focus when hidden during processing.
    • New skybox courtesy of AllSky.
    As always, please backup your existing projects before attempting any update.
     
    Last edited: Nov 24, 2020
  43. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    I tried out CityGen3D 1.03 on Unity3D 2019.4.15 LTS but I'm missing splat maps and ocean. Did I do something wrong?

     
  44. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Please can you confirm whether or not this is HDRP and whether it’s a new project?
    If you have updated an existing project you should remove your CityGen3D and Generator objects from your Hierarchy and add them back in to ensure you are using the updated versions.

    If you can send me over screenshots of your Location window, generated 2D map (Ctrl+M), and Splatmap window, that should be enough for me to understand what’s happened and run the same test here if needed.

    Thanks.
     
  45. takeuchihidekijp

    takeuchihidekijp

    Joined:
    Mar 2, 2018
    Posts:
    5
    Thank you for your response. I was able to do it the way you taught me.
     
    CityGen3D likes this.
  46. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    I created a new project and didn't use HDRP. I had the problem last night. I turned my computer off before going to bed. This morning, I turned on my computer and when you asked me to take screenshots, there are splat maps and I think that there is ocean.



     
    hopeful and CityGen3D like this.
  47. takeuchihidekijp

    takeuchihidekijp

    Joined:
    Mar 2, 2018
    Posts:
    5
    Hello. I'm trying to get my character working on a map created with CityGen3d.
    I have a question about Collider. For example, when setting Collider in Sidewalks of the generated map, which layer should be set?
     

    Attached Files:

  48. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Sidewalk meshes will have mesh colliders generated automatically in the Highway layer, so there shouldn't really be much to do there.
    So worth checking the Physics Collision Matrix just to be sure that is detecting that collision.
    Often you'll find the issue is with the character collider being in slightly the wrong position rather than a collision not being detected.

    What I sometimes do is drop a ball gameobject with rigidbody into a scene to see if that behaves as expected.
    It can be easier to debug something simple like that first. Once you know that's all working its much easier to setup a character knowing the fundamentals are definitely all ok.
    However that can be too much fun, I've wasted countless hours watching balls bounce around a CityGen3D scene for no reason other than for "testing" :)
     
    takeuchihidekijp likes this.
  49. Toby31

    Toby31

    Joined:
    Jul 7, 2014
    Posts:
    70
    Hi currently looking to purchase your asset as it looks great for quick generation of a city based on map data, can your own models replace the ones you get with the package and materials be replaced on the buildings?

    Any help would be greatly appreciated, thanks in advance :)
     
    CityGen3D likes this.
  50. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Hi,

    Yes you can hook up your own prefabs and textures to CityGen3D to suit your own art style.

    Buildings use an atlased material which is a grid of textures for different facades of the building.
    So that’s probably the hardest to replace but it is possible with a bit of work.

    Everything else is pretty much just a case of swapping prefabs or textures over via the Generator interface.