Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Assets [RELEASED] CScape - advanced building generator

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

  1. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    263
    Any eta on the new tutorials?..really looking to get My custom building skins compiled.
     
    JamesWjRose likes this.
  2. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    118
    Struggling with something that should be simple :(
    Trying to create a city grid where the roads don't go to the edge ie something like this:


    BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
    BRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRB
    BRBBBBBBBBRBBBBBBBRBBBBBBBBRBBBBBBBBRB
    BRBBBBBBBBRBBBBBBBRBBBBBBBBRBBBBBBBBRB
    BRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRB
    BRBBBBBBBBRBBBBBBBRBBBBBBBBRBBBBBBBBRB
    BRBBBBBBBBRBBBBBBBRBBBBBBBBRBBBBBBBBRB
    BRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRB
    BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

    Where B is a building block and R is a road block.
     
  3. badradionz

    badradionz

    Joined:
    Feb 2, 2018
    Posts:
    5
    Love this asset thank you! Quick question, how does one modify the signs array texture to customize?
     
    Last edited: Feb 1, 2019
  4. badradionz

    badradionz

    Joined:
    Feb 2, 2018
    Posts:
    5
    Hey Oliver, I've upgraded my project to the HDRP and obviously this has broken CScape :(

    Do you plan on supporting the High Def Render Pipeline any time soon?
     
  5. shredingskin

    shredingskin

    Joined:
    Nov 7, 2012
    Posts:
    109
    Shaders created with amplify break between HDRP updates, if you are using custom shaders I don't think switching to HDRP right now is the best choice.
     
    olix4242 likes this.
  6. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    263
    I dont think Oliver plans to support the Hdrp.
     
  7. shredingskin

    shredingskin

    Joined:
    Nov 7, 2012
    Posts:
    109
    I think he said he has a set of shaders that work with LWRP and HDRP
    I was thinking of asking for those since I'm porting my project to HDRP, but man, it really isn't worth it just yet, and just updating from 4.18 to 4.19 breaks the amplify shaders (and the auto upgraded materials don't have the maps right according to the unity changelog). Right now they have on preview 6.0.0 so I don't know what other things it might add/break.
    My thinking was the sooner I start with it the better, I was wrong. It was just not worth it (specially since you can get volumetric fog and planar reflections from unity's github for builtin).
     
    olix4242 likes this.
  8. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,193
    Any shaders break with each update - and it's quite frustrating.
    It's enough to try to open Unity's own demo asset Book Of Dead, and it doesn't work on any Unity version later than 2018.2. So at this moment I'm completely unable to support HDRP - but this doesn't mean I'm not willing to do it.
    I will do once a HDRP enters into it's final stage.
    But as I've mentioned here before: HDRP doesn't bring you almost any advantage in case of CScape. Framerates are lower as HDRP impacts performance in a big way (even in an empty scene). From my tests, CScape scenes that run at 600 fps, with HDRP run at 80. And this is ten times less.
    Also, HDRP doesn't support Screen Space Reflections, and they are essential if you wan't more quality from city rendering (correct reflections on windows).
     
    JamesWjRose likes this.
  9. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,193
    No, I plan, but at this moment this would mean to spend constantly time with any new update of Unity, and not being able to do other developement. I've already spent hundreds of hours in trying to support it, and it always went broken with a new release of Unity.
     
  10. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,193
    This week I will be submitting my new asset to assetstore (Deckard Render), and afterwards I will go back to actively working on CScape and tutorials.
    BTW, where are you stuck?
     
  11. omarzonex

    omarzonex

    Joined:
    Jan 16, 2012
    Posts:
    154
    VERY COOL
    MY PROJECT FOR YOU
    Thank you CSCAPE



     
    olix4242 likes this.
  12. shredingskin

    shredingskin

    Joined:
    Nov 7, 2012
    Posts:
    109
    It does support them, you have to enable them in the HDRP settings (and in the rendering submenu), it also has a smoothness treshold that is quite nice.
    But yeah, everything right now is quite broken in HDRP, and lags everything. It's just in constant change, and the performance is subpar (well, it supports more per pixel lights and shadows, so that's nice), better to wait it out.
    Apparently it's getting out of preview in 2019.3, so 2020 at least.
     
  13. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    263
    My custom textures still dont show on my buildings at this point im hoping theres something that has not been explained in the tutorial vid or Something because i have tried just about everything.
     
  14. avivoren

    avivoren

    Joined:
    Sep 21, 2014
    Posts:
    17
    upload_2019-2-12_20-53-22.png
    Hey I'm getting those errors only when playing from a build, not in editor, any idea how to fix ?
     

    Attached Files:

  15. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    15
    This happens when
    Code (CSharp):
    1. #if UNITY_EDITOR
    2. ...
    3. #endif
    encloses the full code-file.

    There are 2 variants to solve this:
    1.) not recommended and a lot more to do, but will work with older versions: open each of the source files and enclose really only the editor-related code with the brackets shown above, so the main file still exists in the build, but the editor-only stuff is excluded

    2.) use Assembly definition files: this also speeds up compiling code and I would recommend this. Do a quick search to find a tutorial of your taste and get familiar to this, afterwards it is easy to use: Create an assembly definition file in the project folder that contains editor-scripts only and set the checkboxes of the asmdef-file in the inspector so that it excludes this editor-scripts from the final builds (for example on your windows-build, etc.). A problem could occur when the runtime-scripts and editor-scripts are in nested folders and not separated at the root.
    good:
    +scripts-folder
    ++ runtime.scripts
    ++ editor.scripts
    not so good:
    + scripts
    ++some.scripts (folder already contains script-files)
    +++some.scripts.editor

    But it would be nice if oliver would include this asmdefs, because every user will have to do this. And I'm sure he will do it, once he is back to cscape.
     
  16. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    239
    @olix4242

    I am trying to wrap my head around Districts. Are there plans to put out a tutorial soon about them?

    If this helps: I mentioned in an earlier post that I will be having 3 distinct areas of my game, so districts seems awesome to handle that.

    1. VERY high rise; Steel and glass. Think midtown and downtown Manhattan, but much taller
    2. Expensive apts. Think Park Ave, NYC with lots of big bricks/tiles and smaller windows
    3. Industrial. This would be concrete, small/few windows.

    The thing is each district, I assume, would need to have a different material, so that the style of the area is not limited to the number of textures available when compiling a Material (ie: MegaCity1)

    This is why I am asking about a tutorial, to insure I am not wasting my time doing things the wrong way.

    EDIT:
    Another thought: Maybe if the was a map/flow chart of what aspects of CScape are and how the affect each other. The limitations of textures, etc. While this is an AWESOME asset at a great price, the lack of documentation is affecting my ability to use it.

    Also, I would LOVE to purchase "Building Styles Packs" as you have mentioned on the asset page. Especially the Sci-Fi city mentioned. (hint hint)

    EDIT 2: re: CDK
    I am attempting to figure out and document how to make and use textures and templates. The textures can be found here: Assets\CScapeCDK\Editor\Resources\CScapeToolset\Surfaces
    But some of them seem to be rooftops, others are vague as to what they are. I have spent the day looking through the posts here and the on the CDK documentation: https://olivr.info/customizing-cscape-materials-with-cdk/
    and I still cannot figure this out (my apologies) For example: The "Facade Material 1" setting on the "Building Modifier" script has 10 values, but I am unsure which textures files I can change to match those 10, etc.

    Sorry to be a bother, but for me to move forward I have to have some information from you.

    Thanks,
    James

    ps: Let us know when Deckard Render is available.
     
    Last edited: Feb 15, 2019
  17. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    239
    Hello gang,

    I am appealing to everyone here to help me figure out and document this asset. I LOVE this asset, but the documentation is severally lacking. I should know because some of the included documentation was written by me. Again, Oliver has done a great job building this asset, it's very impressive, however without documentation we are all going to spend a lot of time ATTEMPTING to get this working. I have already spent 50+ hours running tests, etc attempting to get to know the flow.

    I have been attempting to find out which of the textures apply to which controls/properties in the Building Materials script. Some are roof tiles, some are roof objects, some are basic textures.

    The textures can be found here: Assets\CScapeCDK\Editor\Resources\CScapeToolset\Surfaces

    Today I changed the first 4 of the textures (basecolor_surface_01 to basecolor_surface_04) to red, blue, green and yellow. Compiled the textures in the textures in the Toolkit, then went into a sample scene and created a city and NONE of the buildings have any of these textures. I selected a building and played with the Building Management script and none of the changes showed up as those textures/colors.

    Oliver seems to be spending time on another asset, and I can get that, but the lack of documentation makes this asset SO difficult to use. I can use ANY help from all of you. I will of course share everything I get working, but atm I am COMPLETELY stuck and cannot get anything done.

    Any help?

    Thanks.
     
    Stephen_O and blacksun666 like this.
  18. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,193
    James, it should be more than straight simple. If it doesn't work for you, I would check that all packages are installed in correct directories.
    Only things to know are:
    -Download and Unpack CScape Toolset Sources
    -change textures
    -check that read-write enabled is set to on in texture settings (for newly created textures).
    -open any scene that contains CScape City object.
    -go to "CS Material Tools script", and click on "Compile All textures".
    This should change your textures.
    There is nothnig more to do and it should just work.
     
  19. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    713
    @JamesWjRose I've had a similar experience as you. A while back I sent an email to the dev with the same questions, and I remember he provided instructions to replace textures, etc. I was never able to figure out what to do to get it to work - I also consider myself a fairly competent and knowledgeable unity developer.

    I pulled this asset into a project a few days ago, because I remember him saying a while back it will have support for post apocalyptic texture packs (which is the theme of a prototype I'm working on), but I did not see them in the asset or on the store.

    Next test was to at least lower the height of buildings (max 3 stories as an example), I tried for an hour without luck - I might think there would be a field in the inspector specifically for this. I tried changing values in the inspector but not much seemed to change.

    I purchased back in November of 2017, I was really hoping to see some good tutorials and user friendly workflow that promotes customization. I will continue to be patient, hopefully the icing on the cake comes soon.

    At this point I will make the same request, please focus on tutorials, and creating a user friendly workflow that promotes easy customization of the city - I think this among all else is what users purchase the asset for. I know it's a great tool, but there's no clear way to customize the city. I simply don't have enough free time to go through this asset to figure out how to do it on my own and would prefer to change some values in the inspector, textures sheets, etc and see the city change based on that.
     
    d1-favero, Aaron2348 and JamesWjRose like this.
  20. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    239
    Oliver,

    >it should be more than straight simple

    This is the problem, it's simple for you since you wrote the software. This is a very impressive asset, and I post about it everywhere (my site, reddit, twitter) but it's also a complicated piece of work. It is not straight forward. That is not a complaint, it's just a statement of fact. I say this not to complain, but to inform you. There really, REALLY needs to be a Front to Back video on the processes on how to use the Toolkit and the Asset.

    eg: There are 21 images labeled "basecolor_surface_01" to "basecolor_surface_21" and there is no way to know which of these are to be walls or roof or objects.

    >>-go to "CS Material Tools script", and click on "Compile All textures".

    HERE IT IS! This is the step I missed. Thank you VERY much. Now I just need to understand which of the images match to what. Meaning: When I play in "Building Modifier" script which of the "basecolor_surface" images are used in which of the properties; ie: Faccade Mat 1 and 2, Faccade Mat Laterial, etc.

    Couple of MINOR bugs:
    * "Facade" is spelled with 1 C.
    * Some of the properties in Building Modifier are floats when they should be int. eg: The Facade Material settings. They only change when a whole number changes. VERY minor, but anything that can confuse a user/developer should be fixed.
     
    Stephen_O likes this.
  21. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    263
    Ive done this atleast 30 times and no textures, could it possibly be some sort of bug?
     
    JamesWjRose likes this.
  22. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    239
    I was able to resolve my problem by this step: -go to "CS Material Tools script", and click on "Compile All textures".

    That is on the city itself. However, check for this folder: Assets\CScapeCDK\Editor\Resources\CScapeToolset\Surfaces

    Within it there should be a number of image files such as:
    • basecolor_surface_01 to _21
    • normal_surface_01 to _21
    • roughness_surface_01 to _21
    • etc
    If those are not there, or if they are there but in Read-Only mode then those issues need to be fixed.
     
  23. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    263
    i was starting to get really worried about this process lol. nice job man!! And Thanks so much for posting...im gonna give this a go soon as im home!
     
  24. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,193
    - "_01" to "_10" are walls, "_11 to _21" are roofs.
    Faccade mat 1 and Faccade 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 Faccade mat 1 set to 01, and Faccade mat 2 set to 05 will give you faccade 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" assignement, 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).
     
    hopeful, JamesWjRose and Aaron2348 like this.
  25. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,193
    This is due to shaders can use internally only float properties - and this is also due to some internal workings require float for those properties. I dind't implement some conversions that might be implemented, just for a sake of simlicity.
     
    hopeful likes this.
  26. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    239
    Ah, okay.

    Thank you VERY much for the clarification on the texture name patterns, that is very helpful
     
  27. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    239
    Hello gang,

    Because I need it I have written some documentation. I would love for everyone to review it and make any changes you feel of any value.


    ----------------------------
    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


    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


    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: Feb 18, 2019 at 9:52 PM
    hjohnsen, olix4242, hopeful and 2 others like this.
  28. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,193
    Great! thanks!
    I will check it later, but I've found one error - Thius step shouldn't be applied and could kill correct functioning of shaders. This patch was for earlier version of CScape - latest one available on assetstore is patched and has many new features so installing that patch will kill all that features.
     
    Last edited: Feb 18, 2019 at 10:12 PM
    hopeful and JamesWjRose like this.
  29. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    239
    Thanks, I removed it from above and my local file.
     
    olix4242 likes this.
  30. DanielFF

    DanielFF

    Joined:
    Aug 29, 2012
    Posts:
    38
    Hi,
    I made some tests and noticed that my mini mac's temperature keeps going up when using CSBuildindShader (I stopped when it came in 72C) in both the playing editor and build for mac. Using other shaders (standard and Unilit for example) does not happen. Is this something that I should be worried about running on mobile devices ?
    Im using 2018.3.0f2

    Thank you
     
  31. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,193
    I don't think that this has anything to do with shader itself. It might be more a problem of a whole system, due to a large number of objects that it has to handle or due to physics of such a big world. This means that your scene has to use system resources. 72C isn't anything big.. modern systems can go up to 80 degrees without any problems. You didn't say if it was a new Mac-mini or some of the older models (like 2014). 2014 model is probably much less powerfull than any modern phone. It might render at 60 fps, but if it uses 80% cpu and 80% GPU, it will get hotter than a computer or mobile that uses only 20% of CPU and GPU. But they are all made to work at those CPU GPU utilization levels.