Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

World Building [RELEASED] CScape - advanced building generator

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

  1. shredingskin

    shredingskin

    Joined:
    Nov 7, 2012
    Posts:
    242
    You mean like the depth brushes in zbrush ?
    I thought you were placing mesh prefabs.
    Will it then export to a model or a material ?
     
  2. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Ok thats kinda wierd you say 10 textures because when i download the sdk there is only 9 when I add new textures they get loaded as (texturetype_011) then when i compile the slider to change the material only goes to 9...should I just use the brick substance file u provide as a template to build my textures? Will that make it easier for me?
     
  3. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
     
  4. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235
    I upgraded to 2018.2 also this month so, please, get rid of 5.6
     
    olix4242 likes this.
  5. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Seeing i have used Surforge quite a bit, This gets me really excited, Please tell me more!!:D
     
  6. Wandersoul

    Wandersoul

    Joined:
    Aug 28, 2013
    Posts:
    35
    I don't think there is a need to support anything before the LTS version.
     
  7. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687

    I have been a software developer for a long time, but not a game dev, so take what i say with that in mind (sitautions in a game-dev-shop could be VERY different that business software dev) Locking in a set of tools and not upgrading happens frequently in my world. The updates can adversely affect the launch date and costs... but YEA I completely agree that we should update as soon as possible. I am updating a game from 2017 to 2018 and it has cost me some time, but I like to be current.
     
    Hawk0077 likes this.
  8. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    214
    Please keep support for the current LTS version.
     
    Freznosis likes this.
  9. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    You mean LTS 2017.4?
     
    hopeful likes this.
  10. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    10 texures.. Slider supports textures in range 0-9 that is the same as 1-10 (ten textures in all). Other than 10 won't be taken into account as shader can't use them.
     
  11. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    I'm sticking to 10 10 textures for surfaces, as I'm currently working on adding some easy variations on shader side. So, from now on, it would be more like having few textures for various surface types, and then coloring chem from a script side. Idea is to always have two types of surfaces, one main, threated and one with cover. So you end up in having two layers (like in real world) of lets say, bricks like underlying layer, and then a colored (paint) surface above. Colored surfaces can have their roughness textures, but at the end, you should be able to control it's coloring. This will give much more flexibility as usually there are few types of base structure surfaces (bricks, some other bricks, stone, concrete) but there can be many paints above.
     
    shredingskin likes this.
  12. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Yeah I briefly thought of similar situations you described so thanks for the clarification on that. And yes we are all different in mindset and knowledge in general so my comments are all really best guestimates based on my own preferences as you probably gathered. Again thanks.
     
    olix4242 and JamesWjRose like this.
  13. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Okay ill rearrange them from 0-9 and see if that works...I also tried to add a new street texture and I'm not seeing it at all either so idk what's really going on but ill keep trying...Again about the Substance file can I use this to make the textures the same way you did? Will this ensure they will be generated in cscape?
     
  14. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Also the texure array tools script? is that part of it? because if so I have not been using them at all.
     
  15. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    No, you sholdn't use that one. It is deprecated - and is there only for compatibility reasons.

    It's in a folder named "Street" and textures are named StreetMap_001 and so on.
     
  16. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    That file is only for authoring building shape styles. It shouldn't be of your interest. But with new CScape it' will be outdated - and replaced by a workflow directly in Unity.

    I still don't get where you are stacked. It should be pretty simple (at least for surface textures) to get going. Are you usign PNG files?
     
  17. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Building Size compared to standard Cube

    I am again attempting to write the code that will place CScape buildings along side of the Easy Roads 3D. To do this I need the width and depth which I am getting from the BuildingModifier script; the buildingDepth and buildingWidth properties. However, if I create a cube in Unity and set it's width and depth the same as a building the cube is much smaller. I have looked at all the properties of this script and I am not finding a value that would affect this difference.

    Any clue what I am missing?
     
  18. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Standard cube is 1 unit, while one CScape unit is 3 units (meters). So you have to multiply CScape units by 3.
     
  19. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Should be easy it’s just not working, Yeah I’m using png and naming conventions are correct still no textures showing up and I put my street texture in street folder but it does not show Ither:
     
    d1favero likes this.
  20. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Thank you kindly for the clarification.
     
  21. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    How would I go about making the streets twice as wide? I thought I was doing it but turns out I was just expanding the mesh and the texture was the same size as before
     
  22. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Another question in relation to placing the buildings (Easy Roads 3D integration) ; I have noticed that the position point for the buildings is in the corner instead of the center of the building. This is causing me some issues, and I will deal with them, I just want to make SURE that I am correct when I am seeing this so i can insure that my calculations are correct.

    Nevermind, I found the following code that allows me to get the center point of your asset (https://forum.unity.com/threads/rel...uilding-generator.460380/page-12#post-3419944) However, that ended up not being what I needed and I found another way to achive my goal. I now have the buildings properly aligning to the ends of Easy Roads 3D. It needs some more work, and tests, and when I get it I'll post the code.
     
    Last edited: Nov 3, 2018
  23. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Maybe a tutorial for this is needed so I can see where im going wrong @olix4242 might be helpful for others too in the future.
     
    d1favero likes this.
  24. shredingskin

    shredingskin

    Joined:
    Nov 7, 2012
    Posts:
    242
    Aaron2348 likes this.
  25. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    If I scale xscape go x2 everything is the needed size but placement is wrong. How would I fix this?
     
  26. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    317
    There is a way to fix.

    Get your city setup how you want it.
    Create a New Gameobject and center it.
    Drag the city into THAT game object.
    Now Scale the GameObject NOT the city.
    That will keep everything where its supposed to me.
     
    blacksun666 likes this.
  27. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Yes, you are correct, right angle of the building is the reference point. This has it's advantages in many ways.. as you can always know where your angle without worying about sclae of your building (if you have to make a script that uses rays for finding next building). a center isn't much of a need.. but if you wan't too find it, there are many ways that are integrated into unity like bounding box feature. If you need to find a center based on building position, than you should just add a buding width divided by two..
     
  28. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Well, there is not much to be explained there other than place your textures in PBR mettalic format into folders and name them in a sequence ;) But if needed I can make a tutorial, anyway when new CScape comes online.
     
  29. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    you can change it by adjusting Street Decalls UV tiling in MegaCity Streets material.
     
  30. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    178
    @olix4242

    A reviewer mentioned...
    The lower levels of the buildings have no doors?

    I was wondering no so much about the lack of doors mentioned but using the space inside the building...

    The best option I can think to even consider tying is MapBox.. Check their indoor mapping...

    https://blog.mapbox.com/indoor-mapping-in-unity-74999aaa851a

    Perhaps you'll consider some sorta integration... that would be fantastic!

    Looking forward to see what the Apocalyptic City will be...

    https://assetstore.unity.com/packages/tools/physics/alex-s-door-system-lite-38694
     
    d1favero likes this.
  31. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Mapbox is something that is quite different. Not to say better or worse, but simply much more different. Mapbox doesn't have good good shading or optimized performance. I have tried some kind of integration with Mapbox, but, while their output meshes can be good for some sort of visualization, they are aproximative and not suitable for good quality realtime rendering. Right now I'm hitting performance bottlenecks that can't be solved anymore with current hardware tech. You should understand that generating a cities with thousands of buildings have it's impact. What CScape does is bringing that impact at minimum by optimizing (almost) everything that can be optimized. Optimizing for gameplay is quite different than optimizing for information. Cscape s capable of running in thousands of FPS on modern hardware, something that isn't needed for applications such as Mapbox, or Google earth.
    One of the latest cities that I've generated with CScape had 10 million triangles while running at 180 fps on GTX 1070. Count that every building has on average something like 100 -200 triangles. If I should recreate it's internal shapes, it would jump to 10 000 -20 000.. it's more or less hundred times more. A city that I've mentioned before would weight 1.000 million of polygons. Probably, you could do some streaming of that data amount (like Google earth does), but you can never create a game level from this data. Not to speak that mostly, that data is meant to be visualized, and not to work with physics.
    You should think about GTA, one of the bigest games with this kind of data: you can enter some of the buildings, but not all. And this will stay for long time untill we get much more processing power.
     
    CrandellWS likes this.
  32. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Hi Oliver, as you most likely know by now I am not a developer and so cant think around the issue I am having. I have:
    Main City
    Urban City 1
    Urban City 2

    The main city is a basic standard CScape city, Urban 1 and 2 were small cities that I stripped and placed in random locations around the terrain (but in a city type environment - see image below.

    As you can see the two city areas (Urban) to left have been stripped of CScape foliage, roads etc....

    Now the problem is that EACH city has a Reflection Probe.

    Problem being that the Main City uses virtually zero FPS and the two Urban cities completely trash the FPS.

    I have found that this is the "Reflection Probe" that is trashing the FPS.

    This is true of both Urban cities either singularly or including the MAIN city.

    So this brings up a couple of questions.

    First, when I delete the Reflection Probes from the Urban cities they re-appear - Is it possible to remove them completely and still keep the lighting within the city at night?

    Second, do I even need them in the first place.

    Either way they do have to go as they completely trash the FPS as mentioned.

    Anything you can add would be helpful.

    Many thanks

    Here are the cities city.jpg :
     
  33. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    That's how I did it but the shadows and details (roof and wall items) were then misplaced and some floating
     
  34. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    317
    Yeah its not perfect tbh honest but that's best I could get it to work. Like you my stiff was slightly the wrong size scale wise... I needed to reduce eveything to .75 as 1 could not work. It looked completly absurd. But I'm not having floating object issues like that, mine adjustment was 99% perfect.
     
  35. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    If I do this and the dotted lines are moved they turn solid. Any idea how to fix that?
     
  36. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Set Texture offset value to 0.5, 0.5.
     
  37. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Few reflection probes shouldn't be of any issue. But you probably use multiple instances of CSLights controll script (by default active for every city). You should deactivate those scripts and keep only one for a single scene.
     
    JamesWjRose and Hawk0077 like this.
  38. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks Oliver I will try that later today. Cheers
     
    olix4242 likes this.
  39. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    374
    Hi.

    I wanted to know if it is possible to create buildings individually on a terrain that I already have done.

    Or if it is mandatory to create the complete city because the asset needs it.

    Thank you.
     
  40. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    317
    I don't know if there is a way to generate single buildings but you can generate the entire city then simply hide what you don't want and move the useful ones as needed.
     
  41. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Yes, this can be done. In latest version available on Assetstore you can generate bulddings and simply delete streets. or you can simply drag and drop buildings from a prefab folder into a Buildings object.. and then resize them and customize to your needs. A new version of CScape simplifies this process, as you only have to drag and drop prefabs into your scene.
     
    CrandellWS and Barritico like this.
  42. shredingskin

    shredingskin

    Joined:
    Nov 7, 2012
    Posts:
    242
    The new version is the one coming with the facade tool ?
    Any ETA or beta to testrun it ?
     
    Paul-Swanson likes this.
  43. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Yes, it comes with faccade tool and many other new features.
    I'm about to submit it to assetstore. I have to make just few checks for compatibility with 2018.3 Unity version. For now it seems that it works without problems, and abandoning a development for Unity 5.6 helped a lot.
     
  44. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    One new realtime movie:
     
  45. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Wonderful work, Very nice!!! And Is this with the Relighting tool?
    One thing that would be really great to have is abilty to generate traffic lights for the city, would have been nice to have them in this video.
     
    Neviah likes this.
  46. JamesWjRose

    JamesWjRose

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

    I am here to share a bit of code that will help if you are using CScape buildings with your Easy Road 3D roads. This is an Editor script that places the buildings along the sides of roads. All you have to do is tag the roads and buildings and press a button. Details and code here: https://github.com/Blissgig/Easy-Roads-3D-and-CScape-Building-Placement

    Hope it helps.
     
  47. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks, I'll give that a go soon. Cheers
     
  48. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    It just keeps getting better and better. Good Job Oliver.

    By the way, did you have any joy with the town/estate houses? and the foliage etc... that you were working on earlier?
     
  49. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Sorry for the delay, yes that sorted everything out. Thanks Oliver
     
    olix4242 likes this.
  50. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    This is great! BIG THANKS! If you want I can include a link and credit to your scripts from Cscape documantation.