Search Unity

Assets [RELEASED] CScape - advanced building generator

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

  1. ArkadiuszR

    ArkadiuszR

    Joined:
    Jan 21, 2016
    Posts:
    20
    I'm using Unity 2017.1.0f3 and:
    First error when i scan here
    upload_2017-8-5_13-50-10.png
    i get:
    upload_2017-8-5_13-49-43.png
    "BuildingTemplates" are in Resources:
    upload_2017-8-5_13-51-21.png
     

    Attached Files:

  2. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    403
    So i have already purchased this, but any plan to make it where you can enter the buildings?

    will it support water (like a river going through the town) and grass in the future? and maybe hills so its not all flat

    also does it not support run time generation?

    and if i just want to use your city generation with models and materials i already have would that be possible?
     
  3. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    513
    Finally I purchased it too.
    Overall this package is extremely good! It's awesome performances.

    However I have a slight problem: I have a strong flickering issue in VR (not only in VR but it's really distracting in this case) like some sort of z-fighting when you look at the building from the bottom. The windows/wall material layout seems to change briefly:



    If I change a settings during play on the building, and get back to original setting the flickering stops (despite the fact it throws a console error about markSceneDirty which shouldn't be used in play mode).

    Any idea how to fix it ?
     
  4. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    513
    Any hint ?
     
  5. Infrid

    Infrid

    Joined:
    Jan 14, 2012
    Posts:
    67
    I love the asset, and accept it's in Alpha.. just one thing that is hard.. the scenes are 250mb- 500mb in size when a city is created. What is going on? Is there every going to be an optimization for scene size???
     
    Last edited: Sep 2, 2017
  6. msl_manni

    msl_manni

    Joined:
    Jul 5, 2011
    Posts:
    272
    Please upload a Apk and a Destop build of the generated world, to check the performance, before I consider buying this. Thanks.
     
  7. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    387
    I have a question about modifying the textures on buildings, I didn't see any information about how to do that. For example we would like to use a very simple abstracted texture style (almost low ply cartoony style).
     
  8. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    New version of Cscape is almost finished and be submotted to Assetstore next week. It has some really cool new features and much better look. Some of the features are:
    -Buildings now use POM displacement that gives a best 3d feel.
    -Introduction of floor templates. Now a first two floors are different from other building floors. this gives more natural feel to a city.
    -rofftop shading is completely rewritten, no more ugly textures or windows on a rooftop.
    -LOD system with smooth transitions.
    -New textures to choose from. also, some textures were improved.
    -Better PBR look.
    -automatic applying of best settings for quality.
    -New modifier that can place 3d objects on sides of a building (like balconies or stairs).
     
    ikazrima, matteumayo and pottering like this.
  9. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    I suggest you to wait untill a new version comes out. It has right tools for easily modifying textures.
     
  10. matteumayo

    matteumayo

    Joined:
    Jul 25, 2016
    Posts:
    170
    Wow, that is some seriously incredible progress! I was getting antsy waiting for updates on this - glad to see you're still working on it. Can't wait to try out the new version. :)
     
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,877
    I have to say it again ... what really makes this stand out is the use of the parallax window shader. Not to diss the rest of it, of course, which is looking better every update. :)
     
    olix4242 likes this.
  12. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    Working on one new feature for CScape - who can guess what's this about?
     
  13. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    Before building, assure that you rename all Resources folders to something else, otherwise they get included into a build, and they actually aren't neccesary for build (but they are neccesay for correct working in editor). After that, change a name to Resources again.
     
  14. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    Sorry, I somehow missed all posts here. I didn't had any notice.
    What version is this? I immagine it was old one?
     
  15. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,877
    Erm .... water? :)
     
    matteumayo likes this.
  16. matteumayo

    matteumayo

    Joined:
    Jul 25, 2016
    Posts:
    170
    Are you integrating your NordLake water system perhaps? Just a guess. :p
     
    olix4242 likes this.
  17. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    Eheheh. Actually yes in some way. I'm adding a river support with a lite version of NordLake.
     
    Alverik and matteumayo like this.
  18. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,877
    I was thinking probably "lite" NordLake. Sounds like a good add! :)
     
    olix4242 likes this.
  19. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    246
    Question: Am i able to modify the meshes so that i could attain a scifi-destopian look?
     
  20. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    513
    It was with the latest version at the time I was writing.
     
  21. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    Not sure, but I think it could be probably because of some vertex compression and imprecision that then happens on graphics card. i didn't have this problem in last version, but I had this in developement stage, so I had to swiths from writing info in Vertex Colors to UV3. I think that you should try to deactivate (in player settings) all UV channels compression tags.
     
  22. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    Yes, you can - basic idea of CScape (and power) is that you can use your own meshes as templates that are resizable and configurable. i didn't made any documentation as in last version Iwasn't sure about standardization, but from a version that will hitt assetstore this week, It all will be more standardized and It shouldbe easier to write a help file on how to modify and add your own meshes. also, there are new features for editing textures.
    A good way to start is to open FBX files that contain those meshes, and see how they are made. There are few steps that hass to be followed:
    -Modelling your object so that all important features sit on every 3 meters. You have to think in blocks - so, your height of one floor should be 3m.. and walls placed on a grid of 3 meters. This is because you want to be sure that no window gets cropped. also, you should check that your Pivot point stays at a position of low, left corner of a front side of a building.
    -Adding vertex colors to your model. You will need only black or white vertex color. Black is for faces that should contain windows, and white for faces that doesn't contain windows but only walls. This is so that you can avoid using a rule of 3meter grid on those faces.
    -UV mapping - best way to do UV mapping is by using a standard box projection mapping. You only have to be sure that a U 0.0, and V 0.0 stay at a pivot point, and that Box mapping has a tiling of your building (6 meters building has 2 uv repetitions. 9 has 3 and so on).
    -import that mesh into unity, and drag and drop any building template from CScape/Resources/BuildingTempaltes/Buildings folder into your scene. Under Building modifier Prefab Configuration section, load your fresh model into a MeshTemplate box. Then click on Update Mesh Template button (it will load a mesh that it has to modify) and then click on Gues Building Size (plugin will try to detect correct size of a building).
    In some cases you will have to play with Normal Treshold value to instruct CScape how to map front and side faces of building. Then you also have to set Resizer center values so that CScape knows where it has to "slice" a building.
    -When you have finished this step, you can go and modify properties of roof greeble, advertising panels, and (this comes in a new version) balcony modifier - a modifier that scatters objests on a building side, like balconies, pillars, constructions, air conditioning and sci-fi greeble.
    But, probably a most important thing is that you will have to modify also textures. Cscape includes all textures, and a new version has a tool that with few clicks can rebuild texture material from your own textures. Textures that are neccesary are: Mask texture (a RGB texture that defines what material goes where), Ambient occlusion texture, Normal map and Height map.
     
    Alverik and matteumayo like this.
  23. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    203
    Is it possible to automate that with your asset in the future?
     
  24. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    I will see what could be a solution. Here is one thing to try, but I'm not sure if this can work. Move Resources folder from Cscape to Cscape/Editor and see if it builds correctly (right now I can't check on my computer). Let me know.
     
  25. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    203
    Okay.

    I haven't bough it yet though, I need to wait for my (first!) pay, but then I will definitely buy it.

    I had already ruled out a full-blown city for a level in my game, but with your asset it's incredibly easy and fast.

    I just hope you won't raise the price before I can buy it ;)
     
    olix4242 likes this.
  26. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    I tried the newer version and the scene is really usable now. Can't wait for the update.

    Desktop Screenshot 2017.10.01 - 15.43.04.75.png Desktop Screenshot 2017.10.01 - 16.04.22.05.png Desktop Screenshot 2017.10.01 - 16.08.06.09.png Desktop Screenshot 2017.10.01 - 16.09.12.26.png Desktop Screenshot 2017.10.01 - 15.44.49.49.png
     
    N00MKRAD and olix4242 like this.
  27. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    441
    Are you able to bake in the lighting in unity 2017 for all scene type be it sunset, day or nighttime for even better performance?
     
  28. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    You can always bake that data with unity baker as you usually would with any scene. I'm not providing any demo scenes with baked lighting, as this would unneccesary make a whole package too big for download ;)
     
  29. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    New version was submitted to assetstore!

    It brings many new features.
    -Buildings now use POM shading for great relief fidelity.
    -Better PBR lighting
    -New textures
    -Added scripts for building texture arrays
    -Automatic project configuring script for all platforms
    -Introduction of new modifiers (that can position objects on building sides)
    -refactoring of building generation and different building positions by default. All buildings willbe rotated towards streets.
    -Support for using many CScape sities in one scene (this permits to treat CScape City as a district and compose your own city from many districts governated by different rules)
    -Introduction of support for rivers with a Lite version of NordLake shader
    -Building roofs now have better shading and variations
    -Window borders can use customized colors (blend between two colors)
    -New building models
    -new preset for Unity Post processing stack - calibrated for daytime and nightime
    -Added personalization of texture lightness by faccade
    -Added support for different sidewalk textures
    -Added bridges for rivers
    -Reduced aliasing for faraway buildings
     
    Last edited: Oct 3, 2017
  30. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,877
    Now THIS is sounding very good. :)
     
    olix4242 likes this.
  31. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    Let's hope that this will also look good as it sounds ;)
     
    coverpage likes this.
  32. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    Here is a screenshot of POM mapping:
     
    matteumayo, Alverik and coverpage like this.
  33. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    Looks great
     
  34. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    203
    You're doing god's work, keep it up!

    I'm just waiting for my bank to transfer money to my card (Asset Store doesn't have many payment options...) and then I can buy it.
     
  35. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    New version is online on Assetstore. Check it up, and let me know ;)
     
    N00MKRAD and Alverik like this.
  36. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,877
    I don't have CScape yet. It looks beautiful. :)

    But where I struggle with it is on integrating it into the rest of my game environment. So I was glad to see the recent news of improvements in that area, like adding rivers, customizing buildings (for my game I would definitely have to implement my own art), forcing buildings to face the street, and being able to set up different districts. That's all a help, because I would use all of those features.

    What I'm still looking for though, and not sure I will see (which is okay, I don't expect to be able to use every cool toy in the store!), would be things to help me integrate with a bigger non-CScape game world, like being able to insert some non-CScape buildings, roads and rails, subways, elevated trains, highways, airports, and ship ports. CScape sounds like a possible solution for the efficient but still HQ flyover / background buildings I need, but I have to use my own custom structures in the player area. (Custom buildings like banks, police stations, museums, universities, and city halls, with working doors, ledges, spotlights, security cameras, and so on.)

    Perhaps there could be an integration with Map-ity to build a single building at a time, dropping the buildings down with a terrain or mesh-seeking raycast? (Or if these buildings are instanced, creating a list of positions and orientations based on the raycasts.) This solution would let me build at different terrain altitudes and build along Open Street mapped roads. And while I love the look of the roads in CScape, especially with the puddles, I fear the built-in solution will be too simplistic (by design) in terms of sidewalk objects and road configurations, so I want to be able to opt out and use something like EasyRoads for that.

    Anyway, I've said this sort of thing in this thread before. I don't want to overdo it. I'm just wondering since I see CScape is nearly out of beta if some of this is coming in a future update. I'm working right now on a city solution for my game, trying this and that to fit my needs, and I'm wondering if I should be including CScape as a possibility.
     
  37. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    When CScape was born, it was ment to be procedural material and building generator. Thi smeans that it was supposed to be used for generating thousands of different buildings to manualy populate your scene. The a new features were added (on generating city layouts).
    One of the main strenghts of CScape is that you can generate your 'city' and then move, resize and personalize building around your world made in unity. You can use it as a starting template for your world, delete buildings, and insert your own models in place of those buildings.. then resize CScape buildings and move or rotate them so that they meet requirements of your level design. Also, Cscape allows making of custom buildings that you can make by yourself.
    I didn't try Map-ity, but I've tested geat part of real-world based city generators. And I find that a main problem is that they can't be controlled. Mainn problem is thaat you have to take a data that is vector based, and insert it into a poligon based solution. What you get is mostly a mess that can't be repaired. Real world data isn't optimized for this task. You can't get a optimized LOD-able objects. You can't controll almost anythining. They get you break up your physics. And they don't have nice realistic shading even if you use 4 giga of textures. But mostly, you can't get an optimized high framerate out of them. If you check a performance of CScape vs. any real map solution - you will see that CScape will have better performance and much better looks even if it uses shaders that are complex. Yesterday I did a test with a CScape layout of 10 000 buildings, 1600 streets, for a whole coverage of 7km X 7km, and it run at steady 150 fps, with an average of 70 -170 drawcalls. All this with realtime shadows, and without any occlusion culling (with occlusion culling, it would run much faster). i'm saying this because many decisions in Cscape are made for optimization sake. It is made to run fast, without sacrificing on fidelity. It doesn't simulate all aspects of a city, but this isn't it's scope. Cscape should be used as a base for environment layout where you later modify buildings and add details. you should look at it as on a terrain generation systems - when you make a terrain, you have to populate it with objects.
    I have spent (untill now) more or less 1000 hours on developing this system. If I had to model and texurize every building that CScape can produce (and will produce in a future), it would take me 3000 or 30000 hours. And it probably won't run with any decent framerate on any machine. I don't know if I made my point ;)
     
    Marcos-Elias, N00MKRAD and Alverik like this.
  38. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,877
    Thanks for responding. I haven't been entirely sure of what CScape is now, as I don't have it and there have been updates, but I think you are confirming some of what I thought.

    So, if I have it right, CScape creates a rectangular city layout and fills it with buildings, probably based on a seed in a random generator and a few other parameters. You can move the city chunk you have created. You can also delete a particular building in the chunk, and you can use the CScape tools to make your own custom building (skyscraper) within a chunk. CScape has amazing performance because of the way it is built.

    However, CScape will always be its own special environment, because it is optimized that way. It can only be built in rectangular chunks, and a block of buildings will always be bordered by its own sidewalk and street. There is no way to get a single building out of it, and even if you could, it would probably destroy the efficiencies of the method.

    Is that correct?

    As for the real world generators, yes, there are problems. It's a pain. I'm still attached to the concept at this point, though. ;)

    So ... at this point I can't figure out how to fit CScape into my plans. But as I've said right along, it's a beautiful work, and you've got to love that efficiency too. :)
     
  39. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    No. You can move buildings around, you can resize them on all 3 axes (proceduraly and not by simple scaling), you don't have any constraint to a street as streets are separate meshes and objects (that can be resized also proceduraly). You change materials with sliders, open or close windows and change colors. Ad greeble details (like balconies, advertising panels, structures) Almost everything is proceduraly generated from various mesh templates.
    Also, a hierarchy is differently organized in respect to standard organization in folder/subfolder/subfolder. Everything is organized so that base buildings are in one folder (for folder I mean unity object in hierarchy), strets in another, trees in another, lodable details in another and so on.. so that if you don't need some element, lets say streets, you can just deactivate or delete them. But also, scripts manage those subobjects, so that if yoh move or rotate a whole building, all its 'virtual parents' will follow that transformation of a building.
     
    Alverik and hopeful like this.
  40. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    Here you can see it in action:
     
    Alverik likes this.
  41. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    I want to attach a single gameobject with a few children (points on a spline) to every road. How should I do this.
     
  42. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,877
    First, I apologize for any misstatements about CScape.

    Second ... so if I can place the CScape buildings anywhere, and I'm not constrained by grouping buildings in blocks bound by the integrated sidewalks and streets ... then why can't the buildings be placed, sized, and oriented in accordance with street map info, as from Map-ity?

    From your earlier description I thought you were saying the efficiencies for CScape came from constraints on building placement.
     
  43. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    203
    Woah, awesome performance.
    What CPU/GPU was that running on?
     
  44. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    I dont own a copy of Map-ity so I don't know how it actually works. From documentation that I've found, it seems that it exposes building heights and their shape as a curve. Exposing heights is good thing, but Cscape would have some problems on guessing shapes and mapping them to CScape shapes only from shape data. I could probably make some sotlrt of script that analyzes shape flows, to guess their area. But only if those shapes are separate and it prpbably wouldnt work for all type of buildings. It should be pretty complicated but It could be done. But, and there is always one but.. it seems that map-ity isn't supported by its developer anymore. No updates in a last year and forum seeems almost dead. This means to invest time into supporting an asset that has incertain it's future.:(
     
  45. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    Laptop with I7 6700 at 2.6 ghz with a GTX1070.
     
    hopeful likes this.
  46. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    Any tips on this. I want to add a spline game object. The spline only have two points (just a line)The two points of one spline correspond to the two ends of each stretch of road. This is for a traffic system. How do I approach this?
     
  47. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,877
    The shape of the building is not as important for me as the dimensions and location. If I can get that, without overlapping other buildings or streets, that would be great.

    There is a precision issue with CScape, isn't there, of 3m boundaries? The tricky part would be to adjust the building size down on X or Z so that the building fits within the shape, including the possibility of a curved or angled road.

    As for the Map-ity devs, they're always quiet. They can still almost certainly be reached by email. There is already the example for building BuildR buildings from the data. It could be adapted to create CScape buildings.
     
    Shawn67 and coverpage like this.
  48. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,452
    I don't know how good are you with coding. It isn't hard to do. Approach is more or less this:
    Iterate children objects of Streets objects in Cscape city hierarchy with CSsteet comppnent. You can get a value of road positions with values of CSstreet.depth abd CSstreet.width int values. Those values are in CS units.. one cs unit is 3 unity units.
    Today I'm out from my studio, and I dont have acces to Oc and Unity.. I can make youa template script that positions objects on certain ppints of your road.. so from there you can adoot it to something that suits your needs.
     
    Alverik and hopeful like this.
  49. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    Thanks for the reply and the template. I think it's ok, I can do that myself. Reason I asked was because I was wondering if I should do it at the cdk level before generation.
     
  50. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    2,196
    Wow... This looks amazing! Hope I can still get in on the discount when I get paid on the 15th!!

    One quick question. You mentioned that in the future you have plans for an apocalyptic version. Will those additional city types be addon packs that we purchase to run alongside the base system of this pack or will they be standalone packs totally separate from this one?

    Ok. I lied.. At least one more question. lol Is it safe to assume that if we have our own buildings we can use this regardless of time period? My two genres I'm currently working with are medieval/fantasy and survival/post apoc. So one thing I'd be interested in doing in addition to the post-apoc would be using 3DForge's modular pack to create buildings for the medieval/fantasy genre. In your saying we can use our own buildings I'm hoping things are generic enough with genre that we can layout small villages or even layouts within city walls which could surround a castle and it's surrounding city.

    Oh.. Last question. I wasn't looking to see if this is all run-time or if we are able to save city layouts created in the editor. In case I miss the answer as I go back and look, are we able to create and save/reuse the created city layouts?

    Thanks and keep up the awesome work!