Search Unity

[Released] Distingo - Terrain in Detail

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

  1. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    You can reduce the cost greatly by writing these things yourself lol :p
     
    TheSeawolf likes this.
  2. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Hey, time is money, and compared to the time you and @Adam and @PitHeimes, among others have put into your products, we're still getting them at a bargain. Still, a nice sale on VTP to announce the inclusion of Gaia/Distingo support wouldn't hurt the cause. ;)
     
  3. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    I believe the current price of this product is good. And with the future updates they have planned it's worth more. :p
     
    NemoKrad likes this.
  4. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    Hey,

    Im working with Distingo on a procedural tiled terrain, and every time unity lose the windows focus in play mode (even a popup notification) the visual goes black, this effect dissapear without distingo ofc.

    There is no console error, Im not using global bend or occlusion textures, Any clue ?

    PS: Im using custom script but I implemented all the basic from the distingo original script and I apply the shader vars only to the material shader not to the global shader (1 material shared between all the tiles that shared the same splat configuration).

    Halp !!!.

    Thanks in Advance.

    I attached some proof.

    Terrain_InGame_Focus.png Terrain_InGame_LoseFocus.png
     
  5. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    So you are not using any of the C# I provide to use the Distingo Shaders, and now it's broken your render? You have also changed the mechanism that is used to push values to the shaders...

    With out seeing your code, I can't do much really, other then suggest you use the code I have provided.

    Could it be, now you are going direct to the material, you are resetting the params some how and so passing invalid values to the shaders?

    I think I originally tried to go direct to the material with Unity Terrains and had issues which is why I wrote it how it is now.
     
  6. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    I only apply shaders one (I initialized with values in range).

    All its working perfect except when unity lose focus.

    Custom script attached.

    I attach the material to the terrain as this :

    Code (CSharp):
    1. Terrain.materialType = UnityEngine.Terrain.MaterialType.Custom;
    2. Terrain.materialTemplate = TerrainBiome.biomeMaterial.OcclusionMat;
    3. Terrain.basemapDistance = TerrainBiome.biomeMaterial.SplattingDistance;
    PS I solved the problem right now, the cause is the basemap distance, I changed from 2000 to 6000 and the problem dissapear, it seems to be something related to that.
     

    Attached Files:

  7. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    For those of you interested in the Distingo + VTP collaboration, we now have a dedicated thread here.
     
  8. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    If you change the code I supply then you really need to take responsibility for when it breaks, you are not using it as intended.

    [EDIT]
    Feel free to mod and alter the code as you see fit, but do so at your own risk :)
    [/EDIT]
     
    Last edited: Mar 15, 2016
    S4G4N and BackwoodsGaming like this.
  9. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    Thanks, I know its my problem if I modify the scripts, but at the end the cause was the base map distance (it fixed when I accidentally keep the default of your script), the problem is when the composite texture is displayed in a terrain cause the displayed distance is higher than the basemapdistance of the terrain configuration, it was not a bug of my code, and I still think there is a problem with it, I made a workaround, I didnt fix anything.

    I have no idea about shaders so I cant explain or fix this, I am only pointing into the direction of the problem.
     
  10. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Anything rendered beyond the map distance is a fall back shader I think and not Distingo.
     
  11. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Tri-planar is now an option in the base Distingo shaders (as well as in VTP) :)
     
  12. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Quick pick, to show the diff

    Tri-planer on

    Tri-planer off


    Naturally, the Tri-planer render has more calculations in it (a lot more) so I have made it optional so you can switch it off and on (as it is in the Distingo + VTP shader too)
     
  13. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    It would be cool to see some comparisons with profiling for the triplanar.
     
  14. KingLlama

    KingLlama

    Joined:
    Jul 18, 2015
    Posts:
    199
    It seems i'm getting this error.

    Assets/Distingo/Scripts/GaiaCompatablilty/DistingoGaiaInstalled.cs(66,17): error CS0103: The name `EditorUtility' does not exist in the current context
     
  15. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yes, that was fixed in a patch that you can download here. Unity forums are not the best things to search are they :/

    This fix will also be in the upcoming 1.2 update.
     
  16. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Good to know you guys are quick to solve these issues.

    /me likes NemoKrad's post
     
    Last edited: Mar 17, 2016
  17. KingLlama

    KingLlama

    Joined:
    Jul 18, 2015
    Posts:
    199
    Nah, In all honesty I searched this forum first before I looked anywhere else :/
     
  18. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Just bought this :)
     
    BackwoodsGaming, NemoKrad and carsenk like this.
  19. TheSeawolf

    TheSeawolf

    Joined:
    Apr 10, 2015
    Posts:
    267
    I agree here, if there was say an Easter sale this would be very convenient and timely for me.

    I'm desperate to spend some money on a sale product; that way it lessens the guilt factor. :)
     
    BackwoodsGaming and NemoKrad like this.
  20. Locky

    Locky

    Joined:
    May 14, 2015
    Posts:
    86
    Hi,
    I have Gaia but have tried using Dintingo with just a standard Terrain. When I add the script, features on the Inspector become huge, and even unusable. Also, the Distingo interface is not the same as in the video. It has the logo and a couple of rounded rectangles. Nothing that I can actually work with. I read in earlier posts that this is a known issue with Gaia, but I wanted to make sure you were aware it happens with the standard Unity terrain as well. Using version 5.3.3 of Unity.
    Hopefully this will be worked out soon, I am amazed at the results I have seen with other users!
     
  21. Locky

    Locky

    Joined:
    May 14, 2015
    Posts:
    86
    I would like to use something like that as a large map the player can display for navigation. Then layer on certain other features and icons.
     
  22. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yes, it turned out to be down to the image used for Gaia in the free version of Unity, you can find the fix for this in post 500 here.

    The video is for the upcoming 1.2 update, I thought it we would have had it submitted by now, but still waiting on a few things, most of the UI is still relevant to earlier versions though.
     
  23. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Once I have the next Distingo Update submitted I am working on this again, it has a dedicated thread of its own now if you are interested you can check it out here :)
     
  24. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    First proper test last night of using Distingo. This still needs a tweak here and there - especially as I realised late last night that I need a dirt texture and cannot afford the 'luxury' of having two grass textures :)

    imgpsh_fullsize.jpg

    Not bad (in my not-so humble opinion :) lol) for an ageing HD7700 series card :D
     
  25. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Nice, what is the performance with that card?
     
  26. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Doesn't seem to hit it too hard.
     
    NemoKrad likes this.
  27. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    251
  28. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Distingo replaces the standard unity terrain shader, so unless Map Magic has its own shaders then I can't see why it wouldn't work with it.
     
    Hormic and NemoKrad like this.
  29. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Hormic likes this.
  30. NemoKrad

    NemoKrad

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

    I am hoping to get the Distingo 1.2 update into submission today, there have been some technical issues with the VTP plugin, but we hope to have those resolved soon and once sorted they will be in the 1.21 Distingo update.

    Sorry for the delay.
     
    adventurefan likes this.
  31. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    1.2 update is pending review :)
     
    adventurefan likes this.
  32. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Is there a way to use the Distingo Mesh Terrain Splat Blend and disabling the unity PBR features like smoothness and metallic?
    So its more like a legacy type shader. It would be great to use just the splatmap, occlusion map and just 4 textures. Anywhere in the code I can disable these features or there to hard coded in for that? I could use other splatmap legacy shaders but none use an occlusion map and it really can make a terrain stand out from just a general look. Any help is appreciated.

    BTW tho lovin the shader tho great job on this. Thanks.

    -Miguel
     
  33. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    Excellent update! Wasn't even expecting one, I especially liked the new blend feature. Everything works perfectly except the terrain goes pink when I try to use any of the specular shaders. Any ideas what could be causing that?
     
  34. adventurefan

    adventurefan

    Joined:
    Jan 17, 2014
    Posts:
    230
    well for some reason the distingo terrain shaders are not working for me at all now in 1.2. they're just the pink error color. (clarification: it's only the specular ones)

    there's some stuff in the console:

    Shader error in 'Hidden/TerrainEngine/Splatmap/Distingo Standard-AddPass': Can't find include file ../../PBR Standard/Occlusion/DistingoTerrainSplatmapCommon.cginc at line 35 (on )

    Shader error in 'Hidden/TerrainEngine/Splatmap/Distingo Standard-AddPass': Include callback failed at line 50 (on )


    Shader error in 'Hidden/TerrainEngine/Splatmap/Distingo Standard-AddPass': Syntax error at line 66 (on )

    Shader error in 'Hidden/TerrainEngine/Splatmap/Distingo Standard-AddPass': Syntax error at line 87 (on )


    Shader error in 'Nature/Terrain/Distingo Standard': maximum ps_4_0 sampler register index (16) exceeded at Assets/Distingo/Shaders/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 UNITY_TEXTURE_ALPHASPLIT_ALLOWED
     
  35. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Setting the smoothness and metallic to 0 should do that
     
  36. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Unity has been really odd when compiling the shaders, I think its due to me sharing the include files for code re use in those shaders. Try and force the to be re compiled, either from the editor or physically put a white space in the file and save it and unity should re compile it.

    I'll try and re create it, but never had it do this, ill do it in a new project, see what happens.
     
  37. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Thanks for the info, looks related to the post above yours, I am investigating :)
     
  38. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    @jonfinlay & @adventurefan

    I just created a new project and imported the 1.2 update and opened the Unity Terrain Demo Scene which is using one of the specular shaders by default (Unity Terrain Occlusion Standard Specular PBR), and it loaded fine, I have no pink.

    I did this in Unity 5.1 on my Win 10 machine, does the scenes that ship with Distingo render OK or is it just when you are adding Distingo to an existing project?
     
  39. adventurefan

    adventurefan

    Joined:
    Jan 17, 2014
    Posts:
    230
    ok, I tried a fresh project and import and good news is it's working right in a completely fresh project.

    for some reason it broke trying to update in the last proj but not a big deal for me right now
     
  40. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    It's working now thanks, basically I had forgotten to delete the Distingo folder before I updated. Vast improvement over the previous version, good job.
     
    adventurefan and NemoKrad like this.
  41. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Ok cool thanks for the info, see the post after that by jonfinlay
     
    adventurefan likes this.
  42. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Ahh cool, glad you like it :)
     
  43. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Wondering just how much you changed the triplaner mapping. My desert map doesn't look as awesome now haha. The sediment is going up the sides of mountains now instead of sideways like before. =(
     
  44. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I have not changed it at all. The tri planar mapping is v diff to uv mapping, you wont be able to have the same values as I state in the documentation. Also there is a global slider for tri planar to. Remember, it is optional.
     
  45. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    I got nice results with the Triplanar mapping, though I decided not to use it in my current scene as I noticed a hefty performance hit. Nice to have though and I'm sure I'll use it in the future.
     
    NemoKrad likes this.
  46. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yep, tri planar raises the number of calcs by quite a factor, and is why I made it optional
     
    jonfinlay likes this.
  47. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    Hi @NemoKrad

    I'm having a really weird problem when I enable Distingo in the latest update.
    All my ground textures appears one flat colour like this, and the lighter part moves with my camera.
    It doesn't happen in the editor, only when I build a standalone.

    If I enable development build, the the logger reports 1 error : Null Reference Exception.

     
  48. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Dang, that is odd, can you create me a cut down version of it occurring and send it to me?
     
  49. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Something is very different if you compare this to wha I had before. Maybe you can help me fix it? It's no longer horizontal. It is vertical in a lot of spots. Some are horizontal. Compare the below two images. First is latest distingo I got from Asset Store, the second is from the beta I was using with VTP features.


     
  50. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    You would have to tall to Pit, he had his own code for tri planar :/

    The tri planar code I used is from the unity samples.