I just wanted the dev to know, I've solved my issue. It was my fault, sorry. In instructions of JamesWjRose, somehow I've skipped the first step and created new black scene, instead of using "CScapeToolkit"scene.
However, now I want to know if it's possible to have two or more sets of facades. I thought, if I change folder name in the "Texture Folder" box of the "CS Material Tools" script of Cscape City, it will read textures from that new folder, but it didn't work (pressing "compile" buttons does nothing).

Seems like the dev still has not addressed my previous questions . But I have more questions!
1.How do I remove grey stains. I tried to adjust "faced lights", but it only places stains somewhere else. An example is shown in the screenshot below.
2. I can't make floor colors and main colors to match. I adjusted "building floor colors" but it never completely matches the colors. Why? An example is shown in the screenshot below.
3. Seems like, it's impossible to remove "height subdivision". Am I correct? It looks like it is possible to remove"width subdivision", so why not the height one???

I thought, if I change folder name in the "Texture Folder" box of the "CS Material Tools" script of Cscape City, it will read textures from that new folder, but it didn't work (pressing "compile" buttons does nothing).

Click to expand...

Check that all textures have read/write flags set to true. Otherwise, a script can't read those textures.

2. I can't make floor colors and main colors to match. I adjusted "building floor colors" but it never completely matches the colors. Why? An example is shown in the screenshot below.

Click to expand...

You can't - floor color always influences building color, so those colors aren't separable. This is due to how shader works - due to optimization I had to drop support for separating those two colors. (as we have finite number of instructions that can work together).

3. Seems like, it's impossible to remove "height subdivision". Am I correct? It looks like it is possible to remove"width subdivision", so why not the height one???

Click to expand...

You can't remove both of them (height or width). Eventually, you can remove only on buildings that have less floors or width of a division frequency. Also, this is done for shader optimization purposes. having the ability to remove them would require too much instructions and would result in slower performance.

Oliver, is it possible to add assembly definition files? CScape is used in a bigger project together with a lot of other assets. And assembly definition files can heavily reduce the compile time in a bigger project.

Oliver, is it possible to add assembly definition files? CScape is used in a bigger project together with a lot of other assets. And assembly definition files can heavily reduce the compile time in a bigger project.

Click to expand...

This is a neat idea and I will see to introduce it in a next version. Main problem is that it works only in Unity 2018.3 or later, so I will implement it when I drop support for Unity 2017. But probably dropping support this has to be done as Unity 2019.1 cycle is started and LWRP render pipeline is finished. So, you can expect new versions of CScape to work only with Unity 2019.1 with added LWRP support and assembly definition. I also hope that HDPR will enter it's final stage soon, so that i can finally give a stablke HDRP solution.

This is a neat idea and I will see to introduce it in a next version. Main problem is that it works only in Unity 2018.3 or later, so I will implement it when I drop support for Unity 2017. But probably dropping support this has to be done as Unity 2019.1 cycle is started and LWRP render pipeline is finished. So, you can expect new versions of CScape to work only with Unity 2019.1 with added LWRP support and assembly definition. I also hope that HDPR will enter it's final stage soon, so that i can finally give a stablke HDRP solution.

Click to expand...

Let's be sure to get a version that works with 2018 LTS in there somewhere.

This is a neat idea and I will see to introduce it in a next version. Main problem is that it works only in Unity 2018.3 or later

Click to expand...

Maybe a folder with additional imports such as "AsmDefs.unitypackage" could solve this. So users interested in this can add this feature by importing the package. I'm not sure, but would think it works also for versions < 2018.3, because it is in a separate package. So it could simplify your struggle with different versions, at least a little.

hi @olix4242, I'm trying to use CScape on mobile and I get really terrible performance on android devices. From the profiler, it looks like it spends 600ms in GPU in "RenderForwardOpaque.Render -> Clear" for 99.5% of the time. So I assume your shader is pushing GPU out of its limits. I've tried it on P9 Lite - I know its rubbish but it is not that better on P20 Pro - which I would say is mid-high end phone. Haven't tried iPhone yet.

