Search Unity

CTS - Complete Terrain Shader - Deprecated

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

  1. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    This is really about weather integration with the terrain shader rain and snow function, which needs to be setup to work with each system individually. Scene lighting should "just work" regardless of the system you use.
     
    Rowlan likes this.
  2. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Vondox and Tethys like this.
  3. RobsonFMaciel

    RobsonFMaciel

    Joined:
    Jan 12, 2013
    Posts:
    187
  4. raja-naveen

    raja-naveen

    Joined:
    Oct 14, 2013
    Posts:
    10
    Thankyou for Gaia & CTS, already making good progress.
     

    Attached Files:

  5. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Will be in update for dynamic nature starter.:)
     
    RobsonFMaciel likes this.
  6. david55527

    david55527

    Joined:
    Mar 24, 2013
    Posts:
    58
    I don't disagree with this - however there is no reason for the 100 FPS difference even on basic compared to the standard Unity shader, especially when you consider that other terrain shaders on the asset store do pretty much the same things for a fraction of the FPS hit.

    Once again I'd love to purchase, but there's definitely some huge issues performance-wise that need to be resolved first.
     
    Kolyasisan and ZoneOfTanks like this.
  7. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    100 fps is relative thing. From 500 to 400 fps there is 0.5 -1ms or less so its nothing. Thats why fps dont say much about performance in such huge values. They give view about performance when they around 100-150.
     
    Last edited: Jul 5, 2017
    S4G4N and Tethys like this.
  8. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    It's a legit concern though, especially for those of us developing VR games. I have struggled to keep my 89 FPS on our open world VR game - its tough and every little bit counts. For projects like mine, a slight change in grass, details or tree density instantly wrecks our FPS because thats just how tight the budget is for an open world VR type game. So absolutely concerned about performance. Anywho, looks great, almost pulled the trigger today because its so awesome but am concerned about performance for our VR project, and also do the terrains/meshes get auto coverage when using triplanar. We have procedural smooth voxel terrain that is generated at run time and the only thing I can do is specify a material for the biome before its generated. With the TriPlanar shaders that do auto coverage, I set sides as stone textures, ground as grass textures, apply the material and boom, instant base auto coverage where ledges and sides are rocky, grounds get the ground textures specified like grass and dirt.

    **Edit** After watching all your videos it looks like there is not a standalone shader, similar to RTP or MegaSplat, that doesn't require a terrain to be prepped or terrain features. Cool stuff, I'll keep watching in case you include a standalone shader that doesn't require an official terrain or terrain prep.
     
    Last edited: Jul 5, 2017
  9. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    This is something we plan to do, but first focus was on where majority of the market is.

    From shader perspective supporting plain meshes is not a lot of work. From nice UX perspective there is a fair bit more to it.

    What would interest levels be like if it had minimal UX integration ? I.e you were responsible for populating materials etc.
     
    FargleBargle and Tethys like this.
  10. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    With RTP, you simply apply the terrain2geometry shader (material) to the terrain mesh, and then populate the texture channels, etc.

    Any Adam Goodrich product tends to have excellent UX, which is *definitely* not a trend on the Asset Store, so if you could support this type of functionality without making it impossible to use, that'd be good enough for me.
     
    TeagansDad, Tethys and S4G4N like this.
  11. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    We're using MegaSplat for one of our procedural projects right now, as well as a few other TriPlanar shaders and the proprietary shader that comes with Terrain Engine. They all have some way or another of specifying what side your textures go into, user has to set it up of course. With arrays it's a whole new thing but I imagine just another step, which of course is no issue for us, just time. Not a complaint but an observation: our current setup takes too much time, IMO, with constant changes or edits with every shader update(we're using texture packing and arrays). I think it comes down to giving us some UI that allows us to drop in the textures and it creates the array, then we specify what array for what side(tops, sides, bottom). Of course this all starts to get messy once your dropping in all the PBR slots as well. Texture packing is nice, but is also inconvenient once the projects get big and there are lots of materials and many arrays. Anywho, thanks for asking for and listening to the input. :)
     
    Last edited: Jul 5, 2017
    ZoneOfTanks and buttmatrix like this.
  12. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Easy pie in shader. It will be even x times faster but most work is on UI. Anyway cool idea for shader variant. I will probably add this but not atm.
     
    Mark_01 likes this.
  13. Olander

    Olander

    Joined:
    Sep 13, 2014
    Posts:
    405
    @Rowlan @chingwa is exactly correct. CTS has nothing really connected to weather. It is up to people whom develop weather and lighting solutions to really enhance the terrain to be even better. You will notice I did not say CTS specifically there. Unity can be awesome if done right.
     
  14. Olander

    Olander

    Joined:
    Sep 13, 2014
    Posts:
    405
    A post update to the previous....it is very important for whatever 'system(s)' you are using that they not be over bearing and intrude on other systems. They should sit side by side and assist each other and not cause nightmares of trying to force one system to meld to work with another system.

    I think Adam/Bart have done an excellent job on CTS playing very nicely with many different systems. I believe intent was there in the inherent design that CTS needs to have simplicity and not leech over to require lots of things to make it look nice. Just feed it good and you get excellent. Feed it excellent and it becomes something awesome. And this is what cannot directly translate to pure system numbers.
     
  15. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    I thought some people might appreciate this...

    This is our "basic" shader - it does not do height blending or tesselation.. and is consequently blazingly fast.

    It's a standard Gaia terrain, that I applied one of the profiles I made yesterday in the video above. Literally 4 clicks and the terrain was transformed in such a beautiful way.

    These profiles will be included in the next release, as well as support for smoothness and roughness maps (for those of you who are using substance or megascans).

    The bottom 2 images are treatments of the same cliff - amazing how much of a difference you can make with a few sliders. The triplanar is looking amazing as well.

    Basic 1.jpg

    Basic 3.jpg

    Basic 4.jpg
     
    Last edited: Jul 5, 2017
    Mark_01, TeagansDad, jimburn and 13 others like this.
  16. S4G4N

    S4G4N

    Joined:
    Mar 13, 2013
    Posts:
    3,215
    Damn, that first shots looks like it could have been rock mesh placed and terrain blended
    This is such an important part of making believable scenes with cliffs and vertical drop
     
  17. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Yep - I would decorate this with some matching rock meshes - and the combined result of terrain plus meshes plus trees etc would be stunning.

    I want to go play more but will get back to finishing up the next release of CTS instead :)
     
    TeagansDad, ZoneOfTanks and S4G4N like this.
  18. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Sexy stuff. Triplanar for the win!
     
    Tethys and S4G4N like this.
  19. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Is there a WebGL 2 demo?
     
    jakejolli likes this.
  20. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    If you have a problem with performances, take the basic version.
    Backup your shaders and edit the basic one.
    Remove the 51 SQRT instructions (search and replace with nothing).

    If you see no differences, then you won 20% speed.
     
    Last edited: Jul 6, 2017
    S4G4N likes this.
  21. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    If he really said that, what he should stop for is to learn some humility and civility.
     
    AlwaysBaroque likes this.
  22. AlwaysBaroque

    AlwaysBaroque

    Joined:
    Dec 20, 2014
    Posts:
    33
    He has withdrawn his remarks, we all at times need to be reminded of humility and civility.
     
    syscrusher and S4G4N like this.
  23. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    That would've granted him redemption if he didn't cross the line by a mile. Completely and utterly rude.

    Edit: @jimburn atrocious comment has been deleted, so my posts makes no sense. I'll refrain from posting it in the spirit goodwill.
     
    Last edited: Jul 6, 2017
  24. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    We work around this at the moment. We made that to support something that isnt worth of it.
     
    Last edited: Jul 6, 2017
    jimburn likes this.
  25. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    Is there a way to have the shaders having more readable variable names in a next version? Kinda hard to read ;)
     
    Last edited: Jul 6, 2017
  26. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    I was a little concerned with performance since I need it for VR but these screenshots conviced me to give it a try anyway
    Here is a test of the basic shader using the gaia included pretty island terrain, trees, grass, tod/weather, player controller, image effects running at 180-190 fps in the editor.

    In my case there was pretty much no difference when using unity standard shader. Considering this is in editor the shader should be ready for people that need this for VR.
    Grab 20170706205856 w1920h1080 x285y61z253r241.jpg
     
    Last edited: Jul 6, 2017
  27. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    That grass density though, OMG! I cannot seem to have decent grass coverage and retain the cherished 89 fps for my open world environment in our VR game - its always the grass that seems to kill it. What shader are you using for grass? Any tricks you can share that you used or does this not run as well in VR? PM so we don't derail the thread if you feel like sharing that is heh.
     
  28. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
  29. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    The grass is https://www.assetstore.unity3d.com/en/#!/content/43129
    It runs very well in VR.

    The speedtrees have higher impact than that.

    Otherwise the shader performs quite nicely. If there are any performance improvements on the way I would recommend for people to get it while its on sale.


    [EDIT]
    Regarding unature, I have been contacting him quite a bit regarding some issues, but he was responsive and usually fixed them. The grass runs very fast though.
    Vegetation studio also looks interesting, I have contacted the author for a beta
     

    Attached Files:

    Last edited: Jul 6, 2017
    Tethys, buttmatrix and magique like this.
  30. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I was heavily into uNature beta for a while. Always buggy and never quite finished. Vegetation Studio is eons ahead of it.

    [EDIT]
    The author's favorite thing to say was, "It's fixed. Works perfectly now." Um, nope. Never worked perfect or even close. lol
     
    buttmatrix likes this.
  31. whalleyboi2015

    whalleyboi2015

    Joined:
    Jan 27, 2015
    Posts:
    7
    Hey love this tool! Makes my terrain look sexy.

    My terrain is procedurally generated and textured at runtime and CTS works great in the editor but when I build I can't figure out how to build the shader when the game starts.

    Any help would be greatly appreciated
     
  32. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Not sure what you are asking. Can you please provide a little more detail.

    You can save a little memory by using the Package for Build option but its not actually required.
     
  33. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    No but we will look into it.
     
    jakejolli likes this.
  34. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    For those who were wondering, UniStorm will be fully supporting CTS for weather integration. It is currently being worked on. For those who own Crux Procedural AI Spawner, CTS is already fully supported.
     
  35. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    So many awesome things to play with.. so little time to actually play with them :)
     
    S4G4N, Goodgulf and TeagansDad like this.
  36. whalleyboi2015

    whalleyboi2015

    Joined:
    Jan 27, 2015
    Posts:
    7
    Alright. In Unity when my game starts my terrain looks fantastic with CTS. My terrain is randomly generated when the game starts. I built my game and when it started my terrain looked like CTS wasn't there.

    Im wondering if there is a way to build the shader on runtime and not from within unity but when my game starts.
     
    blitzvb likes this.
  37. IBaa

    IBaa

    Joined:
    Dec 3, 2013
    Posts:
    8
    Is CTS working with PS4 and XBox one can someone confirm this?
     
  38. Leight

    Leight

    Joined:
    Feb 27, 2014
    Posts:
    8
    Hello, i would like to clarify:
    Will your custom shaders work well with unity light probes and build-in lighting / reflection related tools?
    Thanks in advance.
     
  39. jakejolli

    jakejolli

    Joined:
    Mar 22, 2014
    Posts:
    54
    Doing some more WebGL testing, I'm starting to fear that the compatibility just isn't there.

    Playing with CTS in Desktop Standalone, everything works beautifully. As soon as I switch my platform to WebGL, everything goes waaay downhill.

    Here's my terrain using the 'Unity' shader type in CTS (WebGL is selected as target platform):
    Unity.PNG

    Then when I switch to any of the other shader types, here's what I get:
    Basic.PNG

    Basically, with anything but the Unity shader, my terrain just goes black.

    I'm assuming this has to do with Texture2DArray support. I'm thinking this is the case because, when WebGL is my target platform, if I select Component>CTS>Create and Apply Profile, Unity hangs with a progress bar saying 'Ingesting albedos', and I get the error messages:

    Code (CSharp):
    1. Texture2DArray is not supported on this platform/GPU
    2. UnityEngine.Texture2DArray:.ctor(Int32, Int32, Int32, TextureFormat, Boolean, Boolean)
    3. CTS.CTSProfile:GetTextureArray(List`1, TextureType) (at Assets/CTS/Scripts/CTSProfile.cs:1484)
    4. CTS.CTSProfile:ConstructAlbedosTextureArray(Boolean) (at Assets/CTS/Scripts/CTSProfile.cs:585)
    5. CTS.CTSProfile:RegenerateArraysIfNecessary() (at Assets/CTS/Scripts/CTSProfile.cs:505)
    6. CTS.CTSProfile:UpdateSettingsFromTerrain(Terrain, Boolean) (at Assets/CTS/Scripts/CTSProfile.cs:929)
    7. CTS.CompleteTerrainShader:UpdateProfileFromTerrainForced() (at Assets/CTS/Scripts/CompleteTerrainShader.cs:949)
    8. CTS.CompleteTerrainShader:set_Profile(CTSProfile) (at Assets/CTS/Scripts/CompleteTerrainShader.cs:127)
    9. CTS.CTSTerrainManager:BroadcastProfileSelect(CTSProfile) (at Assets/CTS/Scripts/CTSTerrainManager.cs:143)
    10. CTS.CompleteTerrainShaderEditor:CreateCTSProfile1(MenuCommand) (at Assets/CTS/Scripts/Editor/CompleteTerrainShaderEditor.cs:66)
    and

    Code (CSharp):
    1. UnityException: Failed to create 2D array texture because of invalid parameters.
    2. UnityEngine.Texture2DArray..ctor (Int32 width, Int32 height, Int32 depth, TextureFormat format, Boolean mipmap, Boolean linear) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/TextureBindings.gen.cs:589)
    3. CTS.CTSProfile.GetTextureArray (System.Collections.Generic.List`1 sourceTextures, TextureType textureType) (at Assets/CTS/Scripts/CTSProfile.cs:1484)
    4. CTS.CTSProfile.ConstructAlbedosTextureArray (Boolean save) (at Assets/CTS/Scripts/CTSProfile.cs:585)
    5. CTS.CTSProfile.RegenerateArraysIfNecessary () (at Assets/CTS/Scripts/CTSProfile.cs:505)
    6. CTS.CTSProfile.UpdateSettingsFromTerrain (UnityEngine.Terrain terrain, Boolean forceUpdate) (at Assets/CTS/Scripts/CTSProfile.cs:929)
    7. CTS.CompleteTerrainShader.UpdateProfileFromTerrainForced () (at Assets/CTS/Scripts/CompleteTerrainShader.cs:949)
    8. CTS.CompleteTerrainShader.set_Profile (CTS.CTSProfile value) (at Assets/CTS/Scripts/CompleteTerrainShader.cs:127)
    9. CTS.CTSTerrainManager.BroadcastProfileSelect (CTS.CTSProfile profile) (at Assets/CTS/Scripts/CTSTerrainManager.cs:143)
    10. CTS.CompleteTerrainShaderEditor.CreateCTSProfile1 (UnityEditor.MenuCommand menuCommand) (at Assets/CTS/Scripts/Editor/CompleteTerrainShaderEditor.cs:66)
    And then I have to quit Unity.

    Is this a bug, or is CTS just incompatible with WebGL?

    Will it become compatible in the future, or is there some kind of workaround?

    Is it possible that, if it's not compatible with WebGL, that it might work with WebGL 2.0? Any pointers?

    Playing with CTS, I can appreciate how amazing of a tool it is, and I really (really really) want to use it.

    Unfortunately, if I can't use it for this project (which must be deployed to WebGL), my employer will most likely ask me to request a refund :(.
     
  40. RobsonFMaciel

    RobsonFMaciel

    Joined:
    Jan 12, 2013
    Posts:
    187
    Yes, it is a fantastic solution, which is only ready in 3 months or more :(

    I'm having problems with the grams in Gaia with CTS. When the terrain is ready with CTS, before adding grass, my PFS is at 250, after adding grass, my FPS drops to 80. I removed the CTS and nothing has changed, I believe the problem is just grass, someone knows some feature that Can I optimize this grass performance ??? Ps. Sorry for English.
     
    Last edited: Jul 7, 2017
  41. Hikiko66

    Hikiko66

    Joined:
    May 5, 2013
    Posts:
    1,304
    I've found unity grass to be pretty cheap if setup correctly.

    What type is your grass set to on the terrain settings?

    Type:
    Grass?
    Billboard?
    Mesh?

    How dense is the grass?
    What is the view distance of the grass?

    Detail per patch setting? (although this only causes hiccups as you move around the terrain with the wrong settings, shouldn't affect your fps much if you are just standing still)

    If you toggle the draw details checkbox on a terrain to switch the drawing of the grass on and off, what impact on FPS does that have?

    Need details
     
    Last edited: Jul 7, 2017
  42. Lemonua

    Lemonua

    Joined:
    Mar 16, 2017
    Posts:
    7
    When i apply substance to Profiler/Texture, result looks very different from what i expected to see - terrain becomes very smooth and much darker. Can anyone help?http://imgur.com/a/9kLgW
     
  43. Black-Spirit

    Black-Spirit

    Joined:
    Sep 14, 2013
    Posts:
    67
    Followed the setup, but now my terrain textures are completely black.
     
  44. RobsonFMaciel

    RobsonFMaciel

    Joined:
    Jan 12, 2013
    Posts:
    187
  45. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Yes they will.
    Check detial per patch should be around 8 - depends from terrain size..
    Fixed in upcomming version.
     
  46. RobsonFMaciel

    RobsonFMaciel

    Joined:
    Jan 12, 2013
    Posts:
    187
    I'm using the basic "population" of GAIA grams, and I leave quite dense, I'm using around 200's of far to camera. It's a little distance.
     
  47. RobsonFMaciel

    RobsonFMaciel

    Joined:
    Jan 12, 2013
    Posts:
    187
    I'll try. Tks :)
     
  48. Black-Spirit

    Black-Spirit

    Joined:
    Sep 14, 2013
    Posts:
    67
    Last edited: Jul 7, 2017
  49. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Are these sqrt calls getting removed in the next release?

    Also can we get per texture seasonal strength sliders similar to geo? I know you mentioned something along those lines in one of the CTS videos @AdamGoodrich , just wanted to make sure it was still on the roadmap. I don't like my cliffs changing colors =)
     
  50. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Read manual and read me. You have to uncheck dx9 in project. Arrays dont work on dx9.
    This sqrt is texture --> normalmap conversion. It could be done as check box is normal or during read proces in shader. ( effect is the same but our manual reading is faster and gives better result - this is funny but we do the same calc but we use different texture chanels - deeper thing) I tested and its not truth that it change fps. I temporary remove it and fps was the same. Ofc it must have some small impact -just because its another operation. Anyway if you will remove it normal will have much worse quality. I checked this today and it gives a bit incorrect light data. Ofc it not look so bad probably at mobile nobody will complain about it but and standalone pc is visible. In upcoming update we rebuild whole shader -its better quality etc. We changed alot. We use less textures and with better effect. Some shader magic.