Search Unity

CTS - Complete Terrain Shader - Deprecated

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

  1. ranaUK

    ranaUK

    Joined:
    Mar 1, 2017
    Posts:
    166
    Hi Adam, rerequest from one of the earliest post in this thread: can we please set where any created files would go?

    Basically game coding version control is a nightmare to me. Finally I decided to go with a mixture of linked folders and git sub-module which helps with a lot of common assets (for example Gaia, most of shaders and so on). Where as any change in CTS creates files within the structure which makes it unsuitable for sharing.
     
  2. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    In next version CTS won't save anything other than profile and texture arrays unless you ask it to. By default this will go to a CTS directory - and then you can move them after than and never move again and never change unless you also change your terrain or terrain textures - and given how simple it is to manually move and then leave I am not sure of the the value in writing code to do it.
     
    BackwoodsGaming likes this.
  3. ranaUK

    ranaUK

    Joined:
    Mar 1, 2017
    Posts:
    166
    Great; cause now I can move but on rebaking, it would create the files in original location (Profiles, Profiles\Arrays, Terrains, and Terrains\ReplacementTextures). So if Terrains and Replacement are gone, where will terrain normal sit (please please let it be Arrays)?
     
  4. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    374
    Hi.
    Version Unity 2017.1.1f1

    When press on "Create and Apply Profile", Unity crash. Show a window "Baking Textures" and.... crash.

    Thanks for your help.
     
    ZoneOfTanks likes this.
  5. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    When I create and apply profile it works just fine. Please send support request and provide more detail about what you are doing.
     
  6. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    374
    I do not do anything else. Something I've done with previous versions and works without problem, but not in this. I've done a downgrade and it works fine. I have reinstalled the 2017.1.1f1 version and it works poorly. But I do nothing more than what I have mentioned.
     
  7. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    There's a known issue where Unity 2017.1 will sometimes crash when you attempt to modify an existing profile (see knowledge base entry Unity crashes when changing CTS profile values). I've seen this happen a few times myself - with the Editor crashing as soon as I selected a different texture or value in the profile. It seemed to mainly happen when I used the Advanced shader, which was the one thing I could change without crashing. Once I reverted back to the Basic or Unity shader, I could make changes to the profile, and then set it back to Advanced afterwards. Adam has detailed his own workaround in the knowledge base article. I'm wondering if this is related in some way. What was your exact procedure when creating and applying the profile? Was there already a CTS profile applied to the terrain, or were you creating a new one for the first time?

    Sorry to drag this discussion out in the forum. Since there's already a knowledge base article, I didn't need to file a ticket for my own problem, but since this one seems so similar, maybe it's another facet of the same issue. Unfortunately, there's no way to comment or add to the original article, other than to file a new support request, but if your issue is substantially different, you should probably do that anyway. o_O
     
    Last edited: Sep 20, 2017
  8. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Yeah - new version soon - and i have changed my approach to material handling to address this specific issue - imho its a unity bug - because it is intermittent and you cant replicate it - but even if there was something wrong it shouldn't crash unity.

    Some people have surmised that it is unity light baking related. No idea really as there is no information to go from. Trying to get then next release out as fast as i can - and because we create materials on the fly - i believe the issue should go away.
     
    FargleBargle and Mark_01 like this.
  9. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    I get crash when I do not use unity default layout at other packs:D When I change it to default it works ok:/ Unity 2017 is full of traps. Asset Store panel do not refresh UI and logging in until I switch card to other and much much more... Unity 5 was unusable until 5.4 or 5.6 probably 2017 also need some time. Bigger changes need some love and time.
     
    FargleBargle and Mark_01 like this.
  10. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    We are honored to have Jon O'Neal, Lead Environmental Artist from Crowfall talking about his experience Crowdfunding Crowfall, and with the Procedural Worlds toolset. In the environment section in the video I was amazed by how deeply Gaia, GeNa, CTS and Pegasus were used to bring the scene to life.



    And if you have not voted for CTS yet, please wander on over to the Unity Awards web site below and vote for us in the "Best Tool" section - was a total blast to even be nominated :)

    https://awards.unity.com/2017
     
    Last edited: Sep 20, 2017
  11. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Upcomming pach which is 100% cts integrated. Model sshader for blending will be also included in cts in next few releases.

    Huge library of textures, foliage, rocks and much more

    Heightmap blend:
    cts10.jpg

    Model blend:
    cts11.jpg
     
    S4G4N, Magic73, Vondox and 6 others like this.
  12. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Will there be any docs on how to implement terrain blending in custom shaders?
     
  13. krIxh

    krIxh

    Joined:
    Mar 2, 2017
    Posts:
    12
    Hi,
    i've tried to use the shader on Linux (Debian9), but the texture 0 (in my case sand) is causing artifacts and the color glitches.
     

    Attached Files:

  14. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    You should report this into the ticket system that Adam has linked many times, then you will get a much faster answer
     
    krIxh and AdamGoodrich like this.
  15. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    there is a Smoothness or roughness texture included in cts?
     
  16. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Yes. You can choose either.

    Haven't used CTS on Linux - but happy to try and find a solution - log your request here:

    https://proceduralworlds.freshdesk.com/support/home
     
  17. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Oh, yes, about smoothness textures. The textures included with cts have smoothness baked in alpha channel of albedo map. How do I set it then? Do I leave smoothnes and roughness empty so that it'll read it from albedo's alpha or do I set albedo texture in smoothness?
     
  18. KillerNads

    KillerNads

    Joined:
    Jan 22, 2017
    Posts:
    70
    Hey Adam,

    So ive been using CTS on my terrain which i set up a few weeks ago now. Originally i only had two textures in my terrain, so that is what CTS got setup with. But now i wanted to add another texture onto my terrain, how can i add this? If i simply add a new texture to the terrain in the unity editor and try to draw on the terrain all i get is black plain texture. Also the texture doesnt get added in to the CTS profile either?!

    Am i doing something wrong?
     
  19. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    Probably this .... https://proceduralworlds.freshdesk.com/support/solutions/articles/33000166630-black-spots-on-terrain
     
    TheSeawolf likes this.
  20. KillerNads

    KillerNads

    Joined:
    Jan 22, 2017
    Posts:
    70
  21. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Grab 20170926185025 w1920h1029 x665y185z670r164.jpg

    For those who have posted questions here - everyone who asks a question via the support system gets an answer within 24 hours unless I happen to be travelling - with the additional bonus that because most questions have been asked before - chances are the searchable knowledge will give you want you want immediately.

    Dragon is from SF Bay's Dragon Pack PBR - pretty cool eh! Scene is same one I posted earlier - just different time of day and playing with Post FX.
     
  22. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Yep :)
     
  23. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    764
    So in few updates this big rock on the right will be blended with sand?!!!!! Can't wait!!!!;)
     

    Attached Files:

  24. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Yes, Bart assures me he will supply mesh blend shader soon.
     
  25. keifyb

    keifyb

    Joined:
    Feb 12, 2016
    Posts:
    62
    just got it and chucked it in unitz and i get this -

    Assets/CTS/Scripts/CompleteTerrainShader.cs(1433,68): error CS0117: `SceneManager' does not contain a definition for `GetActiveScene'

    anyone able to help?
     
  26. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    What unity version are you running? I have never seen this.
     
  27. keifyb

    keifyb

    Joined:
    Feb 12, 2016
    Posts:
    62
    Unity 2017.1.1f1, its probably something to do with the UnitZ asset but i don't know what to do.

    edit : i just commented out that line and it doesn't seem to have a problem with that so far.
     
    Last edited: Sep 27, 2017
  28. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    ETA on the next patch? I'm really looking forward to the performance increase for CTS you had mentioned a while back.
     
    ZoneOfTanks and mons00n like this.
  29. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    We will be publishing in next few days... going into final test now.

    Some other nice little additions have been snuck in there as well :)
     
  30. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120

    Great! I'm looking forward to it. Thanks Adam!
     
    AdamGoodrich likes this.
  31. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    What is the current status of having this run with mesh-based terrains? I read early in this thread that it should work except for the UI which is deeply integrated with Unity's terrain system.

    We're currently using RTP in one scene (actually now two scenes ;-) ), and are not really happy with it but it works with the mesh we have created. Being able to apply this to that mesh would be very cool. Otherwise, we'd probably have to redo a lot of things.
     
  32. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    I will be submitting the next release later today. It will contain mesh shaders as well - but they wont have any UX. It will have the ability to persist your materials and set them up as usual, and then swapping the shader to use the mesh version instead should be simple - and should retain all your settings (i haven't actually tried this). There will be no specific UX - and no support from the rest of the system - but it should still be incredibly useful.

    Some people have been experiencing intermittent crashes as well due to what I think is a bug in Unity. A lot of time has been spent working on finding a 100% always works and this release has the workaround for that - I don't really like it - but the solution is imperceptible to the end user and works well. We basically swap the standard terrain shader in on Awake, and then CTS in on Start.
     
    jashan likes this.
  33. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    The v 1.5.0 release is live!

    While the new feature count doesn't seem that big, it is a nice step forward and there has been a huge amount of work done under the covers.

    There is also a whole bunch of performance improvements and our basic shader is generally faster than the Unity terrain shader at higher texture counts. We do a lot more work on the terrain so it looks much nicer, but what we lose there, we get back because we have resolved the multiple of 4 texture add pass issue.

    That said there is no magic bullet to performance - your performance will vary depending on which options you choose - and which shader you use - and which optimization settings you choose.

    Here is the high level change list:
    . ColorMap support - allows you to paint additional colors into your terrain
    . GrassMap support - allows you to bake the approximate colors of the grass into the colur map
    . Transparent cutout support - height and mask based
    . Mesh based shader support - manually set up but still very useful
    . True 1 pass shader support - we manipulate unity terrain to remove addpass calls
    . Better materials management
    . Performance optimizations

    Because this is such a big release - please backup your projects first!

    You will also need to re-bake your textures.
     
    Last edited: Oct 3, 2017
  34. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
  35. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    I'm curious about the color map support - is this the hook we needed with AVS to use the distance terrain coloring feature to paint terrain that isn't drawing vegetation due to culling distance?
     
  36. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    We actually implemented our own system - so you don't need AVS to use this. What we do is make a base map of the terrain, and then blend the dominant grass color into it.

    The end result will add variation to your terrain and also help soften the sometimes sharp edges you get when your detail distance is exceeded.

    If you look at the image below you can see the impact of the grass colors being baked into the color map. It's one of those things that can be very useful i think if used sparingly.

    2017-09-21_19-39-43.jpg

    You could blend the AVS map with our map manually to get a better result - but no its not a direct integration - that feature came out only in past week or so in AVS and we were not prepared to delay our release any longer.

    We will most likely do a much better integration with AVS in our next release.
     
    TeagansDad, Vondox, Olander and 3 others like this.
  37. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Hey Adam! Just tested the latest version of CTS with Unity 2017.2 b11. I am literally mind-blown! The performance of CTS in editor is about the same, but in build I get about 2.5X more fps than the previous version (70fps vs 190fps). I am very happy with CTS now. Thank you!
     
  38. ForgedChaos

    ForgedChaos

    Joined:
    Jan 31, 2014
    Posts:
    49
    Hey Adam, are you going to put out some demo videos highlighting the new features?
     
    blacksun666 and StevenPicard like this.
  39. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    Wow that's huge! I can't wait to test it.
     
    AdamGoodrich likes this.
  40. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Yep :)
     
  41. ForgedChaos

    ForgedChaos

    Joined:
    Jan 31, 2014
    Posts:
    49
    ETA on those videos? :)
     
  42. MarcAudouy2

    MarcAudouy2

    Joined:
    Aug 9, 2017
    Posts:
    6
    Hi,

    Tested the new version and I still have issues on PS4 in CTS Terrain Shader Advanced (as well as CutOut and CutOut Mesh versions).
    There are some warnings in the generated shader code that can be fixed easily but when fixed it still does not compile:

    Shader error in 'CTS Terrain Shader Advanced': Program 'frag_surf', not enough registers available for the entire program. In order to permit spilling to memory please either disable this error via '#pragma warning (disable:7203)' or reduce it to a warning via '#pragma warning (default:7203)' (on ps4)

    I am not sure why your shader generator would generate code that is not completely legit, and maybe it's hiding something.
    Not sure if there is something you can do on your side when generating the shader to optimise it for PS4 so I'll check with the Unity guys on the Sony forum anyway, to see if something can be done, I know some shaders can use a form of "scratch memory" on the PS4 but I don't know if I can control that.
     
    ZoneOfTanks likes this.
  43. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Have passed your comment onto bart for him to look into - he is the shader guy behind CTS - we don't have PS4 dev licences so its pretty hard to look into.
     
  44. Kivak

    Kivak

    Joined:
    Jul 13, 2013
    Posts:
    140
    Hi,

    Quick question about the CTS terrain cutout mask: is this just a standard black/white color mask? Do I need to do anything special after adding the B/W texture? I have tried B/W color mask, inverted, white and transparent, black and transparent, regenerated the color map - nothing appears to work. However, the height-based slider works perfectly... so I must be doing something wrong.

    Any ideas?

    Thanks!
    -Kivak
     
  45. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    A request, could you make and sell a mesh shader that can input megascan maps. Any of the workflow (metal, specular with gloss, roughness etc.). I can't seem to get realistic results with megascan 3d assets with Unity shaders. (example is the cliff below)
     
    Last edited: Oct 8, 2017
  46. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    Screenshots using the latest version of CTS. I haven't done AB comparison, but I'm getting good framerates, minus very occasional spikes due to grass.

    screen_1920x1080_2017-10-09_00-30-30.png screen_1920x1080_2017-10-09_01-29-38.png screen_1920x1080_2017-10-09_01-32-33.png screen_1920x1080_2017-10-09_01-35-11.png screen_1920x1080_2017-10-09_01-38-39.png
     
  47. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    To minimize the amount of texture data being sent to GPU we get the cutout mask from the alpha channel of the ColorMap.

    You can supply this yourself in your ColorMap, or put a black and white mask into the Cutout Mask and have it baked for you by selecting Bake ColorMap.

    In 20/20 hindsight I can see how this would be totally confusing. In next release I will modify the UX to make it clearer.
     
  48. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Here are some images of mine in a test project I am doing that uses Megascans assets.

    Grab 20171007163204 w1920h1029 x-39y80z-34r39.jpg
    Grab 20171008102755 w1920h1029 x-27y82z-18r236.jpg
    Grab 20171008161757 w1920h1029 x-62y91z20r140.jpg

    The grasses are done with a custom shader and the tree and rocks are using the Unity standard shader.

    Bart has some amazing vegetation and photogrametry based stuff he will be launching soon as well.
     
  49. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    Thanks for the reference. Looks great. Somehow we still can't reach, what seem to be easy in UE4.


    Surfaces are ok with the custom terrain shaders we have in the asset store, but meshes seems hard as they don't use all the maps provided by megascan.
     
    Quique-Martinez and ZoneOfTanks like this.
  50. ForgedChaos

    ForgedChaos

    Joined:
    Jan 31, 2014
    Posts:
    49
    So, am I right in that you can't simply cut holes using the tools of CTS and must make a map where the holes are to be? If so that doesn't lend itself to any kind of precision placement.