Are there any tricks I can use to boost up the performance on mobile (android in this case)?

EDIT
I forgot to mention that I've already tried all optimization options included in cscape, no luck.

I forgot to mention that I've already tried all optimization options included in cscape, no luck.

Click to expand...

All optimization options? There are so many, that it's pretty hard to guess what might be wrong. Unity on it's own has many optimizations that can be made. Have you done Occlusion Culling baking, are you using deferred rendering, realtime shadows, any post processing effects and so on.. Also, how big is the city?
I didn't try p9 lite, so can't say anything abouit it's graphics performance and if it has some bottlenecks.

Sorry, by all optimization option I mean all available as a button inside City Randomizer Script:
- optimize performance
- optimize for mobile
- strip cs scripts

I'm using forward rendering which should be lighter than deferred.
Post-processing and shadows are switched off.
As for occlusion culling and city size - well it doesn't matter if I generate a full city of size 10 by 10 or only one cell ... as soon as I put one single building on a scene then the frame rate goes down from 30 to 2-4 FPS.

I made a collection of Building Templates and created a new Building Template Group. I added all of my templates (55 total) and when I add that template to the "Building Templates" section of the "City Randomizer" script and then press "Generate City" I get the following error:

This happens if my template group has more than 29 items (I noticed that "MegaCityDistrictStyle" has 29 items) I created a copy of my template and reduced the number of items to 29 and did NOT get the error.

Is this a hard limit? If so, is there a limit on the number of building template groups? I'm happy to have fewer templates per group, I just want to be sure.

Sorry, by all optimization option I mean all available as a button inside City Randomizer Script:
- optimize performance
- optimize for mobile
- strip cs scripts

I'm using forward rendering which should be lighter than deferred.
Post-processing and shadows are switched off.
As for occlusion culling and city size - well it doesn't matter if I generate a full city of size 10 by 10 or only one cell ... as soon as I put one single building on a scene then the frame rate goes down from 30 to 2-4 FPS.

Is there anything else I can check?

Click to expand...

If you have Anisotropic Textures on "Forced On," try changing that to "Per Texture." I know that gave me much better performance with an earlier build.

This happens if my template group has more than 29 items (I noticed that "MegaCityDistrictStyle" has 29 items) I created a copy of my template and reduced the number of items to 29 and did NOT get the error.

Is this a hard limit? If so, is there a limit on the number of building template groups? I'm happy to have fewer templates per group, I just want to be sure.

Click to expand...

No, there shouldn't be any limit. I will have to check - I assume that some arrays doesn't update themselfs as they should.
Or, maybee it's one another thing: first building has to be small - one CS unit (3 unity units) - otherwise you might expect problems.

No, there shouldn't be any limit. I will have to check - I assume that some arrays doesn't update themselfs as they should.
Or, maybee it's one another thing: first building has to be small - one CS unit (3 unity units) - otherwise you might expect problems.

Click to expand...

I made about 50 templates, added all of them, got error. Removed the last 20 from that list, did not get the error. The first template never changed, so I don't think that's the issue.

If you have Anisotropic Textures on "Forced On," try changing that to "Per Texture." I know that gave me much better performance with an earlier build.

Click to expand...

It is already set to "Per Texture", but thank you for trying to help.

I've made some more investigation on this mobile performance topic and there are 2 things that allow me to achive 30 FPS on this old mobile:
1. scale down the resolution to 30DPI which looks like 480x320
2. replace MegaCity1 shader to Mobile/Bumped Diff - this way I was able to get stable 28FPS even on the city of size 10 by10 however, I've lost all the goodies included in CSBuildingShader

The next thing I will try is to lower the texture size for buildings and use it with CSBuildingShader.

@olix4242 I've noticed that there is no LOD system for buildings, while streets and rooftop details have their own, is it intentional?

