Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] Distingo - Terrain in Detail

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

  1. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Please make it fast enough to be usable in real world scenarios or I'll cry :p
     
    Whippets and NemoKrad like this.
  2. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    That is stunning :D
     
    TheSeawolf likes this.
  3. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Just another shot. Props (mesh) painted with VTP. Terrain Shader is Distingo+VTP.

     
  4. Quique-Martinez

    Quique-Martinez

    Joined:
    Oct 1, 2013
    Posts:
    141
    Hi,
    I have observed that the shader behaves very differently depending on the near camera plane settings. Is this normal? Is there a manner to control it? By the way, I have seen that this parameters affects a lot antialiasing filters.

    upload_2016-3-9_16-47-15.png
    upload_2016-3-9_16-47-25.png
    upload_2016-3-9_16-47-37.png
    upload_2016-3-9_16-48-1.png
     
  5. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yes it is altering the depth perception of the shader I think. Not sure how I can guard against that, but I will look into it.
     
  6. Quique-Martinez

    Quique-Martinez

    Joined:
    Oct 1, 2013
    Posts:
    141
    Actually I found if usefult as a parameter it it were independent of the camera near plane.
     
  7. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Thanks that's sorted it, no more errors and sorry about that. I started a new project and forgot, did it first time around!
     
    NemoKrad likes this.
  8. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    382
    will later versions of Distingo support muli-terrain scenarios?
     
  9. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Does it not now? Sure I ran it on more than one terrain
     
  10. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    382
    After stitching my terrains together using https://www.assetstore.unity3d.com/en/#!/content/42671 it seems to not allow for each terrain to change the settings for Distingo
    I had to use the earlier posted version that someone else added and they worked.
     
  11. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    OK, I have never used that tool. So does it just alter the two terrains so that when placed next to each other their vertex heights match, effectively leaving you with still, two terrains?

    If that is the case, then all you have to do is add a Distingo script to the other terrain object, or are you asking that a single Distingo script controls ALL the terrain objects in a single game object?
     
  12. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Again some progress on the VTP Integration.

    Without Dinstingo+VTP:


    With Distingo+VTP:
     
  13. impactit

    impactit

    Joined:
    Jan 28, 2015
    Posts:
    41
    After use Distingo on any compuer / project (I check on 2 compuers and like 5 project ) and I have always thesame errors.

    1. Shader error in 'Nature/Terrain/Distingo Standard': maximum ps_4_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 _TERRAIN_NORMAL_MAP
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_TEXTURE_ALPHASPLIT_ALLOWED

    2. after change on terrians options (cog) my inspector is stretched look on screen.



    Any ideas ?
     
  14. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    1. Is the Lightmap static off as described in the docs and the UI tool tips?
    2. There is a fix to this in post in post no 500, it will also be in the next update.
     
  15. impactit

    impactit

    Joined:
    Jan 28, 2015
    Posts:
    41
    a. 1. YES :)
    b. 2. Ok :)

    Andrzej
     
  16. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Are you using the Occlusion channels per texture channel? If not switch to the Global Blend option. If you are then something in your scene must be making Unity take up another texture register.

    I am starting to think that I will take the occlusion shader out as it seems to be causing more issue than it is solving peoples problems.
     
  17. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Today I did an overview vid of Distingo, it will be going up on the asset store with the next update.
     
  18. InfiniteDice

    InfiniteDice

    Joined:
    Jun 30, 2015
    Posts:
    44
    One problem I have is the content in the right rail... the component explodes width wise... so I need to scroll way over to see things in the inspector.
     
  19. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    look up to post #564, it will direct you to post #500 where you can find the fix for that :)

    It will be in the next update too :)
     
  20. InfiniteDice

    InfiniteDice

    Joined:
    Jun 30, 2015
    Posts:
    44
    Kudos!
     
    NemoKrad likes this.
  21. TheSeawolf

    TheSeawolf

    Joined:
    Apr 10, 2015
    Posts:
    267
    @NemoKrad , Shameless self promotion .......you should be proud of yourself :) The choice of the English accent was also a good touch :)

    I have spent the week in the field, so this was a pleasant surprise, and a good refresher moving forward with the new features.
     
    NemoKrad likes this.
  22. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Any chance to increase the Splatting Distance to around 8000, find that value is the minimum required if doing a flighsim so not to have the terrain switching to standard shader to soon.
     
  23. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Ill do that now, Ill set it to 10K just for good measure :)
     
    John-G likes this.
  24. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I have just updated my documentation ready for the 1.2 Update, if you want a sneak peek, then you can grab a copy either off the front page, or from here.
     
    PitHeimes and John-G like this.
  25. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Cant wait for the VTP section in 1.3. :)
     
  26. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    It will be in the 1.2 update :p
     
  27. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Uhhh, have to hurry then :D

     
  28. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    VTP UI almost there...


    :D
     
    TheSeawolf, TeagansDad and PitHeimes like this.
  29. daschatten

    daschatten

    Joined:
    Jul 16, 2015
    Posts:
    208
    Far UV Multiplier does not work in scene view but it does work in game view. I checked this in two projects and in unity 5.3.3p1 and 5.3.3p3. I remember that it has worked in scene view the first time i tried it. Any ideas?
     
  30. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    No, nothing has changed regarding that mechanic since first drop....
     
  31. abhuva

    abhuva

    Joined:
    Dec 23, 2011
    Posts:
    76
    I have a question about the use of the blend-map / color-map:
    my understanding is that it is supposed to just blend another map on top of the whole terrain, and the slider determines how much it influences / blends the colors. If i turn the slider down with a blend-map applied, the terrain turns to black, where i was expecting that the blend have no influence instead. If i turn the slider up, after a certain point it appears as if the brightness just gets up, where i am expecting the blend-map to just overtake completely instead.
    Am i understanding this mechanic wrong? How exactly does the blend work?

    Edit:
    In the docs it states:
    Color = Color + (BlendColor * BlendColor.Alpha * BlendPower

    wich in my understanding should work exactly like i was thinking - if i set the the blendpower to zero it should not alter the color at all. Not sure why its turning my terrain black instead...
     
    Last edited: Mar 11, 2016
  32. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    0 x XYZ = 0

    Might be why?
     
  33. abhuva

    abhuva

    Joined:
    Dec 23, 2011
    Posts:
    76
    Might be, but if i understand the formula "Color = Color + (BlendColor * BlendColor.Alpha * BlendPower) " in a correct way then if the blendpower is 0, it should be Color = Color + (0) --> therefor not influencing the color at all. That would be the way i think the feature should work. After all it should be another way to give more variations to the colors, and be able to control the amount of influence.
     
  34. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    I agree with the logic, just saying, sometimes with shaders when you multipy into 0 the result is just black. Depends on whats going on in the shader. Might be an oversight on the developers part. I don't know. I haven't tried that part of this asset yet hehe.
     
  35. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yes, I think I have miss represented that in the doc, the actual calc is this:-

    Color = lerp(Color, Color * BlendColor * BlendPower, BlendColor.Alpha);

    I will update the document accordingly.

    [EDIT]
    Would you prefer the blend power to control the lerp?
    [/EDIT]
     
  36. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402

    That would actually make more sense wouldn't it? The lerp alpha would control the visibility of B over A. So if you drop the alpha of the lerp to 0 then it will infact still render A but not B at all... assuming I am remembering LERP properly.
     
  37. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    yea, I think I did it that way as in meta it was suggested that the alpha be used to affect the blend, or at least that is how I interpreted the request ;)

    Ill move the lerp control to the slider, so it will look like this:

    Color = lerp(Color, Color * BlendColor * BlendColor.Alpha, BlendPower);

    Or would this be better

    Color = lerp(Color, BlendColor * BlesnColor.Alpha,BlendPower);

    Or just drop the alpha as a blend key all together, that may be more sensible...

    I guess the later would be more natural, ill have a play and see.
     
  38. abhuva

    abhuva

    Joined:
    Dec 23, 2011
    Posts:
    76
    Yes, so the formula would then be Color = lerp(Color, Color * BlendColor * BlendColor.Alpha, BlendPower);
    wich would make more sense to me, and allow better control (i can control the blend-texture on a texture level with the alpha, and on an overall level with the blendpower)

    edit: not sure about the color*blendcolor*alpha part...
    i wouldnt drop the alpha part, as this allows to mask out areas in the blend-texture wich might be handy
    edit2:
    slightly leaning towards the : lerp(color, blendcolor*alpha, blendpower) solution. But without testing wich works better its hard to say for me =)
     
  39. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    OK cool,

    I really must go to bed, I have been heading to bed for the past hour at least now... lol
     
    wolfen231 likes this.
  40. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    309
    Has anyone tested this with mobile?
    regards
     
  41. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Someone here said they ran it on Android, but I have never ran it on mobile.
     
  42. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Have you edited the editor file as I described in #500? Make sure you have not removed the set dirty method as that is what tells the editor to update the Scene view.
     
  43. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    I'm waiting on this as well, before I buy it. Sadly, I had no full luck if it works or not. I would love to know as well. Thanks.!
     
  44. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    309
    I need to know if its going to work before I buy it.

    If you have time, can you please do an android demo with this plugin in use. So we can test it and see its performance.
     
  45. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I don't have android, or ios devices, just a Win10 laptop I am afraid.
     
  46. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    OK,

    new blend calc looks like this:

    Color = lerp(Color, Color * BlendColor, BlendColor.Alpha * BlendPower);

    [EDIT]
    Online documentation updated.
    [/EDIT]
     
    Last edited: Mar 13, 2016
    wolfen231 likes this.
  47. abhuva

    abhuva

    Joined:
    Dec 23, 2011
    Posts:
    76
    Thats the same calc i ended up with while messing with your shaders =)
    The whole section should look like this now, right?:
    if(doGlobalBelnd )
    {
    float4 c = tex2D(GlobalBlend,IN.texcoord);
    sc = lerp(sc, sc*c, c.a*BlendPower);
    }

    One suggestion still: as the lerp only uses a float between 0..1 for the amount of blend, i ended up changing the editor scripts too, so the slider value for the blendpower is between 0 and 1.

    This way, the blend works perfect.

    Looking forward to the next update, so i dont have to use my own version. Thanks!
     
  48. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yep, exactly that, and I capped the editor the same too ;)
     
    wolfen231 likes this.
  49. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Hey guys,

    again some update about the Distingo and VTP collaboration. We are quite happy about the progress so far, UI is integrated in Distingo and the Heighbased Blending and PBS is fully working. Just some more work left to do on the Parallax. Sometimes blending is a bit off at the moment, but we are confident to have that fixed until the release. Thanks of course to Adam for his genius Gaia Asset. Support for Gaia will of course be also integrated :)

    Lastly, two screenshots for comparison :) Feedback is - as always - highly appreciated.



     
  50. TheSeawolf

    TheSeawolf

    Joined:
    Apr 10, 2015
    Posts:
    267
    Yeah it's okay I guess. It depends if you like that sort of realism in a 3D environment ;) What I really like is that I now am going to have to shelve out more money, this is fantastic!