Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

CTS - Complete Terrain Shader

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

  1. ValWe

    ValWe

    Joined:
    May 12, 2019
    Posts:
    1
    Hi, I have a problem. At first, CTS worked perfectly. No issues. But then I created a new project. When I clicked "Create and Apply Profile", it shows "Ingesting Albedos" for ever. When I then try to edit the Profile there are a lot of errors. I am confused, because it worked before and now doesn't. I hope anyone can help me.
    I am using Unity version 2019.3.0f6
     
    Last edited: Apr 5, 2020
  2. BryanPW

    BryanPW

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

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    89
    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.
  4. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    691
    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
  5. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    89

    Ah I see now. Gaia with HDRP currently is not available. This update will be coming soon to support 2019.3 HDRP.
     
    Hawk0077 likes this.
  6. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    691
    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.
     
  7. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    89
    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.
  8. Hawk0077

    Hawk0077

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

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    691
    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
     
  10. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    420
    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:
     
  11. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    89

    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!
     
  12. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    89
    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.
  13. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    420
    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 :)
     
  14. elviramodesty

    elviramodesty

    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
  15. BryanPW

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    89
    Yes as the profile is attached to one terrain not the entire scene.
     
    elviramodesty likes this.
  16. Monil

    Monil

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

     
  17. BryanPW

    BryanPW

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

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    113
    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
     
  19. marvalshot

    marvalshot

    Joined:
    Dec 29, 2013
    Posts:
    196
    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.  
     
  20. Monil

    Monil

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

    marvalshot

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

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,014
    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
  23. 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?
     
  24. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    507
    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
     
  25. 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:
      17
  26. 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?
     
  27. BryanPW

    BryanPW

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

    BryanPW

    Joined:
    Apr 20, 2017
    Posts:
    89
    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
     
  29. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,392
    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.
     
  30. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    321
    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
  31. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    321
    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
  32. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    507
    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.
     
  33. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    507
    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.
     
  34. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,392
    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. :)
     
  35. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    321
    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.
  36. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    321
    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
  37. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    507
    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.
     
unityunity