I've made some more investigation on this mobile performance topic and there are 2 things that allow me to achive 30 FPS on this old mobile:
1. scale down the resolution to 30DPI which looks like 480x320
2. replace MegaCity1 shader to Mobile/Bumped Diff - this way I was able to get stable 28FPS even on the city of size 10 by10 however, I've lost all the goodies included in CSBuildingShader

The next thing I will try is to lower the texture size for buildings and use it with CSBuildingShader.

@olix4242 I've noticed that there is no LOD system for buildings, while streets and rooftop details have their own, is it intentional?

Click to expand...

I would tend to think that reducing the texture sizes is likely to help. Please let us know if it does, and how much. It's just good to know.

Definitely, androids don't like CSBuildingShader, especially considering that P20 Pro is faster than iPhone SE for about 25%.

Click to expand...

I don't think that it has anything to do with Android. I was able to to render VR (stereo) with Samsung S6 and Gear VR.. and it's a 4 years old phone. Also, those phones rendered perfectly any scene. On samsung 8 or later, I was been able to run extreme big cities.
What I know is that some low end phones use crippled graphics - that doesn't natively support texture arrays - so it might all come to this. Didn't had any chance to test any of those phones. But I would suggest you to try one more thing: turn off mutithreading in build settings. It can sometimes interfere with graphics performance.
If you want, you can send me an APK of your game, and I can test if it works on Galaxy S8 (or S6). If it doesn't work, than we can try to see if there is another problem related to compiling.

Ok, I just did a check on S8. Performance is in 15 fps range. Not too good. But I think that I know what could be a problem: you have activated parallax occlusion mapping on building shader - and it kills performance. Most mobile phones require to decativate it.

Can you send a screenshot of close up of any building? I wan't to check if POM is really disabled (just to be sure that script that manages it works as expected).

Click to expand...

You are absolutely right! I can clearly see the difference in the editor when I'm changing POM so this means it is working inside the editor, however on a phone no matter what I select the POM is always enabled.

You are absolutely right! I can clearly see the difference in the editor when I'm changing POM so this means it is working inside the editor, however on a phone no matter what I select the POM is always enabled.

Nope, to be sure I've just created a city from scratch with disabled POM, and it is still there.

Click to expand...

It looks like there is some problem with swithing shaders. Could be also a Unity bug.
Here is a simple script that you should attach to any object in your scene. It should fix this issue.
If it doesn't work for some reason, try to modify this script by changing lines
Shader.EnableKeyword("_CSCAPE_DESKTOP_ON");
to
Shader.DisableKeyword("_CSCAPE_DESKTOP_ON");
(just to check if we are dealing with Unity bug)

Attached Files:

It looks like there is some problem with swithing shaders. Could be also a Unity bug.
Here is a simple script that you should attach to any object in your scene. It should fix this issue.
If it doesn't work for some reason, try to modify this script by changing lines
Shader.EnableKeyword("_CSCAPE_DESKTOP_ON");
to
Shader.DisableKeyword("_CSCAPE_DESKTOP_ON");
(just to check if we are dealing with Unity bug)

Thanks again! I've forced the unity to disable the POM on a phone, but it is not much better. I mean the framerate is in range 12-16 but occasionally it jumps to stable 30 for a few seconds and it drops again to 15 for a few minutes. Maybe it's throttling ... I don't know yet.

Thanks again! I've forced the unity to disable the POM on a phone, but it is not much better. I mean the framerate is in range 12-16 but occasionally it jumps to stable 30 for a few seconds and it drops again to 15 for a few minutes. Maybe it's throttling ... I don't know yet.

Click to expand...

I tested your apk on my LG v20 and it was noticably slower compared to a version i built with cscape. Although mine was using unity 5.6 at the time.

Oliver,
I'm attempting to change the textures however I am getting an odd situation. To start I changed only one texture: \Assets\CScapeCDK\Editor\Resources\CScapeToolset\Surfaces\basecolor_surface_01.png and it's normal file: normal_surface_01.png

