Search Unity

CTS - Complete Terrain Shader - Deprecated

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

  1. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    Another problem specific with Tesselation mode. It seems that the Tesselation also does a Displacement. But this is not done evenly. In consequence, the terrain is only bumped and higher which leads to all the vegetation being hidden under the terrain as you can see in the following picture. Also pretty big difference between the basic mode and the Tess mode too.

    cts_basic_advanced4.jpg
     
  2. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Because its different blending. To be honest to properly use advanced you have to start working with it. Its hard to convert simple exxisting splat blending to heightblend. Ofc you could adjust that but you will probably lose some heightblend feature impact :p for cool heighblend you need very smooth bledning betwen textures. Unity shader looks better at sharp edges:p Yes some textures will apear in place that you didnt expect but you could fix that by sliders.
     
    Last edited: Jul 1, 2017
  3. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    Ok anyway the Basic shader is fine for me. I was just pointing out the problem, thanks.

     
    S4G4N likes this.
  4. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Hi, I'm using MRLE and loading my terrain at runtime. I've added CTS to my terrain and the profile at runtime after my terrain has generated but I can't find how to apply the profile through code?

    Any help please?

    Thanks
     
    syscrusher likes this.
  5. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    762
    i have few questions, as you see with unity standard, unity stats fps count is over 900, while your fps count prefab shows 200.
    With basic, unity stats show over 700 but fps pref still shows 200 like no impact from unity to basic...This is surprising me a lot....??
     
  6. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    762
    better result....whaouh!!!!!!!!! detail normal drives me crazy!! I LOVE it!!!!!

    upload_2017-7-1_19-44-52.png
     
    AdamGoodrich likes this.
  7. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    I'm seeing the same issues with Advanced showing much harder edges between textures. I haven't spent too much time trying to tweak anything though; which sliders are going to be most impactful here @NatureManufacture? Shouldn't supplying height maps for textures allow the heightblend to reduce the hard edges?

    Earlier you also mentioned the ability to use a global normal map - is this just taken from the terrain or is there a way we can supply our own (i.e. from world machine)?
     
  8. ZoneOfTanks

    ZoneOfTanks

    Joined:
    Aug 10, 2014
    Posts:
    128
    Why you guys just did not unite and produce a real terrain shader dream? ;)
    MegaSplat is just too complex for me.
    CTS seems to have performance issues... hmmm... which shader is the best after all?
     
  9. ColonelTim

    ColonelTim

    Joined:
    Nov 28, 2015
    Posts:
    8
    Thank you. And what is not visible on screenshot is that the game already includes a working dialog system and basic fighting mechanics. I started applying CTS on other locations in the game. I was already proud of myself ( :) ) but CTS bring a new dimension to all this (okay on the first pic it consists only if a few rock texture, but it is only for the pleasure :p ).


     
  10. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Because its first pass shader. It should be even faster in some cases.
    I would say that heighblend depth and splatmap hardnes. User should paint 4 textures on ground with different density and move sliders until it will get cool result.
     
    Last edited: Jul 1, 2017
  11. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    There have been some posts here about poor performance which Bart and I are just not seeing.

    We will set up a Skype channel which people are welcome to join so that we can get to the bottom of why some people get poor performance. Details soon.
     
  12. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I wonder if it would help if people looked at how many ms are taken by various things according to the unity profiler than what various different fps counters are showing?
     
    Adam-Bailey likes this.
  13. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    As soon as you run the profiler then your performance is going to go down a lot. So unless you're doing relative comparisons then it isn't going to tell you much.
     
    buttmatrix likes this.
  14. RobsonFMaciel

    RobsonFMaciel

    Joined:
    Jan 12, 2013
    Posts:
    187
    upload_2017-7-1_18-55-49.png

    Can someone help me? After step by step in the Adam tutorial [
    ]

    my terrain got metalised and some parts were all black :(
     
  15. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Genuinely curious about how you managed to do this. How do the demo scenes look for you ?
     
    buttmatrix likes this.
  16. AlwaysBaroque

    AlwaysBaroque

    Joined:
    Dec 20, 2014
    Posts:
    33
    GTX 950 i7 16gb ram

    Frame Rates obtained with landscape demo compiled, editor not running

    Pixel error Unity Basic Advanced
    5. 402 296 185
    15. 346 266 172
    50. 346 272 180
    200. 352 228 164

    with the editor running frames rates are Unity 800 Basic 650 Advanced 520

    You can't trust the editor stats they are only an estimate and a poor one at that.


    I find it odd that with increasing pixel error the frame rate drops:confused:.
     
    Last edited: Jul 2, 2017
    AdamGoodrich likes this.
  17. RobsonFMaciel

    RobsonFMaciel

    Joined:
    Jan 12, 2013
    Posts:
    187
  18. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
  19. RobsonFMaciel

    RobsonFMaciel

    Joined:
    Jan 12, 2013
    Posts:
    187
    Worked @AdamGoodrich :D Tks Man :)
    The black areas were "Bake Textures"
     
    AdamGoodrich likes this.
  20. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    http://www.procedural-worlds.com/cts/demos/

    Here are some builds of the CTS 1.0.2 demo scenes.

    They are plain demo scene builds from a freshly installed CTS1.0.2 install and no sneaky optimisations, and if you are concerned about performance then it might be worth checking these out.

    In a build you should expect to see is a 2-3 x improvement in FPS over what we show in the demo scenes in the editor.

    Additionally, what we report as FPS is different and substantially less than what the editor will report as FPS.

    We are using the FPS code from Standard Assets to calculate it. Not really sure how the editor comes up with its estimates.

    The only change from the demo scene was the addition of a PostFX button, and some analytics code so that we can get some metrics on hardware vs performance.

    We plan to make some much nicer demos over the next week.
     
    Last edited: Jul 2, 2017
    Mark_01 and syscrusher like this.
  21. ZoneOfTanks

    ZoneOfTanks

    Joined:
    Aug 10, 2014
    Posts:
    128
    Does CTS support real-time terrain deformation by vehicles?
    We need to make advanced interactive terrain like this:

     
    Dwight_Everhart and llJIMBOBll like this.
  22. AlwaysBaroque

    AlwaysBaroque

    Joined:
    Dec 20, 2014
    Posts:
    33
    GTX 950 i7 16gb ram Unity 5.6.1f1

    Frame Rates obtained with landscape demo compiled, editor not running

    Pixel error Unity Basic Advanced
    5. 402 296 185
    15. 346 266 172
    50. 346 272 180
    200. 352 228 164

    with the editor running frames rates are Unity 800 Basic 650 Advanced 520

    You can't trust the editor stats they are only an estimate and a poor one at that.

    I find it odd that with increasing pixel error the frame rate drops:confused:.


    Landscape demo from your website.

    Unity 352, Basic 216, Advanced 170, Post FX disabled.
    Unity 242, Basic 168, Advanced 140, Post FX enabled.
     
    Last edited: Jul 2, 2017
  23. wmpunk

    wmpunk

    Joined:
    Sep 5, 2015
    Posts:
    71
    Nope no integrated GPU.

    Updated drivers. Restarted Computer, re-imported asset, created new project, rebuilt arrays, fiddled with lots of things, tried on Untiy 5.6 and 2017beta. Rebuilding the arrays did help a little. But mostly unplayable frame-rates unless on basic.

    I know my card using HBM ram which is not very standard, possibility? Tomorrow I have access to a 280X, slower card but using the GDDR5 ram. I'll test it out on that as well, although I'm noticing that a lot of people reporting troubles are running AMD/ATI cards and people with Nvidia seems to not be having problems.

    On a more positive note It really is a beautiful shader, and I really like how straight forward and easy it is to convert existing terrains.
     
    AdamGoodrich and S4G4N like this.
  24. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    @AdamGoodrich

    Hi, I'm using MRLE and loading my terrain at runtime. I've added CTS to my terrain and the profile at runtime after my terrain has generated but I can't find how to apply the profile through code?

    Any help please?

    Thanks
     
    S4G4N likes this.
  25. mindless2831

    mindless2831

    Joined:
    May 15, 2017
    Posts:
    17
    Shader so worth all this time waiting for it, thank you guys so freaking much. Performance is amazing, I have no idea what these other guys are talking about ( and I'm running it in VR ). Only problem I have is I'm stupid and can't figure out how to make CTS realize I want one texture as higher than the other. It's putting my grass texture as above my mountain texture so I can height blend properly, and I used gaia to spawn the textures which looked great and normal before applying the advanced setting on the profile. It's normal with basic. Please help as this will fix everything if I can get it to behave correctly. This is the best terrain shader available, thank you guys again. Keep up the amazing work as usual.

    EDIT: Also, I have to used forward rendering for some other assets, how does this effect CTS? I use linear color space, but I'm not able to use deferred rendering... What an I missing out on because everything looks wonderful?
     
    Last edited: Jul 2, 2017
  26. ZoneOfTanks

    ZoneOfTanks

    Joined:
    Aug 10, 2014
    Posts:
    128
    Can you specify your hardware?
    Performance is essential.
    I need to be sure that this asset performs well.
     
  27. mindless2831

    mindless2831

    Joined:
    May 15, 2017
    Posts:
    17
    i5 6600K, GTX 1080, 32gb RAM. Preforms better than unity in every instance (basic, advanced) except tessellation which was like a 5 frame difference and that was only sometimes ( most of the time better ). I thought the same thing at first about performance but then used something else other than unity to check fps and found that is so terribly wrong is not even funny. Anyone checking it with Unity just isn't getting real numbers and until they use another tool such as nvidia's then they shouldn't complain until they do so and still get the same results. However, even then, they are probably doing something wrong because I'm getting the same results as Adam and Nature.
     
    S4G4N, ZoneOfTanks and AdamGoodrich like this.
  28. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    CTS could shade it - however there is plenty more going on here.

    Deformation would need to be done on the underlying height map - as well as updating of the splats to display it. This is not something that CTS does.

    We will do a video on the nuances of height blending with the latest version. In the mean time here is a little video I did for the beta group that should help you out:



    Yes. Someone made a comment about it not being ready to be out of beta - but the fact is that it has been in beta for quite some time, and performance has been great, with the exception of one guy who had average performance on an older card.

    With the demo's we did today we will collect some statistics and see if we can get a pattern on which cards are having issues. Once we have that then its just a case of getting one and experimenting until we crack it.
     
    Last edited: Jul 2, 2017
  29. ZoneOfTanks

    ZoneOfTanks

    Joined:
    Aug 10, 2014
    Posts:
    128
    Thanks a lot! Then I'll try this terrain shader solution.
    It is a shame that native Unity terrain is so old in terms of technology.
    So we need a real next-gen terrain shader.
    I hope that this asset shall do the job fine.
     
  30. david55527

    david55527

    Joined:
    Mar 24, 2013
    Posts:
    58
    Having performance issues as well.

    Swamp demo:
    Unity: 124
    Basic: 36
    Advanced: 4
    Tessellated: 2

    I'm also seeing some pretty bad visual artifacts on advanced/tessellated. Running an AMD Phenom II X4 and an AMD Radeon HD 6950. Obviously some older hardware but it shouldn't run this poorly.

    Hope you guys manage to sort this out - if you do, you'll have my purchase.
     
  31. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    I am glad the demo's were able to help you out rather than you being disappointed.

    We would expect less performance than Unity on older GPU's because we do a lot more work, however there also seems to be an AMD thing going on here.

    We will watch the stats from the demo's over the next week and see if we can see a definite pattern.
     
    ZoneOfTanks and llJIMBOBll like this.
  32. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    I will send new group of shaders today. I hope this will fix the AMD problem.
     
    llJIMBOBll and ZoneOfTanks like this.
  33. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    I am not near computer, but from memory the API is in CTSTerrainManager. The code is documented. It's a static call. Something like CTSTerrainManager.Instance.ApplyProfile(..)
     
    derkoi likes this.
  34. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Thanks, found it.:
    CTSTerrainManager.Instance.BroadcastProfileSelect();
     
    S4G4N and AdamGoodrich like this.
  35. ColonelTim

    ColonelTim

    Joined:
    Nov 28, 2015
    Posts:
    8
    About my AMD issue (visible artifacts on terrain vertex borders), I had a look at an old C++/DIRECTX project of myself.
    At this time, I had to deactivate Hardware Vertex Processing on AMD cards because some blended models were rendered invisible.
    I also had to deactivate texture animation (tree leafs....) on AMD cards, although I was working fine on NVIDIA.

    I don't know if thoses ATI/NVIDIA differences informations will be useful, but in case when......
     
    AdamGoodrich likes this.
  36. mindless2831

    mindless2831

    Joined:
    May 15, 2017
    Posts:
    17
    Thank you for that, but I've already got all that part down. I'm mainly wondering how, with Gaia, when I do the coverage texture spawned all the population barf on height is perfect. However, when I apply an advanced profile it puts my mountain texture as lower than the grass, so the blending is backwards. How do I tell CTS what texture is higher than the one that should be "under" it? My sand is at the right height with it being the bottom texture and everything built on it, but everything else is "out of order" if that makes sense?
     
  37. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    214
    Just some interesting figures running the prebuilt demos

    PC
    i7 - 3820
    NVidia GForce GTX 680 (yes thats a 6)
    16G Ram

    Landscape Swamp
    Unity 434 228
    Basic 290 156
    Advanced 234 90
    Tesselated 64
    Post Fx 130 (advanced) 58 (Tesselated)

    Probably doesnt look as good as a GTX - 10 family card but CTX still looks far better than the unity shader.
     
    AdamGoodrich, S4G4N and syscrusher like this.
  38. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    For my system, running the prebuilt demos on my laptop. It's an i7 7700K at 4.7 GHz and 32 GB system RAM, and a GTX 1080 with 8 GB VRAM:

    Graphics mode: Fantastic
    Screen resolution: 4K (3840x2160)
    Operating system: Windows 10 Pro, 64-bit
    Gsync: Capable, but disabled
    Integrated GPU: None
    Post FX: Disabled

    Landscape
    Unity: 320 FPS
    Basic: 240 FPS
    Advanced: 180 FPS

    Swamp
    Unity: 190 FPS
    Basic: 140 FPS
    Advanced: 112 FPS
    Tesselated: 74 FPS

    There is most definitely a performance hit, and it's substantial. But the quality improvement is also substantial.
     
  39. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    that's a helluva machine
     
  40. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Thanks to everyone for the stats. These are really helpful for us to improve the shader :)

    There is actually plenty more you can do to optimise and where you end up will be based on what performance cost you are prepared to pay in return for eye candy. I was very tempted to do this in our demos ;)

    For example:
    • If you set Ambient Occlusion to None or Zero (in global settings section) it will add about 5% more fps as this is removed from calcs. Order of FPS cost is None -> Normal Based -> Texture based.

    • And then you can tweak texture sizes and reduce them which I am sure will make a difference on lower end cards as we are moving less memory around. The reason you can get away with lower resolutions is because we mix so much in with the terrain to add detail, geo, snow etc.

    • And then you can tweak LOD's.. you will lose a little fidelity in the background.. but with some nice fog / hazed effects nobody will ever notice. Game dev is an exercise in artful misdirection.

    • Rocking Per Texture Triplanar control - Spend the cost only where you need it - on cliffs!

    • And we are looking at removing snow from the calculations if its set to zero as well - again another reduction in the cost of the execution path.

    Its been a massive effort to get to here - but we are now at stage where we have time to start adding more documentation and tips so that you can get the best out of the system.
     
    Last edited: Jul 2, 2017
  41. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Yes! Very true. And all shaders have an impact.

    My GTX970 actually had better results than your 1080. I am surprised! At least I know I will keep my card. Our laptop with a 1050ti did not do as well as mine either.
     
    RobsonFMaciel likes this.
  42. SmokeyKilla

    SmokeyKilla

    Joined:
    Feb 11, 2015
    Posts:
    8
    Wow nice shader will be getting this......
    I tried the two test scenes on my laptop I7-4710MQ at 2.5 ghz
    amd radeon R9M 290x
    64 gb ram

    unity basic advances tess post fx
    swamp 134 50 28 10 10
    landscape 100 90 46 46
     
    AdamGoodrich likes this.
  43. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790


    This is just a heads up for those who want to use CTS in conjunction with Tenkoku... There is a new version of Tenkoku (ver. 1.1.6) that now includes an integration component with CTS. However, for those who do not have download access or who do not want to wait for the new version to show up on the Asset Store, you can download this component here:

    http://www.tanukidigital.com/tenkoku/misc_files/Tenkoku_CTS_Weather.zip

    USAGE:
    1. Setup Tenkoku and CTS in your scene.
    2. Add the CTS Weather Manager to your scene via the components menu.
    3. Drag this component onto the 'CTS Weather Manager' object in your scene.

    Rain and snow terrain influence will build up over time, according to the amount of precipitation set in Tenkoku and the settings you apply on the integration component. Rain and snow speed settings are delineated in seconds. 60 seconds = 1 minute. If 'Use Tenkoku Time' is selected, then the given speed will be compressed according to Tenkoku time multiplier settings.

    When 'Temperature Controls' is checked the system will modulate the terrain snow accumulation based on whether the temperature in Tenkoku is set at or below 32 degrees (f). If the temperature is above 32 degrees then snow will begin to melt and snow precipitation will wet the ground like rain instead, the higher the temperature then the faster it will melt. If the temperature is below 32 degrees, then snow will not melt, even if snow has stopped falling on your terrain.

    When 'Melt Influences Wetness' is checked, then the terrain will apply wetness (via the CTS RainPower setting) to the terrain as the snow begins to melt. The wetness will then decline as normal according to the set Rain Dry speed setting.

    Enjoy!
     
    jimburn, Mark_01, Goodgulf and 7 others like this.
  44. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Here is a handy little utility coming with next release of CTS.

    I developed most of the code for the analytics, and wrapped it into some UX, and made it a prefab so you can drop it into your scene. Another $5-10$ of value added if you consider what it costs to buy assets that do this.

    Metrics.jpg
     
    Magic73, Mark_01, Olander and 3 others like this.
  45. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    461
    Hi
    Will this work in OSX? Authoring and playback?
     
  46. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Yes.
     
  47. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    461
    Ok. Great to hear this. Will buy this tomorrow.
     
  48. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    461
    what 5.5 OSX unity version do you recommend?
    I just downloaded 5.5.4f1 for something else.
     
  49. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    I don't run OSX. On windows I am running 5.6.2p1 which seems fine. Perhaps the community could comment.
     
  50. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    Thanks. I make my living with this machine, among other things doing data analyses in MySQL or Postgres that can run into the multi-gigabyte table size. And then there's that little issue about Unity and graphics. :) So I invested in a custom-built rig that has been an unbelievable upgrade from my Macbook Pro's rather anemic GPU. In one of my recent Unity projects (an archviz PoC for our management), my lightmap bakes went from 6.5 hours to about 45 minutes.