Search Unity

CTS - Complete Terrain Shader

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

  1. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,607
    have just downloaded the new version of CTS.

    "- on the first image, on the left is the CTS terrain shader, and on the right is the quixesl shader. From this view the CTS looks okay to me (a bit brighter then it should be, but okay)"
    Answer: Its brighter because its not metallic shader but specular.

    "Roughness map modified to 255 white, to make the sand look really rough, without any specular effect."
    Answer: Yes because smoothness = 1- roughness. So roughness =255 means smoothness = 0 so no reflections etc at all.

    Your AO in profile is =1? or in which value? Could you show global profile values?
     
  2. Game-Armada

    Game-Armada

    Joined:
    Apr 29, 2013
    Posts:
    62
    upload_2018-4-12_15-1-9.png
     
  3. Game-Armada

    Game-Armada

    Joined:
    Apr 29, 2013
    Posts:
    62
    ... managed to solve the problem,, it seems that my Albedo texture was broken somehow, normal and roughness and/or smoothness was okay.
     
  4. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    287
    Nice work on the update and new tutorials!

    One issue that appears to persist is the striping of the terrain if the resolution of the albedo and normal arrays don't match. In the pic below, this is what happens if I have an albedo array at 1024 and reduce the normals to 512
    Screen Shot 2018-04-10 at 6.39.33 AM.png
     
  5. Game-Armada

    Game-Armada

    Joined:
    Apr 29, 2013
    Posts:
    62
  6. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,622
    A new version of CTS has just gone live.

    It has a couple of bug and configuration fixes.

    There is a scenario in which Unity will randomly crash on startup - we think its a unity terrain bug - and the new release has a workaround for this - so its well worth getting.
     
    Olander and Mark_01 like this.
  7. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,622
    Hmm... we will look into it... in the meantime I am sure you can guess how to work around that :)
     
  8. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,089
    Hi, Just bought CTS and following instructions but when I do this bit:

    3. Add CTS to your terrain.
    Component -> CTS -> Add CTS To Terrain.

    I get an exception in the console saying this:

    NullReferenceException: Object reference not set to an instance of an object
    CTS.CompleteTerrainShaderEditor.AddCTSToTerrain (UnityEditor.MenuCommand menuCommand) (at Assets/CTS/Scripts/Editor/CompleteTerrainShaderEditor.cs:53)

    Any ideas?
     
  9. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,622
    Do you have the 1.7 release ? Thought I had squashed this. Just reload the scene / restart unity if necessary.
     
  10. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,089
    Yes version 1.7. I worked around it by attaching the script manually.
     
  11. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,089
    I'm using Gaia and CTS and I followed your video on making Unity graphics more like Unreal engine but get this strange artefact like god rays but coming up from the ground, (see picture) Even when I turn off everything in the post stack it's still there and very annoying. Also the point light seems to have been turned into a sun like object somehow and I can't figure out how and why this happened.
     

    Attached Files:

  12. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    isnt you light source just too far down? like longitude lattitude thing?
     
  13. Game-Armada

    Game-Armada

    Joined:
    Apr 29, 2013
    Posts:
    62
    sun shafts are tricky because they use the position of your directional light and not the direction only. Make sure the light is at the right position (somewhere up far in the sky, where the sun should be)
     
  14. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    thats what I ment!
     
  15. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,089
    That's just it, I'm not using sun shafts! I've turned off all post processing in the scene and I still get these god lines. If I move the only directional light in the scene up high all it does is change the direction the lines are coming from, to from below the ground to down from the sky. I also have this large sun in the sky which I never put there. I can't select it and it's not in the scene. It's driving me crazy. I think it appeared the first time I let CTS put in an afternoon light.
     
  16. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,622
    Absolutely love how the community helps out in these forums!!

    We have a discord site that we set up a few weeks ago below. Its grown to almost 200 members already and is starting to become quite active: https://discord.gg/hvtg8
     
    Shawn67 likes this.
  17. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,622
    CTS doesn't put in any lights... and neither does Gaia for that matter (although it will modify them).

    Somewhere in your hierarchy you have an active sunshaft component (cant remember what its called off hand).

    I saw a cool tip the other day - if you type in the name of the component on the search bar in the hierarchy it will find all the game objects that have that script on them. Maybe try that.
     
    mattis89 likes this.
  18. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    hello! So Im using Gametextures with cts, but it comes with so many textures how can I use them all so it looks so good as it can?
     
  19. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,622
    We have a texture tutorial in edit at the moment. In the tutorial I use textures from MegaScans, but the same thing applies to GameTextures.

    The biggest mistake people make is in not having smoothness baked into the Alpha channel of the Albedo. This is an inherent part of the way unity terrain textures work so we conformed to this to maximize compatibility with existing textures.

    Texture sources like GameTextures and MegaScans don't conform to this because they target all platforms.

    CTS makes this easy however - drop your gloss / smoothness texture into the smoothness slot - or - your roughness texture into the roughness slot - and CTS will bake them into the textures that are sent to the shader.

    Next big mistake that people make is not marking the normal textures as normal textures in the Unity inspector. If a normal is not properly flagged as a normal to Unity, it will not be processed properly by CTS.
     
    Mark_01 likes this.
  20. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    awesome :) Yea I set normals to be normals in the unity importer, that I figured out, but it´s the rest , how I know what texture is roughness and what is smooth.. I dont know the endings.. I know the common \ height \ normal \ albedo...
     
  21. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    Untitled.png

    How can I fix this? it's supposed to be a trail....
     
  22. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    Another thing that would be cool if your are close to the ground lookin but still so far back so you start to see the far tiling setting appear , so it would be cool if the far tiling texture is a bit more normal strength and height so it dosent look so painted.. i know its not noticable when having vegetation but still, what do you guys think?
     
  23. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,622
    Read their doco - they explain what each texture does.

    Paint it in properly. There is a difference between basic and advanced because of height blending.

    There is a far tiling setting per texture - there is also near and far detail strength. Check out the latest videos - they talk to this.
     
    Mark_01 and mattis89 like this.
  24. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    Yea well I use some road tool when its a straight line it looks good but when the road turns it looks like that....
     
  25. Game-Armada

    Game-Armada

    Joined:
    Apr 29, 2013
    Posts:
    62
    you can not paint roads like this! the shader only mixes the textures, not rotating.. you have to use road tools, or some spline tools to create a road
     
  26. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    yes I used ”instant road Path” but its not so ”expensive”
     
  27. MattMurphy

    MattMurphy

    Joined:
    Dec 24, 2013
    Posts:
    110
    Anyone had the basic version running on iOS? Tried a X on 11.3 (metal) but just get a dark gray terrain no textures
     
  28. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,607
    Try lite version.
     
  29. MattMurphy

    MattMurphy

    Joined:
    Dec 24, 2013
    Posts:
    110
    Tried Lite on Metal + OpenGLES3 - same result. Weirdly I do get this from Xcode:

    Code (csharp):
    1.  
    2. WARNING: DXT texture format is not supported, decompressing texture
    3.  

    Checked all terrain textures and seem to be set right to PVRTC so I'm not sure where that's coming from. Wasn't really expecting it to work but it'd be a nice easy way of getting triplanar shading on mobile.
     
  30. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    108
    Great tip here! Thanks, if I get the code to work I'll share it.
     
    Mark_01 likes this.
  31. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,607
    This will come from texture array which is in dxt. You could try to change it manualy and check.
    In debug mode at array file there is format value.
    Use one of this:
    PVRTC_RGB2 = 30,
    PVRTC_RGBA2 = 31,
    PVRTC_RGB4 = 32,
    PVRTC_RGBA4 = 33
    Atm you got for normals:
    DXT1 = 10,
    and albedo:
    DXT5 = 12,
     
  32. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    Thanks for the tutorials! and update! Anyone with some advanced tips how I can get my mountains to look? Achieve graphic like far cry :D maybe unity cant.... should I upgrade to 2018?
     
  33. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    how did you achieve this???when I use dirt with puddle from gametext it dosent look like the puddle is a puddle? its just lame and smiothness is on the edges of the puddle.....
     
  34. Game-Armada

    Game-Armada

    Joined:
    Apr 29, 2013
    Posts:
    62
    yes, the edges is an interesting part of this PBR method :( one trick I am using is to add some normal noise to the puddle, not to make it fully flat, to have almost the same specular as on the edges... also another thing, you have to tweak the smoothness channel a bit, add more brightness or contrast,..etc..
    It would be supercool if CTS / unity shaders would work like in PBR painter and mixer softwares...(Quixel mixer, allegorithmic..etc..)
     
    mattis89 likes this.
  35. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    yes okay I see.. yeah that would be cool, tought it could handle thatallready.. dosent matther if I have 8k super expensive trillion detailed awesome textures, still looks like S***.. the best I could tweak is not good enough.. still far away from unreal or cryengine quality.
     
  36. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    Going to try 2018 verision now
     
  37. Game-Armada

    Game-Armada

    Joined:
    Apr 29, 2013
    Posts:
    62
    maybe you could post a screenshot here, or let me know which textures are you trying...etc
     
  38. yoonack

    yoonack

    Joined:
    Apr 29, 2016
    Posts:
    14
    I am wondering is there a way to do the snow track effect with this CTS snow shader?
     
  39. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    thanks, i will! im on my second project atm .
     
  40. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    545
    I have a terrain consisting of a mountain range with snow. In my application, I have the player at 0,0,0. I would like to move the mountain terrain so that the player is at the top of one of the mountains. If I do this, the snow disappears. I can't seem to change the minimum height of the snow to below 0. Is there a way to fix this? Thanks.
     
  41. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    489
    Looking through your code, it appears that anytime you go into a scene it creates a brand new material for the terrain and applies it. Any particular reason why you're doing this? For version control purposes, it makes a huge number of changes to my scenes resulting in conflicts and difficulty seeing what actually was changed.
     
  42. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    2,353
    So in 2018 there is an annoying bug with menu items added to the component menu, it just constantly spams the console with error messages. And CTS has a bunch of these, it's really annoying.

    Not sure if they now require validation methods for MenuItem in the Component menu or what the deal is, but I just moved them all to Window to get rid of the spam.
     
    mephistonight likes this.
  43. ImperativeGames

    ImperativeGames

    Joined:
    Dec 11, 2016
    Posts:
    32
    Hello, I'm trying to use your package with several Terrains of different sizes (main big in the center, 1/4 on the sides), but the edges between them are quite bad (inspired by demo scene Landscape). But method RemoveWorldSeams fails with null reference error because of the way it creates array of Terrains to stitch.
    So, is it possible to change that method so it would work on terrains of different sizes?
    Running method twice grouping terrains differently maybe?

    I understand it's not main purpose of package, but it's calld Complete Terrain Shader xD :D :rolleyes:
     
  44. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    554
    Did you ever add this?
     
  45. Jbaker08

    Jbaker08

    Joined:
    Oct 8, 2012
    Posts:
    33
    CTS no longer works with Unity 2018 due to the unsupported use of substances. I tried installed the Substance importer, and it still doesn't work.
     
  46. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,052
    well 2018 sucks and is unstable as hell. use 2017 latest release until next year when 2018 is stable and they begun to develop 2019 :D
     
  47. patrykk

    patrykk

    Joined:
    May 20, 2017
    Posts:
    13
    I also tried adding the separate Substance importer and the project still won't compile with CTS present.
    Is there a fix for this, already?
     
  48. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    Mark_01 likes this.
  49. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    131
    I created a terain with Gaia and used advanced shader version of CTS with 4 textures and no trees or details. Thing is when my camera moves I get a weird small lag as if the camera moves choppy. I'm using an rts camera that looks from above the terain and the weird thing is that this happens while my fps is 70. This doesn't happen with unity shader or with Lite shader. What am I missing here??
     
  50. Kev00

    Kev00

    Joined:
    Dec 6, 2016
    Posts:
    167
    pango likes this.