I replaced it with an image I purchased from GameTextures.com (great site, I highly recommend) and it's normal image. The new image is 512x512, as it's normal, just like the original image. When I press the "Compile all textures" I get this issue: https://imgur.com/a/u4PoGq5

I re-imported the CScapeToolsetSources package and the original image basecolor_surface_01.png was again the bricks you include. However, even after pressing the "Compile all textures" button the city still looks wrong. No errors are showing up in the console. I have opened and closed the project, rebooted my machine and still the issue persists. I also tried recreating the city by pressing the "Generate City" button, but still the issue persists. I also deleted the city from the project Hierarchy and then added it again, and again pressed the Generate City but still the issue persists.
I then deleted the CScape folder in the project, but NOT the CSCapeSDK folder, and then again added a city to the scene and pressed "Generate City". This time when the city is generated the original brick texture is used and the city looks correct.

So there seems to be a couple of issues... but I don't know how to proceed.

Thoughts?

Thanks
James

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

EDIT 1: I created a new project on a different system, added CScape and the CScape Toolkit, changed the one image (basecolor_surface_01) and pressed "Compile all textures" without any issue. The new image is used on the buildings. I'm not sure how this helps, but I wanted to let you know.

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

EDIT 2: DratsDratsDrats. Turns out I am getting warning messages (had only Info and Error buttons pressed on the Console... my bad!) Even without changing the original image, when I press the "Compile all textures" on my development machine (as opposed to my laptop in "Edit 1") I get 163 instances, at a count of 10 warnings per instance, on the following message:
Graphics.CopyTexture with a region will not copy readable texture data for compressed formats (source texture format 12)
UnityEngine.Graphics:CopyTexture(Texture, Int32, Int32, Texture, Int32, Int32)
CSMaterialTools:CreateStyleShapes() (at Assets/CScape/Scripts/CSMaterialTools.cs:117)
CScape.CSMaterialToolsEditor:OnInspectorGUI() (at Assets/CScape/Scripts/Editor/CSMaterialToolsEditor.cs:57)
UnityEngine.GUIUtilityrocessEvent(Int32, IntPtr)

You and I have gone over this before, a few months back. Sadly, neither of us found a solution. I will do more research. Let me know if you find anything.

Standard city lanes are in real life mostly 2.5m to 3.20m. CScape uses 3 meters for convenience on staying on a grid. You should count that a standard car has a width of 1.75 meters.

No, unfortunately there isn't - and it would be extremely complicated to modify CScape to use a different scale.
But there is probably a good workaround for this issue. If you go to street Material, and search for StreetDecals texture - set Tiling X to 0.5 and Y 0.5 you could have a double lane size. This will create larger lanes, but it will add a half lane on some of the streets. I have just tested this and it even looks better than before, as that lane looks like a bycycle lane.

Click to expand...

in the US the interstate highways standard width is 3.7 meters. which is what my world scale is based upon. my vehicles barely fit in their lane so it makes it difficult for my users. i tried the tiling you suggested but it doesnt appear correct. gets rid of some of the road lines and stuff.

was hoping we can maybe get 2 separate scales or something because this has been a problem for me since it was released.

Hi Oliver,First of all great job for making this awesome asset and making it affordable for small devs like me.
I purchased it this week and didn't got time to play with it but now i played with it little bit i have some problems.
I Made a new scene and made a default cscape mega city (simple) with all default settings and it was telling me to "Turn Off Lightmap Baking" i did that and i am making it for mobile so i generated the scene without the lightmap baking and after few minutes the light was generated and nothing happened.When i played the scene in editor window the streets were still black Here's the screenshot https://imgur.com/a/yHUNxB4 and ran it on android device and voila the streets were colored but the performance was the lowest i could imagine.I have S9+ and the device barely loaded the scene and the fps was 10-15 i thought that's because the lighting is not baked or something so i turned on the lightmap baking and used the same progressive lighmapper and in 10 seconds my display driver crashed....it happened everytime i used progressive lightmapper with baked lighting on.

