Search Unity

CTS - Complete Terrain Shader - Deprecated

Discussion in 'Assets and Asset Store' started by AdamGoodrich, Jun 19, 2017.

  1. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232
    No, you need to completely remove CTS, and then save and import the newer version of CTS 2019.
     
  2. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232
    Can you please tell me what version of Unity you are using, what pipeline you are using? Also, can you please send me a screenshot of the error console as well?
     
    Hawk0077 likes this.
  3. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Unity 2019.3.7f1, (same happened in 2019.3.6)
    Latest Pipeline (the one recommended) 7.1.8

    The console has these errors within it. Plus some too many keywords that keep repeating.

    Assets\Procedural Worlds\Gaia\Scripts\Editor\GaiaHDRPPipelineUtils.cs(312,56): error CS1061: 'PhysicallyBasedSky' does not contain a definition for 'airAttenuationDistance' and no accessible extension method 'airAttenuationDistance' accepting a first argument of type 'PhysicallyBasedSky' could be found (are you missing a using directive or an assembly reference?

    Assets\Procedural Worlds\Gaia\Scripts\Editor\GaiaHDRPPipelineUtils.cs(313,56): error CS1061: 'PhysicallyBasedSky' does not contain a definition for 'airAlbedo' and no accessible extension method 'airAlbedo' accepting a first argument of type 'PhysicallyBasedSky' could be found (are you missing a using directive or an assembly reference?)

    Assets\Procedural Worlds\Gaia\Scripts\Editor\GaiaHDRPPipelineUtils.cs(315,56): error CS1061: 'PhysicallyBasedSky' does not contain a definition for 'aerosolAttenuationDistance' and no accessible extension method 'aerosolAttenuationDistance' accepting a first argument of type 'PhysicallyBasedSky' could be found (are you missing a using directive or an assembly reference?)

    Assets\Procedural Worlds\Gaia\Scripts\Editor\GaiaHDRPPipelineUtils.cs(316,56): error CS1061: 'PhysicallyBasedSky' does not contain a definition for 'aerosolAlbedo' and no accessible extension method 'aerosolAlbedo' accepting a first argument of type 'PhysicallyBasedSky' could be found (are you missing a using directive or an assembly reference?)

    Assets\Procedural Worlds\Gaia\Scripts\Editor\GaiaHDRPPipelineUtils.cs(320,56): error CS1061: 'PhysicallyBasedSky' does not contain a definition for 'groundColor' and no accessible extension method 'groundColor' accepting a first argument of type 'PhysicallyBasedSky' could be found (are you missing a using directive or an assembly reference?)

    Assets\Procedural Worlds\Gaia\Scripts\Editor\GaiaHDRPPipelineUtils.cs(321,56): error CS1061: 'PhysicallyBasedSky' does not contain a definition for 'groundAlbedoTexture' and no accessible extension method 'groundAlbedoTexture' accepting a first argument of type 'PhysicallyBasedSky' could be found (are you missing a using directive or an assembly reference?)

    Thanks for the response by the way. Much appreciated Brian.

    ADDITION: Because of the console errors I cant access Gaia to follow the instructions given in the manual.

    FURTHER ADDITION: I have another project same setup which doesnt have the red squares but does have the same Gaia errors.

    Annotation 2020-04-01 193311.jpg
     
    Last edited: Apr 1, 2020
  4. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232

    Ah I see now. Gaia with HDRP currently is not available. This update will be coming soon to support 2019.3 HDRP.
     
    Mark_01 and Hawk0077 like this.
  5. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Does that include Gaia Pro? Im using Pro and in the manual it gives instructions but of course with the errors I cant access the manager.

    I will try uninstalling gaia to see what errors show.
     
  6. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232
    Yes, Gaia and Gaia Pro will not work with HDRP with 2019.3. Currently, you can use Gaia pro with 2019.3 but only with the built-in render pipeline. You will need to install the patch as well for Gaia Pro to work in 2019.3 and follow the instructions for the patch. https://proceduralworlds.freshdesk.com/a/solutions/articles/33000249597
     
    Hawk0077 likes this.
  7. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Ah right. Il reinstall it then and apply the patch. Not sure the red squares will go away though
     
  8. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Hi, I deleted Gaia Pro from both projects and they now have terrain issues. I am guessing this is CTS related as it was fine before I added CTS 2019.

    Issue 1: Project 1: The Red squares are still on the terrain when zoomed into the terrain.
    Issue 2: Project 2: Near is fine (not red) but far distance is all black.

    Any ideas how I can fix these two issues?

    Many thanks. Here are some images of Issue 1 and 2.
    Issue 1.jpg Issue 2.jpg
     
  9. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    507
    I have a new serious issue with CTS! After digging why start game inside an empty scene takes 8 second to load I figure out when CTS in inside my project it increase play mode time 3 seconds more (In a new empty scene! without any terrain or CTS script) :eek:
     
  10. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232

    For issue number two: Project 2: Can you please check your quality settings and make sure that it is on high. This is one thing that could be causing the issue. Please let me know!
     
  11. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232
    It could be the( Scripts/Editor/DirStructChecker.cs ) you will want to delete this as it keeps checking for older CTS and could be slowing it down. Please let me know if this fixes the issue!
     
    Crossway likes this.
  12. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    507
    That's correct. After I removed DirStructChecker.cs it reduced time.load from 9 seconds to 5 seconds! (Inside an empty scene) thanks. Please remove this script from newer versions :)
     
  13. imie_mp4

    imie_mp4

    Joined:
    Apr 18, 2018
    Posts:
    2
    Hey, thanks for a great asset.
    I have two questions:
    Is it possible to have multiple terrains in a scene with different profiles?
    Snow only shows up in play mode for me, what am I missing to make it show in the scene view?
    Thanks!
     
    Last edited: Apr 9, 2020
  14. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232
    Yes as the profile is attached to one terrain not the entire scene.
     
    imie_mp4 likes this.
  15. Monil

    Monil

    Joined:
    Apr 24, 2012
    Posts:
    102
    Hi,
    when i activate the cutout mode the transition with the snow is squared, i am using Unity 2019.3.9f1 deferred.

     
  16. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232
    We will investigate this and come up with an answer as soon as possible!
     
  17. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    116
    Hello,

    I recently purchased cts 2-19. (beautiful results btw)
    however when I try to add my own textures (I'm using naturemanufacturer's meadow pack)
    I get the black marks.
    So what I did is when I added the texture, I went to the profile, clicked bake textures then apply profile.
    And when I look for the texture that I added, in unity terrain, it's gone.

    Since I'm new there has got to be a button that I'm not pushing.
    Any constructive help would be appreciated.

    I'm using the first minute or so of the attached video as a reference.


    Although I suspect It might be an older version.

    Thanks!
    --Joshua
     
    Mark_01 likes this.
  18. shotoutgames

    shotoutgames

    Joined:
    Dec 29, 2013
    Posts:
    290
    This error with plugin installed? I deleted the substance plugin and still get the error

    The type or namespace name 'Substance' could not be found (are you missing a using directive or an assembly reference?)

    Code (CSharp):
    1. #if SUBSTANCE_PLUGIN_ENABLED
    2. using Substance.Game;
    3. #endif
    4.  
     
  19. Monil

    Monil

    Joined:
    Apr 24, 2012
    Posts:
    102
    Hi,
    after uninstalling the plugin did you check that SUBSTANCE_PLUGIN_ENABLED is not in Project Settings -> Player -> Scripting Define Symbols?
     
    shotoutgames likes this.
  20. shotoutgames

    shotoutgames

    Joined:
    Dec 29, 2013
    Posts:
    290
    Thanks! never knew of such a thing
     
  21. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Basic/Lite mode reduces my game fps from 58 to 47 That's too much to lose around 10 frames for terrain shader :eek:
    My PC is also powerful.
     
    Last edited: May 7, 2020
  22. Kytestar

    Kytestar

    Joined:
    Oct 9, 2018
    Posts:
    6
    A tad confused at the moment. Just came back to my project after a small hiatus. I noticed my Gaia was now Gaia 2 (which meant changing unity to 2019.3). However, my CTS did not change. I checked for an old version of Gaia, which is no longer in my assets. Can I use the old CTS with Gaia 2, and if not, did I miss something?
     
  23. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    A new update for CTS 2019 was released on the PW Store and the Unity Asset Store:

    v2019.1.6:

    - Changed URP shaders to prevent an unity issue with URP shadow cascades (black ring artifacts being rendered on the terrain)
    - Support for SRP versions 7.2.0 to 7.3.1 added. The summary of supported SRP versions is:

    SRP 4.8 in Unity 2018.3 & 2018.4
    SRP 5.7.2 in Unity 2019.1
    SRP 6.9.1 in Unity 2019.2
    SRP 7.2.0 - 7.3.1 in Unity 2019.3
     
    Mark_01 and Djayp like this.
  24. Artem_Artemov

    Artem_Artemov

    Joined:
    May 27, 2017
    Posts:
    2
    Anybody know how to fix that?
    That happens when i use tessellation
     

    Attached Files:

    • 1.png
      1.png
      File size:
      2.2 MB
      Views:
      384
  25. FreeMindSA

    FreeMindSA

    Joined:
    Apr 28, 2019
    Posts:
    1
    Hi,

    How do I use various CTS profiles (with Lite, Basic and Advanced shaders) in a build?
    Changing profiles in editor works fine, but when I do the same in the build the terrain is not rendered at all.
    If I stick to Basic (which is used in the scene) the terrain is rendering correctly. Trying to set profile with Lite or Advanced shader makes terrain look like this:


    All the CTS shaders are added to Preloaded Assets. What can I do about it?
     
  26. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232
    I will look into this and see what I can find!
     
  27. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232
    You would need to upgrade to CTS 2019. You do not need to use Gaia 2 you can still use Gaia 1. If you are still wanting Gaia 1 and you have upgraded to Gaia 2 already please follow this solution!
    https://proceduralworlds.freshdesk.com/a/solutions/articles/33000252471
     
  28. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Hello,

    Is there any update on when you might be able to get Light Layers in HDRP to work correctly with CTS? Just wondering if it's still being looked at?

    Thanks.
     
  29. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    375
    The asset is beautiful.
    But there's a problem.
    A very large files are created for .assets file under Profiles/Array. Over 100 Mb for file if using a 2048 or higher resolution. Unfortunately it is not possible to use CTS with systems like GitHub / GitLab. Git (default without GLF) that do not allow files of size greater than 100 Mb.
    Is it possible to split these files?
    Or use a different compression (Different from the default DXT5) by sacrificing a bit quality?

    This an example with 9 layers.



    Even these files in Assets folder are impossible to commit.

    However, these files can be deleted. (?)
     
    Last edited: May 22, 2020
  30. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    375
    Another small problem with CTS. :(
    CompleteTerrainShader works a lot in OnEnable ().
    Run ApplyMaterial (); UpdateShader (); etc...
    This creates many problems in case "world streaming" with a noticeable lag at every activation of a terrain.
     
    Last edited: May 22, 2020
  31. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    It is still being looked at, however it will require us to completely rework the CTS shaders using Shadergraph to make sure all features of the SRPs such as the light layers are supported, so this is no easy undertaking and we can't currently give an ETA for that.
     
  32. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    Splitting is not possible, but you can change the resolution and the compression in the optimization settings of the CTS Profile and then rebake the textures, this should result in a lower file size.

    These files look like terrain data files which hold information about heightmap, texturing etc. These are part of the unity terrain system and are not created by CTS.

    In general you need to consider if you want to edit your project so it fits in the limitations of your source control setup, or if it shouldn't be the other way around - if your project requires file sizes over 100 mb (which is not that uncommon in an unity project), the source control should be able to handle that. We use Git internally to work on our projects as well and use Git LFS to handle files > 100 MB.

    To combat this, you can use the "Disconnect Profile" button in the CTS component. Disconnecting a profile will
    • Create a persistent material in the Profiles\Material folder
    • Create persistent copy of the terrain splatmaps in the Profiles\Splatmaps folder
    • Remove references to the CTS profile, normal, color map and cutout mask texture
    • Remove all terrain layers from the terrain
    • Remove all splatmaps from the terrain data object
    In other words it will turn CTS to a persistent material on the terrain that is not refreshed in "OnEnable" anymore, this should get rid off the spikes you were seeing in world streaming.
     
  33. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Ok, thank you for the update. CTS is a great terrain shader, and I'd love to see it be as feature complete as possible. :)
     
  34. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    375
    Thanks for information, apparently these were unnecessary files, deleting everything works as it should.
    Maybe it was just a remnant of some of my previous test.

    I also use GLF but I would gladly avoid it because of the slowness it implies in the push even for files less than 100 Mb if inserted in the gitattributes.
    All I can do that halving the resolution of textures.

    This is beautiful news!


    The final effect with CTS is really pleasing, also with 1024 textures.


    Thanks.
     
    Last edited: May 23, 2020
    camta005 likes this.
  35. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    375
    Unfortunately it is not possible to disconnect the profile without problems occurring. :(


    It seems that the Layers IDs disappear.


    I would also have another question.
    Does the CTS.CTSTerrainManager script/gameObject have to be unique for each scene or is it okay to be "DontDestroyOnLoad" and therefore the same for all terrain that will be loaded during the game?
     
    Last edited: May 23, 2020
  36. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    I had a look at this issue, and I was not able to replicate it from my side: When I create a profile for a terrain and then disconnect it, the look of the terrain stays the same during runtime. Note that it is correct that the terrain layers disappear: Those are being removed to save memory because CTS has the same textures referenced in its internal array, so the texture layers on the terrain are not needed anymore at that point.

    To analyze the issue further, could you please double click on the material in the terrain inspector....
    upload_2020-5-27_14-28-0.png

    Then take a look at the albedo texture array that is referenced in there....

    upload_2020-5-27_14-28-55.png

    This should point to an array of textures, you can see the textures that are stored in there. These should be the baked textures from the CTS Profile, you can browse through the textures stored in there with the back and forward buttons.

    upload_2020-5-27_14-30-57.png

    Could you please check how the textures in this array look like when you are encountering the issue? And could you please do a comparison when the profile is disconnected and the textures are still OK, vs. how the textures in this file look during runtime? I'm currently assuming that there is something wrong with those textures during runtime for some reason.

    If you load / remove scenes additive for terrain streaming, one single CTS.CTSTerrainManager script in the Master scene should be enough, and the individual terrain scenes would not need another CTSTerrainManager. If you are switching between scenes in the sense of "changing levels", I would not use DontDestroyOnLoad because I would fear this would end up with the CTSTerrainManager keeping references to removed terrains from the unloaded scenes.
     
  37. Augis1980

    Augis1980

    Joined:
    Sep 23, 2014
    Posts:
    48
    Hi,
    Light Baking (AO ) with "Draw instanced" is still not fixed in this one?
     
  38. SNS_Case

    SNS_Case

    Joined:
    Oct 7, 2011
    Posts:
    58
    Hi, first of all, I love the results achieved with CTS. However, I have an issue with performance where any non-Unity shader selected in my profile (Lite included) results in stuttering. I've tried disconnecting the profile before running, and I've tried this in a test scene with only one texture applied to the terrain from the profile (there are still 13 total) and I still get the stuttering. Graphics are set to linear/deferred. In my test scene I'm using 3x3 terrain tiles of 4k size and 4k heightmap, 2k others. The profiler seemed to indicate the spikes were time spent in EditorLoop, however it was the same result in a build. Any suggestions would be welcome, as I'd love to have the ability to use the triplanar rendering for cliffs and the other CTS features in the Basic/Advanced shaders.
    Unity version is 2019.4.2f1, and I am on an i9 9900KF, RTX 2080 and 32GB RAM so I hope computing power/memory is not the issue. CTS version is 2019.1.6.
     
  39. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,073
  40. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    In 2019.3.6f1 with the standard pipeline, everything runs fine in the editor but the PS4 build has weird artifacts going on. The terrain doesn't render at all and there's flashing of black quads. I'm attaching a number of shader errors from the build log which is most likely the issue. Is this something you can fix as we have a project a few weeks out from going into QA and we really need a better terrain solution.

    Thanks,
    Reggie
     

    Attached Files:

  41. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232
    "
    I don't know if I answered your question in the Freshdesk ticket system so I will answer it here as well.

    In general, CTS should perform comparably to Unity Shading with the lite and basic shader types. We have had some reports from other users in the past that the may experience stuttering or worse performance, those are usually difficult to track down because they tend to be not reproducible e.g. when changing Unity versions or when the same project is running on different hardware. i.e if you sent me the project I may not experience the same issue.

    One thing you may try is to update the graphics card drivers as this does indeed sometimes be the issue.
     
  42. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232

    CTS does not support mesh blending. This was something we were looking into but found it to be something we would investigate further in the future possibly.

    Gaia 2 / Pro offers the ability to turn a terrain into a mesh. You can export your terrain into a mesh in the advance tab of the Gaia Manager.
     
  43. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232

    I will look and see if I can find any information for you!
     
    reggie_sgs likes this.
  44. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    What about the other way around? Can I use any imported FBX as "terrain"?
     
  45. SNS_Case

    SNS_Case

    Joined:
    Oct 7, 2011
    Posts:
    58
    Yeah sorry about that, I posted here before I went through the process of signing up for the ticket system and compiling the reports. I'll try to remember to post the solution here once it's found though, in case other users are experiencing the issue.
     
  46. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232
    Should be possible yes
     
  47. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232

    It's a hard thing as results vary depending on your project etc. I have seen when you update the game ready driver this has been helping!
     
  48. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    So then theoretically, I should be able to use CTS on anything, not just on terrain as such.
    For example I should be able to stick a concrete texture on a building facade and have it hide the repition of the tiled map, correct?
     
  49. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    232
    CTS is a terrain shader it could be possible to manipulate it to do such a thing but we do not support anything other than terrain.
     
  50. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Then I'm confused

    If you support a terrain imported as an fbx from 3ds max, which for all purposes are just a mesh, not an actual terrain object, then what is the difference of using any other mesh as a "terrain", be that a ground plane, a building, an animal, or any other fbx?

    I'm not understanding this..