Search Unity

CTS - Complete Terrain Shader

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

  1. UlringOfDeath

    UlringOfDeath

    Joined:
    Nov 3, 2017
    Posts:
    5
    I have another plugin called TerrainImporter. I am using WorldMachine to create my terrain. TerrainImporter imports my .r16 height information, .png Texture/Normal, then creates a standard Unity terrain. When I add CTS to the terrain and then Create And Apply Profile my texture looks like it gets flipped. How do I prevent CTS from fliping my texture or flip it back to the correct orientation? I am using CTS 2019.
     
    Last edited: Jul 4, 2019
  2. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    535
    Where do these splatmap textures come from? Are they generated by CTS or by Unity?

    EDIT: Been digging and still not sure where terrain.terrainData.alphamapTextures comes from. I wrote some debug scripts and a stock Unity terrain doesn't have any. Length of the array is 0. It isn't until I "Add CTS to Terrain" that the array length becomes 4 (on a working tile) but I can't figure out where in CTS they are getting set.

    This is definitely an area of Unity where I'm not very comfortable but I'm trying to dig through it to figure out what is breaking.
     
    Last edited: Jul 4, 2019
  3. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    I tried to reproduce the issue in 2019.2b and was able to reproduce it instantly, so this seems to be bound to the unity version. It looks like the issue you are experiencing is a unity bug in the neighboring system in this version: When I set up a single terrain with multiple textures on it (no CTS involved), and try to paint one of the textures over to a neighboring terrain, unity will throw this error message and will display visual glitches in the terrain inspector as well:

    CTS1.JPG

    So it looks like there is some issue with the setup for splatmaps / texturing / terrain layers with the terrain layer system, in 2019.1 it is possible to paint over to a neighboring terrain with a texture without any issues.
    Please note that 2019.2b is a beta version which we officially don't support for this exact reason: The beta versions can still contain bugs that are difficult to track down and can appear and be fixed again with any update to the beta.

    I would recommend to only use the alpha and beta versions to check out the new unity features or to test for stability, but not for working on an actual project.

    Can you please try to downgrade to 2019.1 to see if you can recreate the issue there? I will report this issue as a bug in the unity beta so it will be investigated before 2019.2 will release.
     
  4. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    For clarification: Are the single texture images flipped, or is the overall splatmap (the texture positioning on the terrain) flipped? Can you maybe post a before-after screenshot?
    Normally CTS should flip neither of those two, it should take the orientation of the single textures as they are and bake them in its internal texture array, and normally it should also not touch the splatmap orientation as well.
     
  5. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    535
    This is why its GOOD to use Beta versions because now we've found a bug that needs to be reported so it can be fixed :) This might have gone unnoticed otherwise.
     
  6. UlringOfDeath

    UlringOfDeath

    Joined:
    Nov 3, 2017
    Posts:
    5
    Before
    2019-07-05 (1).png
    After
    2019-07-05 (2).png

    It looks like the texture i already have applied gets flipped
     
  7. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    Thanks for posting the screenshots! After staring at them for a good while it looks to me that in the "After" shot, the terrain seems to utilize the terrain texturing of the lower left quarter of the "Before" terrain only:

    upload_2019-7-6_13-39-50.png

    This is very weird, as there is no code in CTS to actively scale the splatmap or only use portions of it - it always should use the full splatmap normally. Can you please check the following:

    1. Can you please check if the terrains "Control Texture Resolution" setting somehow changes between "Before" and "After"?
    2. Can you please check how the terrain splatmap looks and if it resolution changes between "Before" and "After"? You can find the splatmap inside the terrain's terrain data object in the asset hierarchy. If you are having trouble locating it, you can look at the terrain collider component, it has a reference to the terrain data object this terrain is using:
    upload_2019-7-6_13-50-36.png

    Inside the terrain data object you can see the splatmap that stores the texture distribution on the terrain, this is also the file CTS should use to decide which texture from the profile goes where:
    upload_2019-7-6_13-51-57.png

    It would be interesting to see if this splatmap texture changes in any way from "Before" to "After", if it gains or loses resolution, etc. Also the texture format at the bottom of the preview window (ARGB8 UNorm in my example) could be interesting if it changes.
     
  8. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    535
    Looks like this is fixed now in 2019.2b7
     
  9. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    I don't think so, I reproduced your issue in that version when I replied to you above. I received the following issue ID for this bug from reporting it:
    https://issuetracker.unity3d.com/product/unity/issues/guid/1149861
    You can check for this ID in the future beta changelogs to see if it will be mentioned.
     
  10. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    535
    Strange because when I tested it, it worked as expected in b7.
     
  11. Binary42

    Binary42

    Joined:
    Aug 15, 2013
    Posts:
    158
    Hio, is there a way to avoid triplanar plopping between near and far? Otherwise blending works fine but with triplanar, textures seem to switch hard. Is there a way to get triplanar texturing for far distance too, so that they blend seamlessly ?
     
  12. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    I'm afraid that is not possible at the moment: Triplanar is currently active in both near and far rendering, the popping to non-triplanar is happening when you cross the LOD Distance where a cheaper version of the CTS shader is used to render the terrain:

    upload_2019-7-9_14-30-28.png

    What we could look into is to make triplanar a separate setting for near and far so that you could deactivate it for far rendering so it would blend in the near->far distance instead of plopping at the "hard" LOD distance.
     
    Binary42 likes this.
  13. ArturoUSR

    ArturoUSR

    Joined:
    May 31, 2019
    Posts:
    15
    So far at the studio we are super happy with CTS.

    Do you have planned a feature for far "bright" and "tint? It would be awesome to make, for example, a grass texture darker at the distance so the transition between trees being culled is less noticeable. (Or is it already? :p)
     
  14. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    Not yet, but I will add it to the list for "things to look into for future updates", thanks for the suggestion!
     
    ArturoUSR likes this.
  15. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,235
    Maximum number (256) of shader global keywords exceeded, keyword _MAIN_LIGHT_SHADOWS will be ignored

    I get this 7 times in my console and when I click on it. surprisingly it takes me to a CTS script. Cause usually that error doesn't take me anywhere lol.
    I understand its from having to many shader keywords.

    But it takes me to this script on the CTSShaders Class
    Is CTS always using these Shaders all the time? or what ever its doing lol?
    Wondering if its tripping the keyword limit for no reason.

    Code (csharp):
    1.  
    2.             foreach (KeyValuePair<CTSShaderCriteria,string> kvp in CTSConstants.shaderNames)
    3.             {
    4.                 Shader shader = Shader.Find(kvp.Value);
    5.                 if (shader != null)
    6.                 {
    7.                     m_shaderLookup.Add(kvp.Value, shader);
    8.                 }
    9.             }
    10.  
    11.  
     
  16. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    I do not know 100% how the 256 keywords limit is calculated, but as far as I know even unused shaders can count towards that limit. If I remember correctly you are using CTS 2019? If so, you could take a closer look at the "Shaders" folder, and deactivate Shaders that you don't need. The contents of the Shaders folder are built up as follows:

    upload_2019-7-16_3-40-38.png

    The Shaders sitting directly in the "Shaders" directory are the ones for the built-in rendering pipeline. Then there is a folder that is just a SRP version number, in the screenshot above it is called 5.7, under Unity 2018.3 you see 4.8 instead. This folder contains a LWRP and a HDRP folder which - you probably guessed it - contain the shaders for the respective rendering pipeline.
    The library folders contain .txt files that will be converted / renamed to shaders when required, but those should not matter regarding your issue.

    Depending on which pipeline you are using, you can delete, or rename the unused shaders:
    • If you are using built-in rendering only, you can remove the contents of the "5.7" folder (just leave the folder itself intact, otherwise CTS will just reinstall the shaders again from the library after a second!)
    • If you are using HDRP, you can remove the shaders in the "Shaders" directory, and in the 5.7\LWRP folder
    • If you are using LWRP, you can remove the shaders in the "Shaders" directory, and in the 5.7\HDRP folder
    This should free up shader keywords in your project so that you don't see this message again. We have it planned for a future update that CTS will activate & deactivate the shaders according to the currently activated pipeline, so that this action will be performed automatically then.
     
  17. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,235
    Thanks man always big help.
    I have a pretty large keyword issue atm. I fixed it once but it came back after upgrading to 2019 it seems.
    It's hard to figure out what shader is using g a ton of keywords.
     
  18. wumn

    wumn

    Joined:
    Jan 11, 2018
    Posts:
    24
    I use unity2018.3. Can I make the HDPS version of CTS 2019 support 4.9? Because RAM 2019 uses HDRP4. 9. Otherwise, these two plugins will not work properly in my project.
     
  19. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    Here is a thread with good background info about the problem: https://forum.unity.com/threads/solved-64-keyword-limit-questions.252750/
    Inside the thread, one user made a free tool to see which shader is using how many keywords, I'm not sure if it is still working / working good: https://forum.unity.com/threads/keyword-reporting-and-removal-tools-free.415998/
    Then there is also a tool on the asset store to get an overview about which shader uses how many keywords:
    https://assetstore.unity.com/packages/vfx/shaders/shader-control-74817
     
  20. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    Officially CTS only supports SRP 4.8 in Unity 2018.3 & 2018.4 and SRP 5.7 in unity 2019.1. These limitations have to do with the HDRP version not being compatible with each other: every new version adds, changes or removes stuff which makes it difficult to create new shaders for every version that is coming out.

    However if you are willing to experiment a bit, you should be able to get CTS running in HDRP SRP 4.9 as well. To do so, you would need to do the following:

    1. Install latest CTS 2019 from the asset store
    2. Install HDRP version 4.9 from Package Manager

    3. Open the file system and drop the two files from the zip file in the attachments in the Package cache in your project. The Package cache directory is at the same level as the "Assets" directory in your project folder. The exact location you need to put them in is:
    Library\PackageCache\com.unity.render-pipelines.high-definition@4.9.0-preview\Runtime\Material\TerrainLit
    (Those two files are part of the HDRP 5.7 package normally)

    4. Delete the HDRP folder inside of
    Assets\Procedural Worlds\CTS\Shaders\4.8

    5. Copy the HDRP folder from
    Assets\Procedural Worlds\CTS\Shaders\Library SRP 5.7 over in the 4.8 folder

    6. Inside the 4.8/HDRP folder, remove the "file" suffix from all extensions so that
    ".shaderfile" becomes ".shader",
    ".hlslfile" becomes ".hlsl"

    7. Make sure the renamed files show up as shaders in unity after the rename, if in doubt right click on the 4.8/HDRP directory and select "Reimport". After this step, CTS should run with the 5.7 shaders in a 4.9 HDRP project.
     

    Attached Files:

    eric_delappe likes this.
  21. AwesomeNewbie

    AwesomeNewbie

    Joined:
    Jul 16, 2019
    Posts:
    11
    Such a great asset!
     
    PWPeter likes this.
  22. wumn

    wumn

    Joined:
    Jan 11, 2018
    Posts:
    24
    thank!
     
  23. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,235
    Ya im aware of that free tool. It really isn't that useful to me. Its still a huge mess. Anyways i found a better tool in the asset store called Shader Control. That allows me to see the keywords way better.
    Its really nice.
     
    PWPeter likes this.
  24. Hexer_

    Hexer_

    Joined:
    Aug 25, 2016
    Posts:
    86
    Hi, I'm using CTS 2019 and it stopped generating mat file inside CTS/Profiles/Materials
    How can I force it to generate for example a file like this ?

    Material_76ff84026b66a2345be48b9b3e17a584_4a0e8966b699b2046b92a04447a1f6cd.mat
     
  25. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    CTS originally created those materials whenever there were changes in the CTS profile which then would slowly pile up in the project. Newer CTS versions create a temporary material on the fly for this, but there is also a possibility to create such a persistent material by Disconnecting and Reconnecting the CTS profile. Disconnecting the profile is normally a performance feature, but as a "side product" it creates a material that you can use on a mesh for example. When you disconnect a profile, CTS 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 in the CTS component
    • Remove all splatmap prototypes / terrain layers from the terrain
    • Remove all splatmaps from the terrain data object
    This puts CTS in a minimal state for a build to save memory and build size. When you reconnect the profile, all the steps above are reversed, but the material is still there in the folder. Try backing up your project and then Disconnecting / Reconnecting the CTS profile via the button in the CTS component, and then check the material in the Profiles\Material folder.
     
    Hexer_ likes this.
  26. Hexer_

    Hexer_

    Joined:
    Aug 25, 2016
    Posts:
    86
    Hi PWPeter and thank you for detailed explanation. :)
    Everything is fine now, I actually didn't notice the materials are first generated after disconnecting them so I never tried that option.
     
  27. UlringOfDeath

    UlringOfDeath

    Joined:
    Nov 3, 2017
    Posts:
    5
    Thanks for your help Peter. Sorry I did not respond soon. We got busy and figured it out. We put the main Texture in the Terrain ColorMap. That worked. I thought the ColorMap was where you put the SplatMap
     
  28. MorpheusXI

    MorpheusXI

    Joined:
    Jan 18, 2018
    Posts:
    27
    Did you resolve this performance issue? I'm trying to decide if I should use CTS or RTP, I already have both assets. I wish to target both PC & Mobile platforms with the same shader. Easy to use and quick to implement is also important, I'd take 15FPS less just for that.
     
  29. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    191
    Unity 2019.1.9f1 hdrp 5.16.1
    Issue
    Shader error in 'CTS/HDRP/CTS Terrain Shader Advanced': 'InitBuiltinData': cannot convert from 'float' to 'struct PositionInputs' at line 913 (on d3d11)
    Shader error in 'CTS/HDRP/CTS Terrain Shader Advanced': 'InitBuiltinData': cannot convert from 'float' to 'struct PositionInputs' at line 5609 (on d3d11)


    upload_2019-7-31_16-10-22.png
     
    Last edited: Jul 31, 2019
  30. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    This is by design, CTS only supports fixed SRP versions tied to certain Unity versions: HDRP / LWRP 4.8 in Unity 2018.3 & 2018.4 HDRP / LWRP 5.7.2 in Unity 2019.1 2019.2 went out of beta yesterday and we will support it soon in HDRP / LWRP as well. The reason for this is that the different SRP versions are not 100% compatible with each other and we need to adjust the shaders individually for each released version.
     
    tcourbet likes this.
  31. tcourbet

    tcourbet

    Joined:
    Oct 5, 2017
    Posts:
    46
    Do you have any (even vaguely accurate) timeframe for when the support for the newest SRP will come out?
     
  32. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    I can't tell it very precisely at the moment unfortunately, I'm waiting on shader development myself for feedback.
     
  33. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    535
    Using the package manager you can often manually install an older SRP/HDRP version than he default in a given Unity version, thus allowing you to use CTS. This worked fine for me in an earlier build, but I haven' tried it yet in 2019.2, but will be looking into that when I get back from Siggraph. Its worth a try anyway.
     
  34. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    284
    Just pulled in CTS 2019 into my project for which I am using 2018.4. I can add CTS to terrain from the Component Menu but I have no other options. I can't Apply a Terrain to create a profile, etc.

    Any help would be great.
     
  35. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    Please check under the Windows > Procedural Worlds > CTS menu, there you should find the missing entries. We had to remove the Component Menu entries for technical reasons.
     
  36. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    284
    Thanks, I'll give it a go.
     
  37. jakes-du-preez

    jakes-du-preez

    Joined:
    Aug 14, 2013
    Posts:
    30
    Hi

    Any plans for 2019.2 hdrp 6.9 support? Timelines?

    Thank you
     
  38. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    2019.2 /6.9 will be supported soon, I don't have an exact timeline yet.
     
  39. whiskers434

    whiskers434

    Joined:
    Sep 23, 2014
    Posts:
    8
    Hi,

    I am having an issue with a unity projector not projecting onto the terrain

    In a test scene with a normal unity terrain its projecting fine but in our main scene with the terrain using CTS texture thing its not working

    Thanks
    ~whiskers434
     
  40. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    Hi can you tell me please if this is a regular unity projector or if you are in HDRP and using the HDRP Projector component?
    If it is a regular projector it could be worth a try to see if it is working when switching instanced terrain off, as far as I know there can be issues with the projector component and instanced terrain.
    For HDRP I would need to check back again with shader development, iirc it was difficult to support it in the earlier SRP versions, but we might be able to support it now when we create the new shaders for Unity 2019.2 / SRP 6.9.
     
  41. whiskers434

    whiskers434

    Joined:
    Sep 23, 2014
    Posts:
    8
    Hi,

    using unity standard project and light projector shader that comes in the standard assets

    not using HDRP in this project

    yes the draw instanced option appears to be my issue, thanks

    tho something is forcing the option back to true at runtime? would cts be doing that?
     
  42. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    Yes, that could be, there is an option for "Draw Instanced" in the optimization settings of the CTS profile, this setting will switch it back on again when it notices that it is not enabled on the terrain.
     
  43. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    329
    A question to the developer.

    I've recently discovered that my previous and current game, has very low performance on amd video cards (Rx 580 & 590) to be more specific. On (Rx 580 & 590) video cards, my game had performance that was equal to Nvidia GTX 680 while, those cards are much more powerful than Nvidia GTX 680 and in every other game my friends had much larger fps on those cards compared to GTX 680. Both of my friends experience this issue. I've took Radeon Rx 590 from one of my friends to debug it and figure that CTS is a major contributor to this difference. For some reason CTS performs very poorly on those video cards compared to default unity terrain shader.
    In my test scene, when I change CTS to unity default shader, FPS on RX 590 jumps from 90 fps to 132 fps! While on NVIDIA 680, with unity default shader and CTS shader I get basically same result (around 92 fps).

    Do you have AMD video cards in the studio? Did you noticed huge performance difference between Nvidia and Amd video cards when CTS shader is being used?

    P.S. My test project is using Unity 2018.4.5f1. But my previous game made with Unity 5.6 that is also using CTS.

    Update: Did some more tests. Even CTS lite performs worse than default unity terrain shader on amd, although not by much.
    CTS Lite: 119 fps
    Unity default: 131 fps
    And I don't use strip textures, cause plugin called Crux depends on texture information.
     
    Last edited: Aug 10, 2019
  44. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    We are currently not aware about a general performance difference / issue on AMD cards. What we did notice however since the release of the new terrain system with "Draw Instanced" etc. in Unity 2018.3 that we are getting reports of obscure cases where certain combinations of Unity Version / CTS Version / hardware trigger performance losses. These cases are often difficult to debug because the issue can disappear at the slightest change, so even if the user sends us their complete project it might not be reproduceable on our PCs.

    Could you please try if you can reproduce the issue in the demo scenes that come with CTS as well? When you run them, you can switch through the various CTS shader types with the number keys on your keyboard, so you can compare between unity (1) and the CTS shaders (2-5) directly.

    Then it would be great if you could take a look at the profiler in your own project where it shows the issue, and check if you can pin the performance difference down to a certain entry in the profiler hierarchy. If you are not familiar with the profiler, please do the following:

    1. Start your scene
    2. While the game is running, open Window > Analysis > Profiler
    3. In the profiler window, you should see a performance graph appear, try to click in a "normal" flat area that represents the average performance of the scene like so:
    upload_2019-8-10_14-6-58.png
    (If you would select the spike instead, you would probably see some internal process of unity running in the results, which can be interesting on its own but would be less suitable for our comparison.
    4. Switch to hierarchy view in the lower part of the compiler, and sort by "Time ms" descending.
    upload_2019-8-10_14-9-21.png

    5. You now have a list of processes that contributed to the CPU load for the frame you selected above. You can unfold this hierarchy to look at the sub-processes as well. It would be great if you could compare this list between CTS and Unity shading in your project to see if you can find one or more entries that create the difference in processing time.

    It could also be that the difference is created on the GPU and not the CPU, you can add a GPU Profiler to the Profiler window and do the same analysis by clicking in the GPU graph then instead:
    upload_2019-8-10_14-13-17.png

    By investigating the issue from your side you could help us out a lot to pin issues like these down and then investigate further from our side and / or raise this with unity support as well.
     
    Bartolomeus755 likes this.
  45. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    329
    I've returned AMD RX 590 back to my friend so I can no longer debug it. I don't use instancing on terrain. The difference was entirely GPU related. GPU was a bottleneck, that's why I took RX 590 from my friend, installed it on my PC and witnessed same performance difference/issue. And GPU load was 100%. In the end, I've switched terrain shader from basic to lite, because I don't use any features a of basic shader and it gave a significant performance boost on AMD RX 590, while making almost no difference on Nvidia GTX 680. If you don't have any AMD video cards, it might be a good idea to get one.
     
  46. TheTechnomancer7

    TheTechnomancer7

    Joined:
    Oct 2, 2016
    Posts:
    1
    Has anyone had this issue with tessellation:
    TessProblem.PNG

    This was originally sand that had cts tessellation applied to it and as you can see the heightmap tess depth isn't even that high. Whats strange is that the tessellation was working perfectly fine a couple hours ago and I don't recall changing anything.
    The tessellation works fine up until tess depth .2 but extreme tearing happens after that. I'm using Unity 2019.1.8f1, SRP
     
    Last edited: Aug 12, 2019
  47. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    383
    Hmm, I think I have never seen anything like that and I'm not sure what could cause it. The tesselation density on top of the profile seems rather high, can you try how it looks if you reduce it a bit?

    Other things you could try:
    * re-bake your textures
    * Try to create a new scene, add a terrain, add a CTS component and use your existing profile on it. Please note that when the terrain is 100% flat, tessellation might not work as good as if it has little bumps into its geometry because Unity will auto-optimize larger flat planes to use less polygons.
    * Try to enable wireframe view and observe how the tessellatíon is applied when you increase the tessellation depth, maybe this gives some indication what is going on.
    *Try to check if tessellation is still working in the CTS demo scenes, if it is maybe you can find something when you compare the two setups / profiles.
     
  48. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,291
    I just wanted to say I am also eagerly waiting for an HDRP update for CTS. Unity 2019.2 is the first version that says it supports SpeedTree now. I would really like to use CTS in this version with the HD Renderpipeline.

    Thank you.
     
  49. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    284
    I've had this issue for a bit now and have tried to solve it many ways. Unfortunately CTS keeps screaming. I am using 2018.4.3 and have imported the PostProcessing Stack. It seems when I pulled in CTS there was no issue but now when I pull in certain assets I get the following error:

    Code (CSharp):
    1.  
    2. Assets\Procedural Worlds\CTS\Scripts\CTSDemoController.cs(940,88): error CS0433: The type 'PostProcessLayer' exists in both 'Unity.Postprocessing.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'com.unity.postprocessing.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
    3.  
    Does anyone have any ideas?
     
  50. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,291
    That sounds like you have a "namespace" issue in which Unity can't determine which "PostProcessLayer" name to use properly, since it's defined in two locations at once. This happens a lot when using a lot of 3rd party assets in your project.

    I don't use the CTS Demo controller script at all in my games, so usually when I get these errors I simply comment the problem code statements out. For example, open up the CTSDemoController.cs script and find where the PostProcessLayer is defined and try commenting it out.

    Sometimes asset developers try to code for multiple platforms at once, which can lead to some troublesome code. For instance, if there is a "WebGL" block of code, and you don't use WebGL, then you can comment out the WebGL related code...... but again it depends on what you want to use.

    I would not delete anything yet unless you know what you're doing. You can always "uncomment" it out if it leads to even more errors. Just my suggestion -- don't do anything that you can't undo. Might be a good idea to backup your project as well.
     
    Last edited: Aug 14, 2019
    PWPeter likes this.