Search Unity

Assets [RELEASED] CScape - advanced building generator

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

  1. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,366
    This has to do with Vertical Sync and isn't a real performance issue. Apparently, looks like there is some kind of bug in latest unity versions/and or Nvidia drivers - so it seems that VSync settings doesn't get respected all the time. High CPU usage in Gfx.WaitForPresent is just a CPU that is idling. As long as a GPU milisecond usage stays low, you aren't probably experiencing any real problem - and your framerates should be as high as your refresh rate (60 -70 fps, or any other framerate that your screen uses). Reason is unknown, but migh be somewhere in Nvidia settings for VSync, Gsync...
    So to clarify:
    -if Gfx.WaitForPresent is high, and only that one is high - you are getting Vertical Sync issues - and your app is working fine, but is refreshed for your monitor. You won't get better framerates that the ones that are set in your display drivers.
     
    Hawk0077 likes this.
  2. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,366
    No, a baker doesn't bake those textures. You just have to replace existing textures in Surfaces folder. And then compile.
    Be sure that you have set Read/Write onto those textures before compiling.
     
    Aaron2348 likes this.
  3. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    268
    Okay so u can't exactly add new textures, I have to replace existing ones? I'll try a bit later then.
     
  4. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    268
    @olix4242 also in the compile settings the texture size is 512, can textures be larger than that? and if so what is the max?
     
  5. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,366
    Textures can be as large as you want - or at least as your target system can support. Because of a small texture size, you can probably go pretty high, but on a expense of having larger build sizes.
    Also, a thing that is good to know: new CScape has a feature that let's yous scale those textures on per texture basis.
    Yes, you can't add any more that existing ones. You have to replace them. But, mostly, you don't need more of 10 textures, as you can play with material colors, that will give you infinite possibilities. But you can use multiple materials with different texture sets if you need them.
     
  6. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    268
    Yeah at this point...I don't know maybe it's a bug or something but I've done what you said and the textures still aren't showing up to the street, maybe tutorial would be helpful
     
  7. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133

    When I import files i always have error:

    "Assets/CScape/BldgPlacement.cs(202,13): error CS0103: The name `HBCLogging' does not exist in the current context"

    And I cant use your tool because of this error

    Whats wrong?
     
  8. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
  9. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    I think there is a bug.

    I Downloaded Cscape and Cscape CDK package. Next, I changed C Material Tools -> Compiler options - > Street texture size to 2048- > Compile all textures. And what I see:

    https://imgur.com/a/mlTrdzg

    It changed street and buildings (textures), but I didnt any modification in CS Toolset file. If I try to back to 256 size, still the same picture.
     
  10. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    264
    Oops, yea just comment out that line. That class is something I use to log info. Sorry about that.

    EDIT: I just looked at the current code on GitHub and that line has been changed weeks ago. Make sure to get the most recent code
     
  11. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    Hi
    Hi thank you.
    But I couldnt find it. Could you give me a link?
     
  12. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    @olix4242 where are HD SRP?
    I opened readme file with link, but theres nothing in download section
     
  13. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    264
  14. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
  15. Max1982

    Max1982

    Joined:
    Oct 16, 2014
    Posts:
    133
    BUMP. No one had that issue? It looks like there somthing wrong with CDk package
     
  16. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    268
    yeah, I'm pretty sure something is wrong too, I have had similar issues.
     
  17. jbsgamezone

    jbsgamezone

    Joined:
    Dec 23, 2018
    Posts:
    3
    Hello,

    I've generated a city and it looks ok in Unity, however on iPhone I am not able to see the buildings textures (the street commercials look good though) :

    IMG_1073.PNG IMG_1074.PNG

    Does anyone know the fix for this, has anybody exported successfully to IOS ?

    Just guessing this may be due to PVRTC compression format, can cscape be configured to use that ?

    I'm using Unity 2018.3.0f2

    Thanks
     
  18. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    264
    Thanks for the feedback. Yes, the roads have to be placed first. This code is just to make it easier to place the CScape buildings, and to do that the Easy Roads need to be there first. (otherwise where would the buildings get placed?) The idea for this code is to make it easier to place buildings, it is not for placing roads.

    After you place your roads, then tag the road(s) you want to affect and press the "Place Buildings" button.

    If you want more info, please ask a specific question. I'm happy to answer, but to ME the ReadMe covers what I think it should... but if there is info missing I want to clarify it.
     
  19. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    368

    I doubt a card that powerful is the issue. I use the gtx 660ti
     
    Hawk0077 likes this.
  20. madao223

    madao223

    Joined:
    Nov 11, 2013
    Posts:
    3
    Hello, I have a problem - there is a difference in buildings appearance after I build the game, they are much brighter.
    Here is pic of buildings in unity editor:
    https://imgur.com/a/djIUtco
    Here after i build game player:
    https://imgur.com/UajbqE8
    I use WIn10 and unity 5.6.5

    Have any one had this problem?

    I created script that prints MegaCity1 settings like occlusion in game, and they are the same as in editor.
    I did the same to check if BuildingModifier settings are the same after build, and they are fine too.
    What could be other cause of the problem?

    Edit:
    I use realtime light, also tryed to bake lightmaps and have the same problem
     
    Last edited: Jan 6, 2019
  21. madao223

    madao223

    Joined:
    Nov 11, 2013
    Posts:
    3
    After building the game there are wrong materials assinged - different then they were set in Unity editor:
    pic from editor:
    upload_2019-1-6_18-57-56.png
    same buildings in game - you can see shift in material types
    upload_2019-1-6_18-58-13.png

    This problem occurs for part of Facade types, for some assigned material is ok after building the game
     

    Attached Files:

  22. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,366
    Hi,
    I think that I know what is your problem. You should try and see if a next thing can help:
    -In Unity go to Build Settings and search for Other Settings/Vertex Compression.. then turn OFF compression for UV0, UV1, UV2, UV3 and Color. Unceck also Optimize Mesh data.
    -Build again.
    You should have correct faccades.
    Why this happens?
    CScape uses adittional UV coordinates to inject data for all materials. If those vertex channels use comression, it will discard some of this data, thus you will get wrong shading.
    p. s. It looks like your previous question is related to a second. Can you confirm this?
     
    JamesWjRose likes this.
  23. madao223

    madao223

    Joined:
    Nov 11, 2013
    Posts:
    3
    @olix4242
    Yes, now shading is correct and facades are ok!
    Thank you so much for fast and effective support.
    Your tool is truly amazing, I struggled for months to find/create realistic low poly buildings for my mecha project.
    I can't speak highly enough how much your software will help create my game.
    Thanks again, you are great!
     
    JRD, Aaron2348, hopeful and 2 others like this.
  24. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    280
    Those images look really good, you must be highly skilled in the developing department just like Oliver.
     
    olix4242 likes this.
  25. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,366
    Thanks for your kind words.
    I suggest you to try also a new CScape, it adds really many new cool features. ;)
     
    JamesWjRose likes this.
  26. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    268
    @olix4242 hey will there be any new tutorials coming soon for skins?
     
    JamesWjRose likes this.
  27. alsomitra

    alsomitra

    Joined:
    Aug 31, 2017
    Posts:
    8
    Hi,
    Is there a patch corresponding to LWRP for unity 2018.3?
    I used LW_SRP_2018_Patch.unitypackage, but I see a green building
     
  28. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    i have the same issue atm
     
  29. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    its not there for me either
     
  30. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,366
    It isn't yet available. It iwll be available soon. But I still don't reccomend using SRP - it has much lower performance and still doesn't support some essential features like Screen Space Reflections - reducing a final quality of a rendering.
     
    hopeful likes this.
  31. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    Ive been fiddling for about an hour going through the suggestions in here and turning up quality settings and stuff and its starting to look really good, i think ill just stick with how it is atm, thanks for the quick reply and lovely asset :)
     
  32. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    496
    are you planning to incorporate
    Unity's Entity Component System
     
  33. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    Im getting a lot of "UnassignedReferenceException: The variable rooftopHolder of CSFloorDetails has not been assigned." in the demo scene but when i look at the objects that are eroring they seem to have their roof stuff already

    It runs fine despite this but itd be nice to clean up my console, do you have any tips on what i could do to remove these errors?
     
  34. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    Is there any way to get individual road pieces and path pieces to end clean?
    no matter what i do i always seem to end with edges to the city that look like this

    or this

    all of the pieces i can find are big chunks or cross roads which just leaves me going in circles getting bigger and bigger but still having the same problem o_O
    does anyone have any advice? :confused:
     
    Hawk0077 likes this.
  35. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    280
    I wanted more control over the roads so built the city then drew the roads with EasyRoads3D, I then deleted the ones that came with cScape. Same with bridges. The white sand on roads goes away when you build the road network. Capture.PNG
     
    Last edited: Jan 12, 2019
    sharkapps, JamesWjRose and hopeful like this.
  36. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    that sucks, i thought the answer might be to make my own or use another asset but i just wanted to check.

    guess im dumping a bunch of money onto easy roads then :(

    thanks for the help :D
     
    Last edited: Jan 12, 2019
    Hawk0077 likes this.
  37. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    280
    I already had easy roads so it was an obvious choice for me. Oliver may have another solution though so you could try the free version of easy roads to get started then upgrade later? Im not sure of the limitations on the free version of easy roads though.
     
  38. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    268
    Hey thoụgt id mention I did play around with a potential solution that had little success.

    to make your own custom roads with cscape possibly, the process i used was the same one in making custom building templates video with probuilder.

    you can use Pro Builder or whatever to make your template.

    Just make sure to vertex paint like you do with buildings.

    I used pro builder so then I just exported it as an asset.

    then you can click on a road and replace street template with your own...

    then came the problem...
    I could not find a way to get the side walk textures to show up were i made my sidewalk it only shows the main road texture on whole template, maybe you could figure it out or @olix4242 maybe could help.
     
  39. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,366
    Hi,
    actually no, atleast not in this stage. I really don't see any point of using ECS - there wouldn't be almost any gain, but there would be many downsides.
    ECS is good if you have many instances of preferrably animated objects.
    -With static objects, like in CScape, there is no point in using ECS.
    -ECS job system is for parallel processing, but CScape due to it's nature requires iterative execution. There are simply too many things that can't be ported into a job system.
    -CScape is a in editor script while ECS and Job System are runtime systems.
    Anyway, even if it could work with some hacks, it would require way too much work to port it to ECS - and that would mean starting CScape from scratch. And probably gaining something like 5% more performance on city generation - without any performance gain on runtime speeds.
     
    shredingskin, luniac and hopeful like this.
  40. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,366
    Here you can find a vertex color asignement description: street vertex assign.jpg
     
  41. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,366
    I have explored this issue and found that it was caused by Unity post processing stack, that for some reason tryes to sync to Vsync. But, I didn't remember having this issue before. But from one point of developement, in last few weeks I've got this "problem".
    Now comes the fun part: today I've noticed that a same problem disappeared completely. And not only that it disappeared but I even got much better performance from CScape. In situatuions where I could get 800 fps, now it goes up to 2000 fps with a full scene, reducing graphics usage to 0.6ms (before I had around 1ms) and CPU usage to 0.6 -0.8 (where I had around 2 -6 ms).
    So, it seems that problam wasn't even in Unity, as I'm still using the same Unity version.. but probably in Nvidia drivers or Windows itself. I actually didn't update Nvidia drivers, or atleast, I don't remember updating them, and I didn't do it by myself. But there were some Windows updates that were forced as usually.
    Can anyone that had this problem can confirm the same situation?
     
  42. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    268
    oh man wow thanks alot!! now custom roads can be made with Cscape, very nice!!! This should probably be pinned somewhere, could be very useful.
     
  43. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    this is the solution i used in the end

    removing the cscape scripts once generated then cutting up bits of the map into new prefabs with pro builder to dump everywhere (road pieces etc)
     
    Aaron2348 likes this.
  44. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    412
    I keep having buildings intersecting everytime I hit Generate Buildings. Is there a script or a checkmark somewhere I'm missing that make sure no buildings intersect with each other on each build. I'm using latest Cscape off the asset store.
     
  45. SOIL

    SOIL

    Joined:
    Sep 2, 2011
    Posts:
    143
    Hello! I bought CSCAPE some days ago and I am really impressed! I have a small problem. > At a certain distance, the borders of the buildings windows are starting flicker/jitter. How can I prevent that? t I thought it could fix the flickering of the window borders/edges by switchting to trilinear filtering with a 16x anistropic value for the mip mapping. It seems it has something to do antializing, that would be need inside the shader, which is impossible, right?. Any workaround or trick to bypass this problem?

    I really need that problem fixed, because I am using Cscape for a important VR-project of a client!

    Thanks in advance!
     
    Last edited: Jan 24, 2019
  46. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,366
    Hi,
    you should check a Distance smoothness variable in MegaCity1 material. You can use it to finetune some of those issues.
    But note that some moire aliasing will always be there - it is something that has to happen when you have objects and graphic features that are smaller than one pixel. Unfortunately, we don't have yet a technology that can be used in realtime to avoid this problem. This isn't related to CScape, but it is a common problem. I have written in these days about it here:
    https://forum.unity.com/threads/blade-runner-2029-personal-challenge.614635/#post-4134871
    -Try to play with Unity Qualty settings and see how it changes when using different settings for anisotrophic textures.
    -If using vive, try rendering at higher resolution (supersampling). https://www.vrheads.com/how-make-your-htc-vive-display-clearer-super-sampling
     
    JamesWjRose and hopeful like this.
  47. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,366
    You are probably using Slanted Streets feature (experimental feature). If you turn off this feature, buildings won't intersect. But you will loose slanted street option. This option is meant to be used with user controll... you generate blocks, and then manually fox them to your liking. This is still an experimental feature.
     
  48. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    144
    Is there anyway to control how the streets are laid out? Is there an upto date manual? and how are you getting on with producing the new tutorial videos?
     
  49. SOIL

    SOIL

    Joined:
    Sep 2, 2011
    Posts:
    143
    All fine on Oculus Rift! :cool: Made my fylthrough test, with a massive postprocessing stack xD - and I have to say - awesome - perfect! =)

    But, same as user JoferJoe, I have many UnassignedReferenceException: The variable rooftopHolder of CSFloorDetails has not been assigned. messages. :)

    ??? What can I do to fix this ??? o_O

    I also noticed the "load template" buttons aren't refering to the desired folders.

    I use: Unity 2018.3.02f, made a fresh project > imported Cscape 1.0.3b > loaded the scene > pressed play & stop
     
  50. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,366
    You can't fix it. This is error in Unity when loading scenes and it happens from time to time only on loading. It is completely harmless and shouldn't give you any problems. I will see if I can fix this in future (but due to it's difficult reproducibility, it's pretty hard).