I want to use baked lighting because it really boosts the performance of game in mobile and now i don't have any idea how can i bake the light while using cscape.It only shows the light in device but i need to see streets and the look and feel of my game in editor too.

and also there is almost no documentation rather than some videos which explains the basics of the older version but this one is different from them.

Other than that the asset is great so far.I am able to make an awesome city in just few clicks.Peace.

I want to use baked lighting because it really boosts the performance of game in mobile and now i don't have any idea how can i bake the light while using cscape.It only shows the light in device but i need to see streets and the look and feel of my game in editor too.

Click to expand...

Main problem with baking large city is that it requires much of a video memory. City has a large surface 3D area (you have to count for tall buildings and a space that lightmaps occupy in memory). Baked light for this kind of scenarion on mobile is almost impossible to do right.
You are probably getting crashes because of too much Vram required. You didn't mention your build sizes.
Also, be cautious with progressive lightmapper - it is still in experimental version, and it i'ts better to be used in developement phase.. and not for builds.

I Made a new scene and made a default cscape mega city (simple) with all default settings and it was telling me to "Turn Off Lightmap Baking"

Click to expand...

There is a bug in latest unity with simple Cscape city (it happens on some systems) where it doesn't work correctly. Create Complex city, and deselect Use Quadtree and slanted streets and you will get a same city as "simple".

In conclusion,The streets are black in editor and i cannot see anything colored except the buildings and the performance sucks dude,I Have i7 processor with 16 gb ram and 1080ti graphics card and my unity literally crashes whenever i try to select the Cscape City Object in hierarchy or try to move through the city.I mean if it doesn't work on the pc then how am i suppose to expect good performance in mobile And how am i suppose to make a game,missions,etc if i cannot move through the city.To be honest i was very hyped about CScape and saw many videos and it looked very smooth there but now i have tried it myself i am little bit disappointed.
Using the asset causes Lag like i am running it on 2005 computer,I worked on much more larger projects than this and never experienced this.I don't know how can i make a game with this much lag and unity not responding.Some Real Help Needed.

Few questions, How does lighting in CScape works and is it compatible with mobile,I mean is it an optimised way of lighting for mobile?

Do i need to bake light or just make the city and drop my player in it and play?
and if i do need to bake light then HOW? because it just does not allow lightmap baking and relatime lighting is Not So Much Mobile Friendly as far as i know.

https://imgur.com/a/7rHXSvU Take a look at this.Its the street shader and its just black no grate texture no ashphalt texture no noise,nothing like the shader is broken or something so i tried reimporting again and nothing happened.Any Help?

he performance sucks dude,I Have i7 processor with 16 gb ram and 1080ti graphics card and my unity literally crashes whenever i try to select the Cscape City Object in hierarchy or try to move through the city.I

Click to expand...

With that configuration you should have around 800 - 1000 fps in editor. Can you please check in unity profiler what steals your time? Can you please also check this by opening CScape Demo scene so that we can see if it has a same problem.
As for bnlack streets, did you check that you aren't using Graphics Emulation? (go to Edit/Graphics Emulation and set it to "No Emulation". Also, be sure to check that your build settings Graphics Api is set to GLES 3.0?
If you make a new and fresh project, import only CScape, does this behaviour still happens?

As for bnlack streets, did you check that you aren't using Graphics Emulation? (go to Edit/Graphics Emulation and set it to "No Emulation".

Click to expand...

After doing this the black street issue is gone but now i have Magenta Street Issue which doesn't look good either https://imgur.com/a/dcZ1qrV Here's The Screenshot....sorry for such a small view of street but the unity's scene view stuck there and unity stopped responding AGAIN!.
We'll talk about that issue later...first i need a city which looks like city so please first help me with the Street Issue...I'll find that unity stuck issue's solution later and again that same question,Does it work with Vulkan?

Oops...

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.