Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[Released] Distingo - Terrain in Detail

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

  1. Sigstan

    Sigstan

    Joined:
    Nov 13, 2013
    Posts:
    16
    Weird that it works differently.

    Anyway, just letting you know that I really consider this to be a minor thing. I love Distingo's ability to remove tiling, AO support and easy approach. Left a 5 star review to say the same.
     
    NemoKrad likes this.
  2. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    That is good to know. I agree, it probably is a minor issue, and I think it's only affecting a minority of users, but it is an issue and I want to get it squashed, the whole point to me about creating these assets is to make peoples development lives easier and a glitch like this is annoying and that's the last thing I want for my users :)

    These sort of bugs are annoying when I can't recreate them, so I have to make changes that I "think" will resolve them. I have sent out a Beta for the update, so hope my change has had an effect on this issue.

    Ill let you know once it's confirmed fixed.
     
    Last edited: Feb 21, 2016
    one_one likes this.
  3. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    In the terrain inspector, the Base Map Dist. is controlled by Distingo's Splatting Distance slider, what ever this is set to, the Terrain Base Map Dist. will be the same.

    I should probably rename this parameter from Splat Distance, as this was the legacy variable used in older Unity Terrain but it is now basemapDistance. If you read the doc that accompanies the asset I describe the variable that this affects in the Terrain Engine.

    Terrain.activeTerrain.basemapDistance = SplattingDistance;

    I will rename this param in the update, may save some confusion.
     
  4. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Sorry for the late reply, I actually don't know, try moving the editor folder out of the Asset folder, see what happens, you can always move it back :)
     
    S4G4N likes this.
  5. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
    Thanks.
     
    S4G4N likes this.
  6. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632

    Been spending some of my free time working on the next update, have a basic mesh terrain using the Distingo shaders, just added in an example blend texture, which has a road and path on it to try and show how it can be used, keep in mind, I am no artist and forgive my programmer art :p
     
  7. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Yep, that was me. I feel so much better now to know I am not ALONE! :)
     
  8. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    For those of you still having issues with the UI, if it is proving to be an issue, then you can remove the Editor folder from your project and Unity will use the default inspector for the script rather than the one I wrote. The UI will not be as nice to use, but you won't have the issue of the UI expanding.

    I hope to have a code fix for this soon, ill put the new editor script on my web server so you won't have to wait for it to go through the submission process, as we know, it's not always as quick as we like ;)
     
  9. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    382
    Ok Distingo with Gaia 1.0 first attempts

     
    NemoKrad and S4G4N like this.
  10. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    382
    Gaia 1.5 & Distingo took less than 5 min to get these results.

     
  11. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    Hey, I noticed that after installing the new version of Gaia, the UI has fixed itself. I wonder whether the two are related?
     
    BackwoodsGaming and NemoKrad like this.
  12. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    hmm I shouldn't think so, but possible I guess.

    What version of Unity are you running again @jonfinlay ?
     
  13. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Nice!
     
  14. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    v. 5.3.2, I think it's the latest version.
     
    NemoKrad likes this.
  15. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    382
    With Distingo and Gaia 1.5 it's making hard to get any work done.
     
  16. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Same here, Jon! :) I blame Adam.
     
  17. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    Must be related to Gaia then, I was thinking a good way to see was whether it had something to do with Gaia was to check with you, since you were the only beta tester who had the problem. Perhaps it has something to do with the Gaia integration that was included?
     
    Stormy102 and Teila like this.
  18. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Hi all, it seems in MY Gaia Extension code I missed of a #endif, If you are getting errors with DistingoGaiaInstalled.cs, then please overwrite the one you have with the one in the zip file here.
     
  19. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    I doubt it since I have had this problem for quite some time now, even before the Gaia extension and during testing, even in projects without Gaia. But I was the only one to have the problem until you guys had access to Distingo and no one could replicate it. Anyway, seems to be fixed now!

    My guess is whatever it was that was broken was fixed by Gaia because it over-wrote something. Of course, I really have no idea. lol I am not a coder. I should write that on my forehead. :)
     
    TeagansDad, NemoKrad and jonfinlay like this.
  20. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    213
    Hi NemoKrad
    Getting the following error when trying to build a Standalone Windows version (x86_64), does run without this error from Unity itself.
    Assets/Distingo/Scripts/GaiaCompatablilty/DistingoGaiaInstalled.cs(66,17): error CS0103: The name `EditorUtility' does not exist in the current context​
    Unity 5.3.2f1 personal with Gaia 1.5 installed. Windows 10 64bit
    Tried this with the new DistingoGaiaInstalled.cs file as well, but still getting the same error.

    Ok fixed by adding a #if UNITY_EDITOR and #endif around the following line

    EditorUtility.DisplayDialog("No Terrain Found", "You have no terrain in your scene, please add a terrain and try again.", "OK");​
     
    Last edited: Feb 22, 2016
  21. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    See my last post :)
     
    runningbird likes this.
  22. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Ah, ok looks like I missed something else, thanks for the spot ill update the zip today. Thanks for letting me know.
     
    Last edited: Feb 23, 2016
    blacksun666 likes this.
  23. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Updated the zip, should you be having the same issue building. The fix is here (same URL, just updated the contents of the zip).

    Hoping to post the update to the store this week, it will include Distingo support for mesh terrains :)
     
    blacksun666 and TeagansDad like this.
  24. Xenonus

    Xenonus

    Joined:
    Jun 26, 2014
    Posts:
    53
    First of all: AWESOME terrain shader!
    Second: having some issues with it :)

    Getting the below error with weird lines and no shadows on the terrain. Unity 5.3.2p4, forward, linear:

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

    Compiling Fragment program with DIRECTIONAL SHADOWS_SCREEN LIGHTMAP_OFF DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON FOG_EXP2 _TERRAIN_NORMAL_MAP
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_TEXTURE_ALPHASPLIT_ALLOWED
     
  25. Sigstan

    Sigstan

    Joined:
    Nov 13, 2013
    Posts:
    16
    I can also report UI issue fixed, although I believe it was only after upgrading to Unity 5.3.2P4 that it disappeared. I think it was still there after I installed the new Gaia version, but Unity upgrade was shortly after, so not completely sure.
     
    NemoKrad likes this.
  26. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    It looks like you still have the Lightmap Static switched on, if it's on Unity takes up another texture register which then pushes the shader over 16 texture registers (if you have "Use global texture blend?" off. Read the doc it tells you all about this as a possible issue.
     
  27. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Distingo's first update has been put into submission.

    Includes support for Mesh Terrain
    Updated the document to give a bit more info on how the global blend texture is applied

    Lest hope the update is quicker than the initial submission :D
     
  28. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    Completely tile-free! There used to always be a thin visible tiling on similar terrains which has completely gone now. Really can't fault Distingo, still haven't found the best settings yet though, this is near 0.5 and far 0.1. Guess it depends on the original UV of the texture.

    Grab 20160223223546 w1900h1200 x82y6z-922r105.jpg
     
  29. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yes it probably does as well as the texture it's self. You can always go and play with that in the Terrain script though. I didn't include that in the Unity Terrain shaders as I wanted to keep them as separate as possible.

    In the update you will be able to alter the base UV multiplier for Mesh Terrains though :)

    So glad you are enjoying it @jonfinlay :)
     
    jonfinlay likes this.
  30. Xenonus

    Xenonus

    Joined:
    Jun 26, 2014
    Posts:
    53
    Yep, I've overlooked it. Works without any issues now, thank you for pointing me in the right direction!
     
    NemoKrad likes this.
  31. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Ahh that is good news :)
     
  32. gameDevi

    gameDevi

    Joined:
    Oct 14, 2015
    Posts:
    155
    Hello NemoKrad,

    Any chance you plan to release this shader with more than 4 texture support?
    textures above 4 seem to look darker than normal.
     
  33. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Using Unity Terrain it will work with more than 4 textures, but it is limited, see the docs for more details. Full support of multiple textures I am not sure I can do (will have to investigate it a bit more) as the Unity Terrain Engine executes an additive shader for each group of 4 textures over 4, and I don't know how I can tell when it is in the first or subsequent render pass.

    Ill see if I can find out :)
     
    gameDevi likes this.
  34. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    I have had a tough time using more than 4 with Unity's standard shader. Even ATS and RTP tend to have perfomance hits with 8. I recommend using Gaia to blend your textures and a color map in Distingo to give you the look of more textures.
     
    AdamGoodrich, jonfinlay and NemoKrad like this.
  35. gameDevi

    gameDevi

    Joined:
    Oct 14, 2015
    Posts:
    155
    Thanks for trying.

    do you think if using the first 4 textures from splat then an additional 3 from vertex colors would help on performance? would it use an extra pass? I know nothing about how passes work or anything about shaders.

    and how do we know what uses an extra pass? is there any useful info on this subject?
     
  36. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    An additional (each one in fact) shader "pass" is effectively re rendering the terrain again, so sending the whole terrain again through the graphics pipeline but to be rendered over the top of the previous pass with another shader. So with each pass you are redrawing your terrain, so the bigger the terrain the more costly this will be.

    I have actually got an idea to be able to use lots and lots of textures in a single pass :) I am yet to put a proof of concept together, but in my head it works lol And NO, it wont be put into Distingo lol
     
    AdamGoodrich likes this.
  37. gameDevi

    gameDevi

    Joined:
    Oct 14, 2015
    Posts:
    155
    yeah I know about the extra work and the hit on performance but I don't know the rules of what you can do to stay within a pass.

    anyhow if you do end up making this as a separate asset I would be happy to purchase it. Actually I would prefer it to be separate. :)

    Thanks for your time and this fantastic shader..
     
    Teila and NemoKrad like this.
  38. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    In a a shader you have a number of limitations, some based on the shader model you target, others in just the physical number of texture registers (number of textures you can pass to the shader). The Shader model will also limit the number of arithmetic (calculations) slots you can do too
     
  39. Quique-Martinez

    Quique-Martinez

    Joined:
    Oct 1, 2013
    Posts:
    141
    I have spent a while with Distingo and Gaia, but couldn't get a satifactory result. It would be nice if there were a short tutorial on youtube or similar.
     
  40. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    That's a shame that you are having issues with Distingo and Gaia, a video tutorial on how to use Distingo is on my to do list though :D
     
  41. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Had an idea for a elevation map for your terrains, would anyone be interested in something like this? If there is enough interest ill create a new thread just for this asset :)



    [EDIT]
    Distingo IS NOT being used in this screen shot lol
    [/EDIT]
     
    TheSeawolf and hakankaraduman like this.
  42. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    I am guessing you mean exporting an elevation map from an existing terrain? If so that would be great, maybe an ability to export a shoreline map with single line or colors for land/sea for those of us making sea based games.
     
  43. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    No, this is a real time running map showing the terrain elevation and your direction of facing in relation to it. If you have Gaia you can already export shorelines I think, @AdamGoodrich ?

    I guess though I could add the ability to save the elevation map to file too :) Or give functionality where you can pass it the height map and it will generate the elevation map from that. Good idea :)
     
    Teila likes this.
  44. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    Does it work on mobile devices?
     
  45. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Does what work on mobile? Distingo? I have not tried it, it is Shader Model 4, so maybe not.
     
  46. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    LOVE this idea!!!!
     
    NemoKrad likes this.
  47. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    this is the Distingo thread, what else do you think could i be talking about other than Distingo?
     
    NemoKrad likes this.
  48. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    lol, we just started talking about an elevation map, so it could have been related to that.

    Ill create anew thread for the Elevation Map asset, to save confusion (mine)
     
  49. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I have created a new thread for the mapping asset so please add to that rather than the Distingo Thread :)

    You can find it here.
     
  50. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,777
    Yep Gaia creates terrains, textures, plants and populates them. You can also export them as meshes, normal maps, texture splatmaps, and as of the patch release (due today hopefully), grass splatmaps as well.
     
    NemoKrad likes this.