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
    Have you updated shaders for unity with this pack?
    https://forum.unity.com/threads/rel...uilding-generator.460380/page-13#post-3481739
     
  2. MalandroVR

    MalandroVR

    Joined:
    Jan 4, 2017
    Posts:
    3
    Olivr can you please make a youtube tutorial about how to put/make/add textures materials.. i need to change but i dont understands thoose materials
     
  3. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Is there a manual for CScape? This might be great for me, but I need to check out the abilities. For example: I have curved roads, have to have them, and so moving the buildings might be acceptable to be. I also have to have lighting that responds to the AudioSource.GetSpectrumData, so I need to learn how your are affecting some of the values (nice set of videos btw)

    And even if I can't use this asset (drats) it is very impressive.
     
  4. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    hopeful likes this.
  5. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    In that case you have to put your houses manually. as they are modular and cen be resized this shouldn't be a hard task. Just generate many buildings,than move them and resize them to your liking. It isn't automatic, but it gives you a much of artistic freedom.

    This is a quite difficult question when I don't know what you have to do exactly. Could you please give me more insight on what you want to do? (even in private if you don't want to spoiler anything in public).
     
  6. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Did you check this one?
     
  7. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Which one? You mean all these posts, or was there supposed to be a link for me to follow? If it is the former, I have started looking through the posts, but none from page 1 to 14, which I want to do, but after the first 4 pages I started searching for key words, then though I'd see if there was documentation and... that's where I'm at now.

    I have reviewed your videos, and it touches on some items I'm looking to do.

    re: Spectrum Data

    What I want to do is control the lights in windows of your buildings. In one of your videos (49 mins) you show the Directional Light moving as the sun and windows in multiple windows turn on and off. That might work great for me (I have been playing with low poly, but your asset will VERY much improve my game) but I need to see how to control the windows and lights. And I have other design considerations, which is again why I hope for a manual so I don't bug you with a dozen questions
     
  8. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Hey so I'm trying to use Microsplat with Cscape but it must have a 0-1 UV continuous UV space like a Unity Terrain, By any chance it does?
     
  9. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Ok, so I spent the day reading all of these posts, very informative, however the one big thing I need, and it was asked but not answered so I have to bug you: Can I control specific windows/rooms or floors. I saw you posted code to loop through all buildings and set them to black, but I want to control windows and the external building lights at runtime. Is this possible?

    Also, I thought I saw that there could be an issue with conflicts with terrain. There was a couple of posts at the beginning of this, and I'm not sure if it changed or if I know what it is talking about. It would be nice to have some hills/valleys, and yes I know that would mean I would have to manually affect position and other attributes (it's a small price to pay, so I'm okay with it)

    Have a great weekend
     
  10. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    You can controll general behaviour of lights on runtime, but only on per city basis. Not on a per building basis. This means that you can use CSLights control script, and it' Curve X value (i should rename this, as it's pretty non intuitive). This curve controlls when will lights hit in in day/night cycle, and their frequency/intensity.

    If you place manually buildings, this shouldn't be a problem. But you can't use CScape streets in this case.
     
  11. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Sorry, I don't understand what you mean. I'm not a user of Microsplat, but, as I understand, it is a terrain system. Actually, I don't understand how it relates with CScape?
     
  12. DanielFF

    DanielFF

    Joined:
    Aug 29, 2012
    Posts:
    41
    Hi,
    I bought the asset and I'm really enjoying it. But I have some doubts, for example: the demo scene size is 3.5MB but if I just open and save the scene it goes to 100MB (and my new scenes too ) could you tell the reason? I use unity 2017.3.0f
     
  13. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    This is because unity saves all meshes inside scene file. To reduce a file size, you can find a menu item in File menu/ Save CScape scene. It will reduce file size as with demo scene at a cost of longer loading time.
     
  14. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Well drats, this is not what I wanted to hear. My project NEEDS to be able to control the lights. arg arg arg.

    EDIT: So to clarify: You mention that I can control frequency and intensity. Is this of the rooms AND the building's exterior lights? I need my city to react to the music (via the Audio Spectrum data) and I might be able to use your city by creating a 1x1 city as a block and each block is affected. But I HAVE to be able to control the lights. I see that in design time I can adjust the position and height of the building's exterior lights, is this available at run time. Do you have any other thoughts on how I can do what I need with your asset?
     
    Last edited: May 26, 2018
  15. Ylor

    Ylor

    Joined:
    Dec 15, 2014
    Posts:
    16
    Hi!

    I'm very impressed with your asset! It's exactly what I need for my current project! I do have one question, though! I tried adding custom prefabs as "foliage". It didn't work. So I added the CSFoliageInstantiator script to them, and changed the settings to mimick those of the standard foliage included, but then the whole editor just froze when I clicked "add foliage". Any Ideas? How should this be done? Or it's not supported?
     
  16. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I have CScape city with lighting using Enviro sky and weather and the enviro directional light.

    When I progress time the city lights come on at 6PM and go off at 7PM. Meaning they are off all through the night.

    Is there a way too adjust the hours that the lights and building lights are on?
     
    Last edited: May 26, 2018
  17. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    ..and as long as I am bothering you... COULD it be possible to add the functionality, by myself or you, or is is something outside the capabilities of the framework you built? If it is possible, I'd be HAPPY to do it. I've been a business software developer for 20+ years, so I know working with objects and code, I'm just not a designer (at ALL!)
     
  18. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Well i want to create mountains and parks etc So im trying to use Microsplat it can work on a mesh just needs to have a 0-1 UV continuous UV space like a Unity Terrain, By any chance it does?
     
  19. kailashvetal47

    kailashvetal47

    Joined:
    Oct 15, 2014
    Posts:
    7
  20. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    -Be sure that you are using only WEBGL 2.0 (in player settings).
    -Go to Edit/Graphics Emulation and set "No Emulation".
     
    kailashvetal47 likes this.
  21. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Hmm.. I still don't understand. Do you want to apply microsplat materials on CScape meshes? Well, this wouldn't work. You have to add meshes manually to your scene. (and no, Cscape doesn't use continuous space for UV - as it has to write complex information into a UV).
     
  22. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Not sure if you did it correctly. You should probably take a Folliage object and replace a Original Object to your prefab. Then rename Folliage object, and use this one as a prefab to insert into Street Folliage Templates.
     
  23. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    No, this can't be controlled on runtime. That information gets baked, compressed and written directly into a mesh as Vertex colors and UV coordinates. This means that if you want to change that data, you have to reconstruct whole mesh for all buildings. Something that would take as much time as a city generation. You can probably add assign more materials with different settings to diffferent buildings. So that they get triggered differently. But this will also make your drawcalls much higher - resulting in a loss of performance. But this is quite relative and should be tested.
     
  24. kailashvetal47

    kailashvetal47

    Joined:
    Oct 15, 2014
    Posts:
    7
    Thanks for quick reply. "Graphics Emulation" this was the culprit.
    Working well on 2018.1.0f2 WebGL
     
  25. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Ah, ok. Drats. Thanks for the clarification, but drats.

    I still don't understand one thing, while watching one of your videos you show that moving the Directional Light makes the buildings light up, and I can see various lights on the building come on and off. So I can see that at runtime changes are being made. May I ask how this is done? I really do love what you have done, and I want very much to use your asset

    EDIT: Another possible solution for me: Are your buildings a mesh with an image wrapped on to them? If so I can then edit the image to achieve what I need. eg: I can make areas within the image transparent so that I can place a quad with emission behind it.
     
    Last edited: May 28, 2018
  26. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Ok Thanks, Two more questions I want to make a city coastline , At some point integration with flat terrains and water systems (Oceans) Could do some justice, Is that something that is possible? and Will there be other City Objects that will get added to Cscape like tunnels for trains, Overpasses, etc?
     
  27. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    fyi: I purchased the asset. At very least it looks like I can use the Glass property during runtime. I would love, Love, LOVE a list of properties that are available at runtime.
     
  28. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Does the internal mapping work if the buildings aren't aligned to a cardinal axis? i.e. are the buildings fully rotatable?
     
  29. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    I just loaded CScape into a new blank project. After I pressed the "Set Build Settings" button on the City Randomizer script (ref: setting up the project) I got the following errors. Not a big deal, but I thought you would want to know.

    Unity 2017.3.1f1

    -------------------------------
    Assertion failed: unsupported platform: couldn't get group name for target %i
    UnityEditor.PlayerSettings:SetUseDefaultGraphicsAPIs(BuildTarget, Boolean)
    CScape.CityRandomizerEditor:OnInspectorGUI() (at Assets/CScape/Editor/CityRandomizerEditor.cs:92)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    -------------------------------
    Assertion failed: Unknown platform 27 in GetTargetPlatformGraphicsAPIAvailability
    UnityEditor.PlayerSettings:SetUseDefaultGraphicsAPIs(BuildTarget, Boolean)
    CScape.CityRandomizerEditor:OnInspectorGUI() (at Assets/CScape/Editor/CityRandomizerEditor.cs:92)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    -------------------------------
    Assertion failed: Unknown platform 27 in GetTargetPlatformGraphicsAPIAvailability
    UnityEditor.PlayerSettings:SetGraphicsAPIs(BuildTarget, GraphicsDeviceType[])
    CScape.CityRandomizerEditor:OnInspectorGUI() (at Assets/CScape/Editor/CityRandomizerEditor.cs:93)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    -------------------------------
    Assertion failed: unsupported platform: couldn't get group name for target %i
    UnityEditor.PlayerSettings:SetGraphicsAPIs(BuildTarget, GraphicsDeviceType[])
    CScape.CityRandomizerEditor:OnInspectorGUI() (at Assets/CScape/Editor/CityRandomizerEditor.cs:93)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    -------------------------------
    Assertion failed: unsupported platform: couldn't get group name for target %i
    UnityEditor.PlayerSettings:SetUseDefaultGraphicsAPIs(BuildTarget, Boolean)
    CScape.CityRandomizerEditor:OnInspectorGUI() (at Assets/CScape/Editor/CityRandomizerEditor.cs:95)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    -------------------------------
    Assertion failed: Unknown platform 4 in GetTargetPlatformGraphicsAPIAvailability
    UnityEditor.PlayerSettings:SetGraphicsAPIs(BuildTarget, GraphicsDeviceType[])
    CScape.CityRandomizerEditor:OnInspectorGUI() (at Assets/CScape/Editor/CityRandomizerEditor.cs:96)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    -------------------------------
    Assertion failed: unsupported platform: couldn't get group name for target %i
    UnityEditor.PlayerSettings:SetGraphicsAPIs(BuildTarget, GraphicsDeviceType[])
    CScape.CityRandomizerEditor:OnInspectorGUI() (at Assets/CScape/Editor/CityRandomizerEditor.cs:96)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    -------------------------------
     
    Last edited: May 31, 2018
  30. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Help: Flickering

    I noticed that when I turn on VR and look up I get a bit of flickering. So I created a new project, only added CScape and made no other changes (other than the two buttons that set the project settings) I pressed "Generate City" and put on the Rift and looked up, a little bit of flicker. I changed the Max Building Height from 10 to 50, generated and played again. The flickering is more pronounced. I then changed the city size from 10 x 10, to 2 by 10, but kept the height at 50 and the flicking basically went away.

    Here is the system I am using: https://www.amazon.com/gp/product/B01B96MNNA/ref=oh_aui_search_detailpage?ie=UTF8&psc=1

    Unity in run-time is using minimal CPU and GPU

    Please get back to me asap, as this has halted progress. Your asset looks great, but this worries me.

    Thanks
     
  31. steveR

    steveR

    Joined:
    Jul 14, 2013
    Posts:
    33
    I am considering using this asset with the Oculus GO VR headset. I believe that I saw in one of your videos that a color space of Linear is required. I need to use a color space of Gamma with the Oculus I believe else I cannot run. Can your asset run ok using a Gamma color space?
     
  32. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    This happens if you don't have installed players for uour unity version. It is harmless.
     
  33. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    What fo you mean by flickering? Low framerate or real flickering?
    What unity version are you using?
     
  34. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Sorry, I included the Unity version in my other post (thanks for the clarification, but as a long time software developer I though you'd want to know, just in case.

    Anyway: Unity 2017.3.1f1

    It is both a flickering and a lower frame rate. A simple script shows that frames are dipping at about 30 per second. It's late here in NYC, so tomorrow morning when I get back to it I will be checking this with the profiler. If you have any suggestions I am open to attempting anything.

    Have a good night

    --------------------------------
    EDIT: Friday Morning EST: VSync is showing the be the issue. I am starting to look into what I can do to fix this, but wanted to inform you asap

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

    EDIT 2: Just in case I compiled the game and the situation is still as bad....

    Back to more research

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

    EDIT 3: I moved the Quality from Ultra to High and frame rates and the flicker are gone. Hope this helps you and anyone else who has this issue.

    Have a great weekend
     
    Last edited: Jun 1, 2018
  35. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Sorry for not responding, but until Monday I’m on a trip without possibility for stable contenterei connection.
    Apparently, this must be some kind of unity Bug and probably not even closely related to cscape. I will see if I can reproduce it. Great that you’ve found a solution.
     
  36. piegaro

    piegaro

    Joined:
    May 17, 2017
    Posts:
    10
    Does anyone tried and success porting this asset to the new Unity 2018's Lightweight Render Pipeline?
    Olix could you have a go on it? Thanks a lot for your effort, your asset rocks!
     
    olix4242 likes this.
  37. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Hi, if you search here, you can find a pack that I've posted, that updates your Cscape for usage with LW SRP. ;)
    https://www.dropbox.com/s/yxxcieotd35lcwi/LW_SRP_2018_Patch.unitypackage?dl=0
     
    Last edited: Jun 7, 2018
    hopeful likes this.
  38. NicoFlows

    NicoFlows

    Joined:
    Feb 23, 2016
    Posts:
    5
  39. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    328
    Will there be any Integration with environmental assets such as Gaia or Megasplat?
     
  40. Augunrik

    Augunrik

    Joined:
    Mar 4, 2018
    Posts:
    2
    Hi everyone!

    I recently bought the asset and now I want to create the interior map. I do have a cube map, how can I convert it to the interior map you are using?

    Thanks!
     
  41. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
  42. 22

    22

    Joined:
    May 22, 2009
    Posts:
    63

    Attached Files:

  43. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Be sure that you don't have active any Graphics Emulation functionality (in unity go to Edit menu/Graphics emulation/No Emulation)
     
  44. Hinovus

    Hinovus

    Joined:
    Jan 21, 2013
    Posts:
    5
    Hey

    I've applied patches and I have green buildings also.

    Any help appreciated!
     
  45. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Performance question. I am using a 3rd party road asset (Easy Roads 3D) so that I can have curved roads. The problem I am having is aligning your buildings to their roads. I tried doing it manually but it's painful and slow. So I looked into ways to move the buildings in the editor via script. That hasn't gone well (so far)

    My next option is within the ability of ER3D, they have a "Side Objects" function for placing items along the side of the road (eg: Telephone polls, bus stops, etc) I can us CSCapes as an Side Object, however this means that there would be many (hundreds?) of CScape objects. Would this affect performance? (which is AWESOME btw, THANK YOU!!!!!)
     
  46. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    I asked about ER integration about a week ago and he said he would look into doing one, not sure what the status is on that. Hopefully something is in the works as this would be an incredibly powerful combination. Yes, right now you would have to either; place multiple cscape objects, each as a side object, OR you could prefab a bunch of cscape buildings, and then place those prefabs as side objects. Once placed you would have to parent them under the cscape buildings to actually get created.
     
    tapawafo likes this.
  47. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    163
    Hey there,
    Very interested in buying this product. I have searched for a picture or video of a really huge city made with this package, but havent found one. You know, houses up to the horizon. Is that possible with a decent performance ?
    Thanks !
     
    d1favero likes this.
  48. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Last night I believe I found the pattern that might make this work. I currently placed 16 cities (400x400 each) and then laid out the roads, not in a grid, so because of this I have to adjust hundreds of buildings. I have spent a couple of days working through multiple options and I think I worked out the math. I will get back here with an answer one way or another in a couple of days.
     
  49. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    I have a VR game I am creating and the terrain is 3200x3200. I broke it up into 16 neighborhoods that are 400x400. Each neighborhood as a CScape city and depending on where the player is I can turn off neighborhoods not in view. The performance has been great. With this method I can grow the game as large as I want.

    This is the system I am developing on
    https://www.amazon.com/gp/product/B01B96MNNA/ref=oh_aui_search_detailpage?ie=UTF8&psc=1
     
  50. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    Here you go, a quick and dirty sample:

    Screenshot (89).png

    This is a city 20x20 CSCAPE units size, which is around 2000x2000 unity units. Are those houses enough up to the horizon? The screenshot is roughly from the edge of the square, so you pretty much see the whole city, and you can see how many draw calls this generates.

    I tried to generate a city 30x30 but there seems to be a memory leak? @olix4242 memory increased by ~5gb over a short period of time and would not decrease, but with a bunch of other stuff open I had to kill that unity instance. Tried a bunch of times, but the same thing each time.
     
    Last edited: Jun 17, 2018
    d1favero, sharkapps and secondsight_ like this.