Search Unity

World Building [RELEASED] CScape - advanced building generator

Discussion in 'Tools In Progress' started by olix4242, Mar 11, 2017.

  1. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Hi, you should download CDK (content developement kit) package. Link is provided in CDK folder.
    After installing this package, you will find a new folder in your poroject (SCapeCDK). Then navigate to Shop Signs folder.. and here you can edit your shop signs.
    Afterwards, you have to compile textures with CS material tools by clicking on Compile all textures.
     
    3Zero8 and badradionz like this.
  2. theonerm2_unity

    theonerm2_unity

    Joined:
    Sep 7, 2018
    Posts:
    131
    Hello. I'd like to add my own buildings to this and just see how it looks. For example I bought the suburban neighborhood house pack. It comes with premade houses. Is there anyway I can put these houses into CScape and make it make a suburban style area? The documentation doesn't say if I can do this.
     
  3. theonerm2_unity

    theonerm2_unity

    Joined:
    Sep 7, 2018
    Posts:
    131
    Nevermind I think I see how it's done now.
     
  4. theonerm2_unity

    theonerm2_unity

    Joined:
    Sep 7, 2018
    Posts:
    131
    Nope. I thought just adding prefabs into the building template would do something but it just gives an error.

    NullReferenceException: Object reference not set to an instance of an object
    CScape.CityRandomizer.Generate () (at Assets/CScape/Scripts/CityRandomizer.cs:398)
    CScape.CityRandomizerEditor.OnInspectorGUI () (at Assets/CScape/Editor/CityRandomizerEditor.cs:504)
    UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:501)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  5. Lazy_Eight

    Lazy_Eight

    Joined:
    Aug 26, 2019
    Posts:
    16
    I can't seem to find the city's UV map, each building main texture MegaCity1 seems to be hard-coded into the array. I want to access the city's UV map or the textures in the array so I can change it up to make my cel-shaded city. Is there anyway to do this? Thanks.
     
  6. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687

    I am not the developer, but I have been working with the asset for a year plus. You cannot add your own assets to this. You can make "Building Templates". I wrote up some documentation, and while it's not complete it may be of some help. Look at Step Two, but really, read all of this

    Info by Developer

    Videos
    I highly recommend creating a testbed application to learn how to use this asset. Cscape is an impressive application, however because of the large number of capabilities and options you should take some time to learn to use this in a safe and separate project before integrating it into an existing game.
    1. Add Cscape asset to game
    2. Add Standard Assets to game (some components used in Cscape)
    3. Add Cscape Toolkit Source: https://www.dropbox.com/s/8desklhixvtvr6g/CScapeToolsetSources.unitypackage?dl=0
    4. NOT NEEDED Add https://www.dropbox.com/s/cim4di0xpi53pdn/ShaderPatch2018.0.2f.unitypackage?dl=0


    Cities can have one or more Districts. Districts have one or more Prefab (fbx) templates. Templates are a collection of Facades on a mesh.


    Basic relationship
    • Cities
      • Districts
        • File Location: Assets/Cscape/DistrictTemplates
        • Prefabs
          • File Location: Assets/Cscape/Editor/Resources/BuildingTemplates/Buildings
          • Material: All buildings will use the same Material. The default Material is MegaCity1
          • Building Modifier script
            • FAÇADE SHAPE (Façade is spelled wrong all over)
            • Shape: Values 0 to 9
            • Front Façade Shape. Don't know what this does
            • Lateral Façade Shape. Don't know what this does
            • Subdivision Shape. Don't know
            • Height Subdivision. Don't know
            • Width Subdivision. Don't know
            • MATERIAL STYLING
            • Façade Material 1 (front/back): Values 0 to 9 - These relate to basecolor_surface_01.png to basecolor_surface_10.png These images can be found at Assets\CScapeCDK\Editor\Resources\CScapeToolset\Surfaces
            • Façade Material 2 (front/back): Values 0 to 9
            • Façade Material 1 Lateral: Values 0 to 9
            • Façade Material 2 Lateral: Values 0 to 9
            • Rooftop Material: Values 0 to 9
    Base Process
    1. Create Facades. Optional
    2. Create Building Templates . Optional
    3. Create Districts. Optional
    4. Change / Update Textures. Optional. A GREAT site for textures: https://gametextures.com
    5. Create City
    6. Adjust specific buildings

    Step One: Facades. Optional

    Facades are 2D objects that are templates used by Cscape to make buildings. There are 40 facades. Each building can have one or more facades. You can review and change values on the "Building Modifer" script on each building in a scene. (Step 6)
    1. Open the scene CScapeToolkit. This is found Assets/CScape
    2. Select the "CscapeBaker" in the Hierarchy.
    3. Set the lock icon (upper right) in the inspector so that the Baker does not move away as you adjust windows, etc.
    4. Split your windows so you can see the Game and Scene side-by-side. The Game window will show you a 3D representation of what it will look like. The Scene view is 2D. Note: In the Scene tab select the "2D" button, near the top left.
    5. Set any of the 40 tiles as desired. (ie: add, remove, move windows and other objects within the Tile. Press the Previous/Next Tile buttons to navigate.
      1. 1 - 21 are façade styles with windows
      2. 22 - 31 are walls
      3. 31 - 34 are ground level facades.
      4. 35 - 40 ??? I, JamesWjRose, do not know
    6. Press the "Bake Textures" button on the SCcape Toolset "CScape Toolset Manager" script
    7. At this point we are done with the CscapeToolkit scene. Switch back to a game scene, create a new scene if necessary.
    8. If you have not added a "Cscape City" to the scene, do so. Select the "GameObject" menu, then select the "Cscape" menu, then select "Create MegaCity"
    9. Select the "CScape City" in the Hierarchy
    10. Find the "CS Materials Tools" script attached to the CScape City

    Step Two: Building Templates. Optional

    Step Three: Create Districts. Optional

    • The included Districts can be found at: Assets\CScape\DistrictTemplates
    • If you want to create your own District select one of the Districts and then press CTRL+D to make a copy.
    • Select "Cscape City" from the Hierarchy
    • Within the "City Randomizer" script there is a "Building Templates" section (3rd section down) From here you can add, delete or change Districts.
    • Double-Click on the District/Building Template that you want to modify. From here there are only two options:
      • Size: The number of templates available for this district
      • Elements: Add, delete or change templates

    Step Four: Change / Update Textures. Optional

    • There are 21 textures, and there associated Normal, Metallic, Roughness images, can be found at: Assets\CScapeCDK\Editor\Resources\CScapeToolset\Surfaces
    • "_01" to "_10" are for walls.
    • "_11 to _21" are for roofs.
    • https://forum.unity.com/threads/rel...uilding-generator.460380/page-25#post-4227154
    • Texture size info: https://forum.unity.com/threads/rel...uilding-generator.460380/page-24#post-4029151
    • Additional info: https://forum.unity.com/threads/rel...building-generator.460380/page-2#post-3150851
      • 1-21 are facade styles with windows
      • 22-31 are walls
      • 31-34 are ground level facades
    • Note from the asset author: Facade mat 1 and Facade Mat 2 can be any of the surface textures from range -01 to 10. They are used as combinations. Let's say if 01 is a brick texture, and 05 is a concrete, using Facade mat 1 set to 01, and Façade mat 2 set to 05 will give you façade with combination of those two surfaces. If you invert values, you will have a same combination, but in inverted mode. As for "front" or "side" assignment, you can assign different textures to front/back side of a building. or to lateral sides of a building. (front side is a side that is facing streets). https://forum.unity.com/threads/rel...uilding-generator.460380/page-25#post-4227169
    • TODO: find which items are created and added to the Material. Currently, when hitting "Compile All Textures" is affecting which files? It looks like all the files in this folder: Assets\CScape\Editor\Resources\TextureArrays\CScapeToolset are affected and they are added to the Material, right?
      • Process for creating new city Material:
      • Make a backup of "Assets\CScapeCDK\Editor\Resources\CScapeToolset\Surfaces" ie: "Surfaces - Original Set"
      • Make a backup of "Assets\CScape\Editor\Resources\TextureArrays\CScapeToolset" ie: "Array - Original Set"
      • Make a duplicate of the "MegaCity1" Material and change the name to something that is more appropriate than "Megacity1 copy"
      • Change the array images in the Material "MegaCity1" to the array images in "Array - Original Set" (to insure that there is an original set and material
      • Change images as desired
        • "_01" to "_10" are for walls.
        • "_11" to "_21" are for roofs.
        • "_31" to "_34" are ground level facades
      • Select the City in the Hierarchy.
      • Select the "<todo>" script, and expand the "<todo>" section and change the Material from "Megacity1" to the new material name
      • Press the "Compile all textures" button
      • Copy the array images in the: "Assets\CScape\Editor\Resources\TextureArrays\CScapeToolset" folder to a new folder, likely named as the same as the material name.
      • Open the new material, and change the images in that material to the new folder.
      • Change the city's material to the new material
     
  7. theonerm2_unity

    theonerm2_unity

    Joined:
    Sep 7, 2018
    Posts:
    131
    Thank you so much for that reply. It has been very helpful.
     
    JamesWjRose likes this.
  8. rrahim

    rrahim

    Joined:
    Nov 30, 2015
    Posts:
    206
    I've got to bookmark this post.
    Great write up. Thank you.
     
    JamesWjRose likes this.
  9. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    You're welcome. It's a great and throughout asset, but it suffers from lack of documentation and videos.
     
    rrahim likes this.
  10. Lazy_Eight

    Lazy_Eight

    Joined:
    Aug 26, 2019
    Posts:
    16
    Thanks JamesWjRose
     
    JamesWjRose likes this.
  11. yokeshram

    yokeshram

    Joined:
    May 17, 2017
    Posts:
    4
    After updating from 2017.4 to 2018.4.11f I'm facing error as follows
    1)Assets\Standard Assets\Characters\FirstPersonCharacter\Scripts\HeadBob.cs(3,27): error CS0234: The type or namespace name 'Utility' does not exist in the namespace 'UnityStandardAssets' (are you missing an assembly reference?)
    2)And my city looks like without textures(Image attached )

    3) And UnassignedReferenceException: The variable streetDetails of CityRandomizer has not been assigned.
    You probably need to assign the streetDetails variable of the CityRandomizer script in the inspector.
    CScape.CityRandomizer.StripScripts () (at Assets/CScape/Scripts/CityRandomizer.cs:1090)
    CScape.CityRandomizerEditor.OnInspectorGUI () (at Assets/CScape/Editor/CityRandomizerEditor.cs:560)
    UnityEditor.InspectorWindow.DoOnInspectorGUI (System.Boolean rebuildOptimizedGUIBlock, UnityEditor.Editor editor, System.Boolean wasVisible, UnityEngine.Rect& contentRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1647)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     

    Attached Files:

  12. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Just delete "Assets\Standard Assets\Characters\FirstPersonCharacter\Scripts\" folder. This folder contains Unity Standard assets (for demo purposes) that aren't included in Unity anymore.
     
    JBR-games likes this.
  13. ncho

    ncho

    Joined:
    Feb 1, 2014
    Posts:
    99
    Hi, is it possible to have CScape generate the city based upon an existing street layout, map or any sort of guide, or is the generation completely random?
     
  14. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    @ncho Oliver is currently working on a feature that allows you to convert simple building-shapes, that you can retrieve from OSM for example, into CScape buildings. So you could cut out a city or part of it with open street map, use one of the tools on github to convert this data into building-shapes and then let CScape awesomify this :)
     
  15. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    Can you link to an appropriate tool on github?
     
  16. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    One of them would be
    https://github.com/codehoose/real-world-map-data
    which has even a video


    But there are several out there and you have to choose one depending on your needs. The main difference is how they construct the buildings (for example 1 simple building or using more of the data and construct more complex buildings with different smaller parts attached to the buildings) out of the delivered data and how they cope with incomplete data. Unfortunately there is no solution that fits all the needs of all the different developers, but the first one is very good and also a good starting point in case you have other needs.
     
    JBR-games and hopeful like this.
  17. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    240
    Is HDRP support still on your roadmap. I am playing in 2019.3 and they are actively moving out of .Experimental.HDPipeline namespace to now just part of UnityEngine namespace without experimental.

    I know you were working on LWRP for a while - and now with change in 2020 going to Universal instead of LW/Standard I get you are jumping through a lot of hoops. Perhaps HDRP would get you eye candy to get more sales. Esp. as it is performance ready.

    Mainly just looking to learn more about the roadmap for this asset and if there will be a discount for owners of present version.
     
  18. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    HDRP test version of shaders: https://www.dropbox.com/s/qbvyw7ivqq6671t/CScapeHDRPSupport.unitypackage?dl=0
    LWRP test version of shaders: https://www.dropbox.com/s/00jv74djg6fojor/CScapeshadersUpdateLWRP.unitypackage?dl=0
    Unfortunately, HDRP pipeline is far from finished, and there are still some really important things that are missing in HDRP. So, expect to get worse shading quality, missing features like Re-lighting, and much worst performance (from my tests, about 5 times worst FPS). I really don't see any point on going HDRP at this moment. We even don't have the possibility to create custom post processing effects (and this is a huge deal breaker as Re-Lighting requires this).
     
    Hawk0077, Rowlan, Stephen_O and 3 others like this.
  19. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    240
    Thanks for trying. HDRP certainly seems to be its own ball of wax to be sure. What version where you playing in when trying to get it working for the better?
     
  20. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    2019.2 (latest final Unity version) with latest HDRP (6.9.1)
     
  21. kns1966

    kns1966

    Joined:
    Nov 6, 2016
    Posts:
    13
    First, I've owned CScape for a while but have yet to explore or even open. Are the various dropbox links meant to bring the package to the current working - unreleased - version or just isolated features for testing?
     
  22. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    The only one that could be needed is this one: https://www.dropbox.com/s/2zsdzx4swv01sr2/CScapeStreetBlackFix.unitypackage?dl=0
    But only in a case if you experience a problem with black streets. This problem happens on some Unity versions (probably due to a bug in Unity).
     
  23. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    214
    Can Cscape be used to create a small city for use on an oculus quest (Android VR system)? If so do you have any documentation or suggestions on getting it to run within the required fps? I've tried it and whilst it ran the performance was unusable when you moved your head. Would using LWRP help at all? Im currently using 2018LTS.
     
  24. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Hi. I don't own Quest so I don't really know it's capabilities and overall power.
    Few things that you can do:
    -turn off realtime shadows
    -turn off (in project quality settings) anisotropic textures (this usually boosts framerates)
    -turn off POM in Cscape (parallax occlusion mapping)
    -bake occlusion culling

    If this doesn't well enough and you have time to test Quest performance, contact me in private and I can try to put my hands on various shader versions and see what optimizations should be done.
     
    JBR-games and blacksun666 like this.
  25. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    273
  26. batman2211

    batman2211

    Joined:
    Sep 16, 2017
    Posts:
    10
    Hello. I just purchased the assets yesterday and would like to ask how can I get the buildings like in this old video?

    Thanks
     
  27. hels46221

    hels46221

    Joined:
    Dec 4, 2019
    Posts:
    1
    CScape is a next-gen advanced procedural building generator. Main strength of this plugin is that it uses serious drawcall optimizations. This is done by possibility to use only one one-pass shader/material for a whole city landscape. This resultts in a extremely optimized performance while using Static/Dynamic Batching or Occlusion Culling.
     
    JamesWjRose likes this.
  28. startupstor

    startupstor

    Joined:
    Aug 3, 2019
    Posts:
    8
    Just bought the asset very excited, 1 big question.
    How hard would it be to integrate something like this into the city generator.
    https://assetstore.unity.com/packages/3d/environments/urban/walking-street-85895
    This asset is basically just dining al fresco on a wide sidewalk. I don't own the asset but it can be easily recreated if Cscape can integrate its generation, if not that's fine I'll just place it manually, or at least can Cscape generate extra wide sidewalks, that is possible right?
     
  29. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    I am not the Dev for CScape, however maybe I can help. I use Easy Roads 3D for the roads in my game. I use ER3D instead of the roads included with CScape because ER3D can be any shape, not just straight. To avoid manually placing buildings along the roads (a PITA!) I wrote the following code that can be very helpful: https://github.com/Blissgig/Easy-Roads-3D-and-CScape-Building-Placement

    ER3D has "Side Objects" where you can place any GameObject anywhere along the side of the road. If you want to place signs, mailboxes, trees, etc you can use Side Objects or their API.

    For me CScape is a way to fill my city with enough diversity (and thankfully GREAT frame rates, for VR) that the scene doesn't feel empty. I can then add other buildings and objects to fill the scene.

    Hope that helps
     
    Rowlan, hopeful and MorpheusXI like this.
  30. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235
    Interested in this. Got any screenshots or videos that we could look at? Or maybe a tutorial?
     
  31. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    I do not, sorry. I BELIEVE it's relatively simple to use. You only need two tags (one for buildings and one for roads) These objects are only tagged for a brief time while you place the buildings, so tagging them is not permanent.

    There are only 5 steps; basically tag your buildings and the street(s) you want to align them and press a button. Do me a favor and read the "ReadMe" and let me know if there is something I can do to make it clearer. I tend to say TOO much, so my documentation can be more lengthy than necessary. (though I do believe that clarity is better than brevity, but that's just me)
     
  32. startupstor

    startupstor

    Joined:
    Aug 3, 2019
    Posts:
    8
    This is an amazing idea, and I really appreciate that you made your contribution open source, hopefully we can get a cscape wiki going and centralize all the improvements we make on the plugin. I'm trying to make a large open world game, and the overhead from having detailed skyscrapers is unimaginable without cscape, but the lack of customization of where third party assets are placed is a problem you have seemed to mostly solved. I would love to use your solution but I'm trying to only use one level designer. Terrain Composer 2. The youtube videos make it look like you can do literally anything with it, but I haven't learned how to use it yet. I also bought World Streamer on sale, so hopefully I can get all these plugins to work together.
     
    hopeful, Neviah and JamesWjRose like this.
  33. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235
    How does this handle terrains that have slopes, like terrains that Gaia would make? Does Cscape place the buildings accordingly?
     
  34. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    My script is using the data from the Easy Road 3D object. Each road has a collection of points along it's sides and center. I specifically use that data, so if your road is on the terrain then it works out fine. Good question.

    I built my terrain using Gaia as well, but it doesn't matter what you use. The road data handles it. HOWEVER, with tunnels now becoming a thing, the building(s) will be in the ground if YOU tag a road going through a tunnel.

    This is NOT run-time code, this is used to move buildings around at design time only. Just to be clear.
     
    Neviah and MorpheusXI like this.
  35. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    Is there an ETA on version 2?
     
    johaswe and Neviah like this.
  36. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    That post made me buy the asset, so thank you very much! I still do hope that v2 is around the corner and I don't have to buy it again.
     
  37. Dark_Keeper

    Dark_Keeper

    Joined:
    Jun 22, 2017
    Posts:
    1
    Ok, can someone help me with making it work on mobiles pls?
    I created a new project from scratch. Added 3x2 city. After switching platform to mobile all streets became black. Anyway.
    Fps Stats:
    quality = very high. Fps on pc is 75 from unity stats.
    quality = very low. Fps on pc is 1200 from unity stats (160 real fps).

    After starting it on device i get 4-6 fps. After Deleting everything from project and cscape except building i still have 4-6 fps.

    How can i optimize it for making it work on mobile devices?


    On Pc:


    On mobile:
     
    Last edited: Dec 16, 2019
  38. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
  39. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Can you please test if this shader improoves performance with Quest? Import this package into your project. Then go to City Randomizer component, and deselect Use Parallax Mapping.
     

    Attached Files:

  40. mantekkerz

    mantekkerz

    Joined:
    Dec 24, 2013
    Posts:
    111
    Has anyone solved this? I've got the same problem.
     
  41. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Glad to be of help. It really is a good asset. There is a real lack of documentation, so I wrote the following info to help me guide the process (the asset is VERY impressive, and therefore a bit complicated) Don't take this as complete, just some info:


    EDIT: I have created a Github repository for this documentation in case others would like to contribute (PLEASE!)

    https://github.com/Blissgig/Cscape_Process

    --------------------------------

    • Info by Developer
      Videos

      I highly recommend creating a testbed application to learn how to use this asset. Cscape is an impressive application, however because of the large number of capabilities and options you should take some time to learn to use this in a safe and separate project before integrating it into an existing game.
      1. Add Cscape asset to game
      2. Add Standard Assets to game (some components used in Cscape)
      3. Add Cscape Toolkit Source: https://www.dropbox.com/s/8desklhixvtvr6g/CScapeToolsetSources.unitypackage?dl=0
      4. NOT NEEDED Add https://www.dropbox.com/s/cim4di0xpi53pdn/ShaderPatch2018.0.2f.unitypackage?dl=0


      Cities can have one or more Districts. Districts have one or more Prefab (fbx) templates. Templates are a collection of Facades on a mesh.

      Basic relationship
      • Cities
        • Districts
          • File Location: Assets/Cscape/DistrictTemplates
          • Prefabs
            • File Location: Assets/Cscape/Editor/Resources/BuildingTemplates/Buildings
            • Material: All buildings will use the same Material. The default Material is MegaCity1
            • Building Modifier script
              • FAÇADE SHAPE (Façade is spelled wrong all over)
              • Shape: Values 0 to 9
              • Front Façade Shape. Don't know what this does
              • Lateral Façade Shape. Don't know what this does
              • Subdivision Shape. Don't know
              • Height Subdivision. Don't know
              • Width Subdivision. Don't know
              • MATERIAL STYLING
              • Façade Material 1 (front/back): Values 0 to 9 - These relate to basecolor_surface_01.png to basecolor_surface_10.png These images can be found at Assets\CScapeCDK\Editor\Resources\CScapeToolset\Surfaces
              • Façade Material 2 (front/back): Values 0 to 9
              • Façade Material 1 Lateral: Values 0 to 9
              • Façade Material 2 Lateral: Values 0 to 9
              • Rooftop Material: Values 0 to 9


      Base Process
      1. Create Facades. Optional
      2. Create Building Templates . Optional
      3. Create Districts. Optional
      4. Change / Update Textures. Optional. A GREAT site for textures: https://gametextures.com
      5. Create City
      6. Adjust specific buildings


      Step One: Facades. Optional

      Facades are 2D objects that are templates used by Cscape to make buildings. There are 40 facades. Each building can have one or more facades. You can review and change values on the "Building Modifer" script on each building in a scene. (Step 6)
      1. Open the scene CScapeToolkit. This is found Assets/CScape
      2. Select the "CscapeBaker" in the Hierarchy.
      3. Set the lock icon (upper right) in the inspector so that the Baker does not move away as you adjust windows, etc.
      4. Split your windows so you can see the Game and Scene side-by-side. The Game window will show you a 3D representation of what it will look like. The Scene view is 2D. Note: In the Scene tab select the "2D" button, near the top left.
      5. Set any of the 40 tiles as desired. (ie: add, remove, move windows and other objects within the Tile. Press the Previous/Next Tile buttons to navigate.
        1. 1 - 21 are façade styles with windows
        2. 22 - 31 are walls
        3. 31 - 34 are ground level facades.
        4. 35 - 40 ??? I, JamesWjRose, do not know
      6. Press the "Bake Textures" button on the SCcape Toolset "CScape Toolset Manager" script
      7. At this point we are done with the CscapeToolkit scene. Switch back to a game scene, create a new scene if necessary.
      8. If you have not added a "Cscape City" to the scene, do so. Select the "GameObject" menu, then select the "Cscape" menu, then select "Create MegaCity"
      9. Select the "CScape City" in the Hierarchy
      10. Find the "CS Materials Tools" script attached to the CScape City


      Step Two: Building Templates. Optional
      Step Three: Create Districts. Optional
      • The included Districts can be found at: Assets\CScape\DistrictTemplates
      • If you want to create your own District select one of the Districts and then press CTRL+D to make a copy.
      • Select "Cscape City" from the Hierarchy
      • Within the "City Randomizer" script there is a "Building Templates" section (3rd section down) From here you can add, delete or change Districts.
      • Double-Click on the District/Building Template that you want to modify. From here there are only two options:
        • Size: The number of templates available for this district
        • Elements: Add, delete or change templates

      Step Four: Change / Update Textures. Optional
      • There are 21 textures, and there associated Normal, Metallic, Roughness images, can be found at: Assets\CScapeCDK\Editor\Resources\CScapeToolset\Surfaces
      • "_01" to "_10" are for walls.
      • "_11 to _21" are for roofs.
      • https://forum.unity.com/threads/rel...uilding-generator.460380/page-25#post-4227154
      • Texture size info: https://forum.unity.com/threads/rel...uilding-generator.460380/page-24#post-4029151
      • Additional info: https://forum.unity.com/threads/rel...building-generator.460380/page-2#post-3150851
        • 1-21 are facade styles with windows
        • 22-31 are walls
        • 31-34 are ground level facades
      • Note from the asset author: Facade mat 1 and Facade Mat 2 can be any of the surface textures from range -01 to 10. They are used as combinations. Let's say if 01 is a brick texture, and 05 is a concrete, using Facade mat 1 set to 01, and Façade mat 2 set to 05 will give you façade with combination of those two surfaces. If you invert values, you will have a same combination, but in inverted mode. As for "front" or "side" assignment, you can assign different textures to front/back side of a building. or to lateral sides of a building. (front side is a side that is facing streets). https://forum.unity.com/threads/rel...uilding-generator.460380/page-25#post-4227169
      • TODO: find which items are created and added to the Material. Currently, when hitting "Compile All Textures" is affecting which files? It looks like all the files in this folder: Assets\CScape\Editor\Resources\TextureArrays\CScapeToolset are affected and they are added to the Material, right?
        • Process for creating new city Material:
        • Make a backup of "Assets\CScapeCDK\Editor\Resources\CScapeToolset\Surfaces" ie: "Surfaces - Original Set"
        • Make a backup of "Assets\CScape\Editor\Resources\TextureArrays\CScapeToolset" ie: "Array - Original Set"
        • Make a duplicate of the "MegaCity1" Material and change the name to something that is more appropriate than "Megacity1 copy"
        • Change the array images in the Material "MegaCity1" to the array images in "Array - Original Set" (to insure that there is an original set and material
        • Change images as desired
          • "_01" to "_10" are for walls.
          • "_11" to "_21" are for roofs.
          • "_31" to "_34" are ground level facades
        • Select the City in the Hierarchy.
        • Select the "<todo>" script, and expand the "<todo>" section and change the Material from "Megacity1" to the new material name
        • Press the "Compile all textures" button
        • Copy the array images in the: "Assets\CScape\Editor\Resources\TextureArrays\CScapeToolset" folder to a new folder, likely named as the same as the material name.
        • Open the new material, and change the images in that material to the new folder.
        • Change the city's material to the new material


      Step Three and/or Four Addendum: Update Textures/Facades. Optional
      • If you have changed templates or textures you NEED to do the following
      • Select "Cscape City" from the Hierarchy
      • Within the Inspector find the "CS Material Tools" script.
      • Press the "Compile only styles" and/or "Compile all textures"

      Step Five: Create City
      • Read the Cscape_Readme.txt file included with the asset.

      Step Six: Adjust Individual Buildings
      • Select the building you want to change from the scene or via the Hierarchy: Cscape City/Buildings
      • Select the "Building Modifier" script. There are many options to change each building. (too many for me to document atm)
     
    Last edited: Dec 27, 2019
    NaokiHama, olix4242, rrahim and 4 others like this.
  42. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    Since I', working now a bit more with CScape I can fill in some gaps. Because depending from which side you look at the building you might not see any changes of the parameters, just because they are on the other side of the building, or the current selected shape doesn't use the parameters, which makes it hard at the beginning.

    First it is important to understand why there are facade shapes at all. In the classic modeling approach you have to use the mesh-model (triangles) and the resulting UV-coordinates in order to decide where on your building you want to have the which part of your texture placed. Different texture parts like wall, windows but also the details like ledges have to be modeled with the mesh itself. This results in a huge triangle-count (on different stores you can find buildings with 300.000 tris or even millions for only 1 single building). With CScape you can have a building where his each facade consists only of 2 triangles.

    So, the Facade Shape is the most important feature to change the look of a building. It defines the shape of the window (like rectangular, or rounded top, etc.) and the decorations around, like a window ledge, columns, etc.
    In order to add further variations to your building you have 3 different classes of facade shapes. And to all of the following shape classes you can assign a different or if you want even the same facade shape.
    - Front Shape, which is also used for the backside of the building: if you want to have a modern building, select an apropriate facade shape and the whole front face of the building looks like this.
    - Lateral Shape, which is used for both lateral sides
    - Subdivision Shape: this results in having vertical and horizontal lines of a different facade shape breaking up the main facade shape.
    You can use this to simulate stairways or to just add some further variations.
    With the parameters width and height you can specify the distance between each of the rows and cols, but you can't set them to zero. If you don't want to have a subdivision shape, select the same shape as the main facade.
    + for the subdivision shape you have an extra facade shape that can be selected: it is just a wall without any windows and can have nice effects in the look of a building.
     
    WillDexaiArts likes this.
  43. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    After baking textures with the CDK, facade shapes have lost the second facade material definition.

    I've started to work with the CDK and for the first test I've baked the existing shapes without any changes. After baking the textures I've recognized that the facade shapes, have lost the second facade material information, which adds a bi-color look to the buildings and therefore some further variation. The image below for example would have in the original an alternating colored line.

    On a more detailed look in the editor I can see that it hasn't vanished completly, but the second color get's now very subtile changed at the window border color (outer window border), whereas the window border color parameter still affects the "inner" side of the window.


    LostColors.PNG

    Q1: Which of the decoration elements result in the second material (border decoration elements with different color, or different shader, maybe shader parameters? )
    And How can I work around this problem?

    Q2: Would it be possible to upload a CScape version with the double of shape slots? So you would have the currently available different slots and a copy of them to add additional ones. Because at the moment if you want to add additional shapes/window types you have to delete other ones or do some magic tricks inside the CScape system which would not be compatible with the next version. Or would this result in worse performance?
     
  44. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Feel free to add this info here: https://github.com/Blissgig/Cscape_Process
     
  45. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Does anyone know if this works on the oculus quest at a great frame rate and if it does which unity version is best for that?
     
  46. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Unfortunately, I've came across this issue lately, but only in osme Unity versions. I'm completely out of luck in explaining or understanding this issue and it looks like a problem with Unity itself. Some textures aren't read or written like they should (there is happening some kind of conversion from linear to gamma or vice versa, breaking almost everything in CScape baker) but to say more - this is project based problem, and not only Unity based problem. As I have many things that are going on in this process, it's a pain to understand issue, and I have tried many different things.
    For now, only solution would be to be sure that you are in linear mode, be sure that you are using PC build settings, and probably open a new project for this task. Note: You could also try to use older unity version (the one that was used to submit Unity) just for baking process and then export unity package with textures and materials).
     
    JBR-games and hopeful like this.
  47. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    It could result in a worse performance on lower spec devices. Also, a problem here is that I don't have anymore a possibility to add aditional data to vertex informations, so this is pretty tricky. But I was already looking into this lately (and that's how I stumbled into a problem with baker).
     
  48. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768
    Hello,
    How do I remove the river entirely?
     
  49. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    You will see that CScape Randomizer has a value for positioning a river. Just set that value to something larger than city size.
     
  50. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    @olix4242 any news about version 2? After purchase I'm wondering now if I should step right in or wait a few weeks more.
     
    Hawk0077 and Neviah like this.