Search Unity

[Released] Distingo - Terrain in Detail

Discussion in 'Assets and Asset Store' started by NemoKrad, Feb 1, 2016.

  1. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    429
    Ah yes, always read the manual! :) Sorry, just got carried away following your tutorial. Works great.

    I found there were fewer Distingo shaders in the current version, than what is shown in the Docs:

    Did I miss any or is that just a recent update?

    Also, do you always need to include them all (It's a bit laborious...) Could the process be automated?
    Or, for example, if only using the 'Unity Terrain Occlusion Standard PBR' which of the above would be needed?

    [Sorry if this is a stupid question, just getting up to speed with Unity and shaders etc.]

    and @Vedrit, yes, works a charm with Gaia.
     
    NemoKrad likes this.
  2. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    To my knowledge there is no way to automate it, that is how Unity works :/ I think some people have said copying the shaders to a resource folder works, but never tried it my self. If you have a scan through the posts here I am sure you will see what others have done.

    I might look at moving the shaders into materials, I think Unity then automatically includes them in the build then if they are used in a scene.
     
  3. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    I have a problem, in my scene I have to use two terrain objects and the 2nd terrain has to use a special shader, unfortunatly whenever i try to change the shader while the Distingo script is active on the other terrain, the shader on my 2nd terrain keeps getting reverted to the Distingo shader. Whats going here?
     
    akareactor likes this.
  4. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Sounds like distingo is looking to keep all terrains using its shaders if it's active
     
  5. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Distingo is acting on the current (selected) terrain, this is something I have been looking to change for multi terrain users, so hoping to have that done in the next up date (there is one in submission now, not that one, the one after that)
     
  6. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    Can't wait to use Distingo on my tiled terrain! :)
     
    NemoKrad likes this.
  7. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I have just fixed this in my development script(s), if you can't wait for the next patch to come out, mail me at the address in the documentation and I will send you the script.
     
  8. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    Awesome thank you!
     
  9. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    BTW Quick question, what about a water? It's part of the terrain, I wish Distingo would take care of my ugly tiling issues in there too.

    Edit

    Got a 2nd question, what if I wanted to get some of that awesome terrain tesselation I have been seeing ie.:


    I cant do that If I use Distingo on my terrain right?
     
    Last edited: Oct 12, 2016
  10. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Imho that's a job for another asset. I'd imagine a water shaders needs to be a bit more specialized to specific project needs (typical viewing perspective, typical viewing distance, art style, lake/river/ocean, etc.). If you have a water shader that you like except for normalmap tiling, it should be relatively easy to hack in sampling the normal map at two different UV scales and lerping the results together (possibly based on view distance) to get rid of tiling. Just give it a try, modifying shaders is a lot of fun even without really knowing what you are doing. Just make some changes to a copy of the shader you are using now and see what happens.
     
  11. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I have water shaders, but nothing for the asset store, I can recommend Aquas It's very good :)

    I have looked at adding tessellation to Distingo, but it is a total re write of the shaders as Unity does not integrate well with the DX shader capabilities. There is lots I would like to do with Compute shaders and geometry shaders, but Unity makes it a lot of work to get these things into their standard lighting pipeline (not compute so much)
     
  12. Mikael-H

    Mikael-H

    Joined:
    Apr 26, 2013
    Posts:
    309
    I have a terrain textured with a satellite photo that needs to be blended with terrain textures (grass, moss, rock etc) when reducing view distance. Can I blend one texture from a far distance with another one for a closer distance using this tool?

    Best case would be if I could also do the different tiling blending at different distances of course :) Tall order, I know, but is it possible?
     
  13. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Hi, you could blend the satellite texture with the terrain using Distingo, but not sure it will be how you wan't it, there will be no control of the level of blending based on distance.

    What you could do, is write a script yourself that manipulates the Distingo script based on distance.
     
    Mikael-H likes this.
  14. Mikael-H

    Mikael-H

    Joined:
    Apr 26, 2013
    Posts:
    309
    Thank you for the swift answer, we'll see what solution we end up going with.
     
    NemoKrad likes this.
  15. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    Aquas is great, thanks you.

    For tesselation, I understand its a lot of work and I am not talking about Distingo doing the tesselation itself, but isnt there a way to set things up so distingo can call some other shader to do it? I think I have seens shaders calling other shaders like that but my memory is vague. I may be missinterpreting what I saw. Or maybe some way to use PBR materials instead of simple textures? That may be a lot of work, I dont know what I am asking :p

    In the end I just want to know if there is some way I can use tesselation on my terrain while using Distingo. Doesn't have to be done by Distingo, I am just wondering if its possible and how you pros would do it.
     
    Ascensi likes this.
  16. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I am sure there is a free terrain tessellation shader on the asset store, I forget it's name now, but that might be worth a look.

    Distingo supports substances (in a way) if you have a substance you can drag and drop it on a Disitngo texture channel and it will use the textures in the substance. I can't remember off the top of my head if this works for the Unity Terrain shaders or if I only implemented it on mesh terrains shaders, probably the latter as I try not to touch the standard Unity components if I can help it.
     
  17. mak3r76

    mak3r76

    Joined:
    Sep 14, 2016
    Posts:
    18
    Hi, I´m having a problem with this creaseShadingEditor. There´re 3 error messages which I can´t fix:
    • Assets/Editor/ImageEffects/CreaseShadingEditor_.cs(8,26): error CS0122: `UnityStandardAssets.ImageEffects.CreaseShading' is inaccessible due to its protection level
    • Assets/Editor/ImageEffects/CreaseShadingEditor_.cs(8,6): error CS1502: The best overloaded method match for `UnityEditor.CustomEditor.CustomEditor(System.Type)' has some invalid arguments

    • Assets/Editor/ImageEffects/CreaseShadingEditor_.cs(8,6): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Type'
    would be glad if someone can help me.
     
  18. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Hi, this has been reported before, and it's not actually an issue with Distingo it's self, but the standard assets included for the demo. The issue is an incompatibility with the Standard Assets (Unity assets) that come with the last Distingo build and Unity. I am hoping to fix this in the next update by updating the latest version of Unity I build Distingo on.

    For now, if you get this error, you should be able to re import the standard assets which will over write the ones that came with this version of Distingo, or, just don't import them or the Demo folder.
     
  19. mak3r76

    mak3r76

    Joined:
    Sep 14, 2016
    Posts:
    18
    Alright, it works now. Thank you for your quick response!
     
    NemoKrad likes this.
  20. peteoaten

    peteoaten

    Joined:
    May 17, 2016
    Posts:
    10
    For anyone who does not know about including the shaders into your Unity build. Below is the quick way to add all your shaders to the graphics project settings.

    From the Main Menu > Edit > Project Settings > graphics

    Click on the padlock circled in red to lock the settings into the Inspector.

    padlock.png

    Click on the filter button in the project window and select Shader as indicated.

    filter.png

    Click on the first Shader and Shift click on the last to select them all, then simply drag them onto "Always included Shaders" in the Inspector. I added 166 for demonstration purposes :)

    This will cure black terrain issues as previously posted. Hope that helps.
     
  21. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    AWwwww :)
     
  22. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    Started in on Distingo today, and at first was very excited. As the following screenshot shows the amazing results. It also highlights a problem I'm having. I cannot get Distingo to render a 2nd terrain. The terrain was created with MapMagic.

    Any idea on how to handle this? I emailed the creator but he says he's out of town.

     
    NemoKrad and boysenberry like this.
  23. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I thought copying to Resources was supposed to work, but that actually never worked for me. I just started using this again today and I'm getting the following error on my Wii U as follows:

    Shader 'Nature/Terrain/Distingo Standard Specular': dependency 'AddPassShader' shader 'Hidden/TerrainEngine/Splatmap/Distingo Standard Specular-AddPass' not found

    However, I've added all except the Mesh shaders to the Always Included Shaders list. Here is a snapshot. What am I missing?

    upload_2016-10-19_20-26-56.png

    [EDIT]
    I'm trying to figure this out and I am confused by some seeming naming conflicts. I searched the shaders folder to find Hidden/TerrainEngine/Splatmap/Distingo Standard Specular-AddPass, and I see the file called DistingoStandard Specular-AddPass.shader, but inside the file the shader is actually named Shader "Hidden/TerrainEngine/Splatmap/Distingo Standard-AddPass". So the name doesn't match. Aside from this file which has the correct name in the file name itself, there is no other shader with the reference that it can't find. So it's understandable why it can't find it, but why is there this naming discrepancy?
     
    Last edited: Oct 20, 2016
  24. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Add them all, the current script instances them all so you will get issues if they are not there.

    I am looking at moving them into materials, they will then be accessible with out having to add them like this then.
     
  25. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I have been on holiday for a week, mail me on the support address in the documentation and I can send you a script that will fix this. I am hoping to put an update to the store today, they will then take up to 10 days to push it out to you guys.
     
    akareactor likes this.
  26. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    OK, thanks. I'll give it a try again later today.
     
  27. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Hi all, just thought I would self promote and mention I am hoping to have a new asset on the store in the next few weeks, I have just created a new thread for it here.

    Need to do a video for it, hoping to do that in the next hour or so.
     
  28. Shadex

    Shadex

    Joined:
    Dec 18, 2013
    Posts:
    89
    I just started trying to work with the asset. Are you only limited to 4 textures or can you assign multiple textures to a texture channel? I am hoping for some work around, because only using 4 textures is pretty limiting
     
  29. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Hi Shadex,

    If you read the documentation it explains how Distingo behaves with >4 textures. You can still use more than 4 textures, but as explained in the documentation there are side effects to it.
     
  30. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    Updated Distingo, and got a lot of Null Reference errors in DistingoTerrainScript.cs. Changing Update to include this line at the top seems to have fixed them.

    if (null == thisTerrain) return;
     
  31. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    And my first view, all purples. I suppose that means a shader is busted. I didn't import anything not in the Distingo directory. There were so many files, including Medieval Environment (from another asset) that wanted importing/updating.

     
  32. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Hmm, odd, ill check my build and add that in the next update if needed.
     
  33. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yep something's up, what's in the console window..?
     
  34. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Did you know that you are including UnityVS as part of your install package? You should probably remove that.
     
  35. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yes it takes the whole asset folder. For now you can choose not to import it.
     
  36. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    Goodmorning, got this Console message this morning. I verified there is a file, here's the whole path: C:\Users\Chuck\Desktop\_Unity\Projects\Game\Demo1\Assets\Plugins\Distingo\Shaders\Unity Terrain\PBR Standard\WithBlend\DistingoTerrainSplatmapCommonWithBlend.cginc


    Shader error in 'Hidden/TerrainEngine/Splatmap/Distingo Standard Specular-AddPassWithBlend': failed to open source file: '../../PBR Standard/WithBlend/DistingoTerrainSplatmapCommonWithBlend.cginc' at line 49 (on d3d11)

    Compiling Vertex program with DIRECTIONAL SHADOWS_SCREEN LIGHTMAP_OFF DYNAMICLIGHTMAP_OFF _TERRAIN_NORMAL_MAP
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING
     
  37. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Ok, do you have the terrain set as static. No shaders have been changed in this update, si nit sure why you are getting this now.

    Can you re create the issue in a new project with and if so, does it also show up in the demo?
     
  38. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    Can't load any of the Demo's, they are missing two prefabs each. I'll try and create some new maps. I can't seem to export the terrain and re-import into a new project.
     
  39. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    Created new maps, and didn't reproduce the bug. I'll have to play around with old saves of the previous map.

    Is there an easy way to duplicate the distingo component (with settings) to new procedurally generated terrains?

    Here's a picture, that shows two manually distingo'd terrains with more procedurally generated in the distance.

     
  40. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    That is worrying, what version of Unity are you tuning and ill try that my self in a new project..
     
  41. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yes, like any component, right click its inspector, right click and copy it.
     
  42. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I just downloaded the asset into a new project and all the demo scene's are fine.
     
  43. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    That's really strange, as that is what I had done.
     
  44. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    That's the manual way. I'm going to have to do it in script I'm thinking.
     
  45. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    Whatever is the latest... 5.4.2f1
     
  46. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Are you importing the whole asset?

    If you still get this issue on a new project, mail me the project to the support email address and I can have a look and see what's up :)
     
  47. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    When I add the Distingo Terrain Script to my terrain I'm getting the following error:

    Shader error in 'Nature/Terrain/Distingo Standard': maximum ps_4_0 sampler register index (16) exceeded at Assets/Distingo/Shaders/Unity Terrain/PBR Standard/Occlusion/DistingoTerrainSplatmapCommon.cginc(49) (on d3d11)

    Compiling Fragment program with DIRECTIONAL SHADOWS_SCREEN LIGHTMAP_OFF DIRLIGHTMAP_SEPARATE DYNAMICLIGHTMAP_ON _TERRAIN_NORMAL_MAP
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING

    Using Unity 5.3.6p2 and latest Distingo.

    P.S. I don't know if I'm the only one, but I don't like the idea of an asset's script advertising for other assets, especially when they have "click to buy" options. Not good in my opinion.
     
  48. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Here is what the terrain looks like. I see a weird striped pattern:

    upload_2016-11-1_8-7-53.png
     
  49. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    You are the first person to mention the promoted assets buttons.

    Is your terrain set to static as described in the documentation?
     
    Last edited: Nov 1, 2016
  50. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Yes.

    [EDIT]
    Wait. Not sure now. It's set to Static for all things by the checkbox at the top. Was there some other place to mark it static?