Search Unity

[Released] Distingo - Terrain in Detail

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

  1. Mixality_KrankyBoy

    Mixality_KrankyBoy

    Joined:
    Mar 27, 2009
    Posts:
    737
    OK - running with distingo is very slow. I am getting terrible performance. See my profiler output:
    Image1.png



    Any ideas? I mean look at those calls!!

    Unity 5.3.5f1 , Distingo 1.4 (latest).
     
  2. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    That bit of code only runs in the editor when looking for other assets that Distingo is associated with.

    I'll put a switch in so that this can be turned off.

    It will be in the next update, I am on holiday next week for two weeks, so may be a while if I cant get it done this week.
     
    Martin_H likes this.
  3. TheEndersWAR

    TheEndersWAR

    Joined:
    Jan 8, 2015
    Posts:
    58
    Has there been any success with Parallax shading for terrains?
     
  4. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I had it in Distingo before I released the first version, but the number of calculation it added gave little benefit (was probably my technique) The guys at VTP were putting this in their patch, but I have not heard from them in a long time, so not sure that is going to surface now.... I may look at this again along with height blending in Distingo.
     
  5. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    That's disappointing if the VTP integration has fallen off. Height blending in Distingo would definitely be a plus. There are a couple other assets I can think of that do this for terrain, but they aren't as intuitive as Distingo.
     
  6. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    Hey NemoKrad
    I'm using your distingo and it's soooooo easy to use. Thanks!!!!

    By the way...
    Do you have an ETA for 8 & 16 terrain textures support?

    Best regards.
     
    NemoKrad likes this.
  7. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Hi, forgive my late reply I am on Holiday at the moment.

    So glad you are enjoying the asset and finding it useful. Textures > 4 can be used now, just that as described in the documentation I don't know when the Unity Terrain Engine is making the additive call so can't then go beyond full channel support > 4 textures. If I ever figure out how to do this then this will be one of the first things I will do.
     
    Martin_H likes this.
  8. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    For Gaia and World Creator users that use Distingo, it looks like I have introduced a n issue where that is interfering with the editor, this will be resolved as soon as I get onto my development laptop and remove the offending code.

    I plan to have the editor always display the Gaia and WC buy buttons, the detection scripts i have also result in in-editor lag too. Another change I intend to add to the next update will be to have an option to switch off the in editor update's this will stop changes going direct to the shader, it only does this in Editor mode anyway to show your changes as you make them, but this cal lead to users thinking that Distingo is lagging, when it's not as on build this call each frame will not be made, so I will add a check box which will default to on but you can switch it off to see how it runs without the constant update call.
     
  9. rgrlee71

    rgrlee71

    Joined:
    Sep 11, 2012
    Posts:
    37
    Does anyone have a clue why Distingo is not working in the Oculus Rift build environment?

    It works perfectly fine in the editor, but when I go to build the exe, the terrain doesn't show any changes.

    Windows build, DX11 (32 or 64 bit)
    Forward Rendering / Gamma Space

    My computer specs:

    Intel i7 6700k ( not overclocked )
    16 GB RAM
    GEFORCE GTX 1070

    Any clues would be appreciated.
     
  10. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I don't have any vr kit so cant test, but could it be that you are not including the shaders in the build as described in the docs?
     
  11. rgrlee71

    rgrlee71

    Joined:
    Sep 11, 2012
    Posts:
    37
    Thanks for the quick reply.

    Which docs are you referring to? I'm using the built in OVR camera supplied by Unity. I wasn't aware that there were additional requirements for 3rd party shaders in VR. I'll need to do more research.
     
  12. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Its any shaders not directly associated with a material. Its not specific to vr.

    When you set up your build switch on developer build and you will see any exceptions thrown.
     
  13. FallingBarOfSoap

    FallingBarOfSoap

    Joined:
    Mar 16, 2013
    Posts:
    3
    Does Distingo feature height or alpha blending for texture layers? If not then is it planned to be added.
    I also agree that parallax will be a great addition to this already impressive plugin.
     
  14. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    As regard height blending, no, another asset VTP was to take this up as a plug in, but I don't think this is going to happen now as they seem to have gone very quiet. I may well look at adding this to Distingo in the future.

    As to Parallax, yes, as mentioned before i did put it in at the start but removed it as I didn't think it added much, could well have been my implementation that was at fault though, so I took it out, it's something else I could look at adding.
     
  15. rgrlee71

    rgrlee71

    Joined:
    Sep 11, 2012
    Posts:
    37

    I just moved the Distingo folder into the "Assets/Resources" folder and now it includes your shaders in the build.

    Thanks for the help!!
     
    Martin_H and NemoKrad like this.
  16. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    I'm using 4 and more terrains in scene. When I add Distingo to one of them, material Nature/Terrain/Distingo Standard adding to other: www.youtube.com/watch?v=az6DygHXGqY

    Cannot manage it in predictable manner :( What is best workflow for tiled terrain? My scene is expected to 8 terrain tiles mixed with 4 or more terrain meshes.

    P.S. Thank you for Distingo and hope to solve this small difficulties soon.
     
  17. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Hi, thanks for the video it helps me see what the issue is, hard one to describe.

    I think a few people have raised this as an issue with Distingo, and I am looking to create a solution for it, at the moment it works on the currently active terrain, so when you have multiple terrains this can get confusing for it.

    A possible work around in the mean time would be to create materials that use the Distingo shaders and apply those directly to your individual terrain tiles.

    Sorry you are having this issue, and I hope to have a solution soon.
     
  18. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    Thanks for quick response!

    >A possible work around in the mean time would be to create materials that use the Distingo shaders and apply those directly to your individual terrain tiles.

    Yes, it really works! I made test of 9 tiles with size 500x500 by every tile and base map is well-viewed in any direction.

    My lunar landscape is a little bigger. When I resized tiles to 4000x4000 by every tile, base map is disappearing closer than 10000 units (pixel error effects this). I believe this video will help to see the situation:
     
  19. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    As I say, create a material per terrain rather than using the Distingo script. Hoping to get a solution to this soon.
     
  20. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    It's not a material issue, but basemap distance issue. Distingo's distance do not affects to terrain tiles but pixel error affects instead (don't know why).
     
  21. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    With Distingo you can set the basemap distance, but not pixel, so this could be why that's occurring. As I said before, it's working on the active terrain, not necessarily the one it's attached to, I am looking to fix this in the next update :)
     
    akareactor likes this.
  22. Sluta

    Sluta

    Joined:
    Aug 15, 2016
    Posts:
    42
    Hello.

    Is distingo works with Terrain Composer 2?
     
  23. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Alas, I don't know I have never tried it. I imagine someone here may have though.
     
  24. srogers144

    srogers144

    Joined:
    Sep 1, 2016
    Posts:
    6
    Hey!

    So I am having some troubles with Distingo and Gaia.
    I setup the beginnings of a terrain, and imported Distingo, both up to date, and Distingo isn't effecting the Gaia terrain at all aside from the Metallic slider and the Smoothness slider.

    In case compatability with other assets could be an issue, I also have Aquas and UniStorm imported in just not in the scene.

    Any idea on how to rectify?
     
  25. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Are you getting any error messages in the console?

    Sounds like it is running, just not updating the scene, does it do this if you alter the settings while the game is playing in the editor?
     
  26. srogers144

    srogers144

    Joined:
    Sep 1, 2016
    Posts:
    6
    When I imported it it did give me a message that there were Obsolete APIs, but aside from that no everything seems fine and no errors in the console. I imported without converting the scripts though.

    And yes, it does it while the game is playing and while it isn't. I can try and get a video recorded of the issue shortly if you like?

    Thanks for the quick reply as well!
     
  27. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    No worries, shame you are having issues.

    Create a project, with just Gaia and Distingo, see how that goes, then introduce assets as you go, might need a bit of elimination...
     
    Martin_H likes this.
  28. srogers144

    srogers144

    Joined:
    Sep 1, 2016
    Posts:
    6
    It worked that way, I'm guessing it was an issue with the order that I imported assets and such. Thanks much!
    Great asset by the way!
     
    NemoKrad and Martin_H like this.
  29. srogers144

    srogers144

    Joined:
    Sep 1, 2016
    Posts:
    6
    And I think I found the asset issue, when I import Shader Forge is when it stops working. Will see if I cant find a fix.
     
  30. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    For what it's worth I have shaderforge too and so far it didn't break anything.
     
    srogers144 and NemoKrad like this.
  31. h4ndi

    h4ndi

    Joined:
    Sep 18, 2013
    Posts:
    3
    hiya just purchased,
    i'm diggin the feature set. currently using distingo with world creator 2.2.

    I'm currently getting the error below whenever I try to access the fifth texture's properties...

    Does distingo only support the first four?

    IndexOutOfRangeException: Array index is out of range.
    RandomchaosLtd.Distingo.DistingoTerrainShaderEditor.OnInspectorGUI () (at Assets/Distingo/Editor/DistingoTerrainShaderEditor.cs:270)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1235)
    UnityEditor.DockArea:OnGUI()
     
  32. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    As far as I know: yes. (edit: seems I was wrong)
     
    Last edited: Sep 29, 2016
  33. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    It should not error beyond 4 textures, I have had this reported before, and asked for a repo project to be sent, but didn't hear back from the user.

    The documentation describes what it tried to do with > 4 textures, the issue is that the Unity3D terrain engine does not tell me when it is doing > 4 textures so it's difficult to manage, so Distingo just does the best it can with texture counts > 4.

    Create a repo project (as simple as you like as long as it shows the issue) and I will take a look and see if I can spot what is up, mail it to the address in the documentation :)
     
    Martin_H likes this.
  34. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Well, you are not really wrong, it will do it's best with textures > 4, you may not get the results you want for the textures > 4
     
    Martin_H likes this.
  35. browne11

    browne11

    Joined:
    Apr 30, 2015
    Posts:
    138
    Having the same issue as above with texture counts > 4. I don't think this is going to be very useful when limiting it to 4 texture counts. I have like 30 textures!

    A simple demo project recreates the issue in minutes.

    I set this to a higher number like 30 and it seems to work in the distingoterrainscript:
    public Material[] ChannelMaterials = new Material[4]; // Max of 4
     
    Last edited: Sep 29, 2016
  36. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    The online docs describe how it works with >4 textures.

    How ever, you should not be getting this exception, I am looking into it and hope to get an update to the asset store submission over the weekend.
     
  37. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Hi, I asked this awhile back and wanted to see if there is any news yet, if anyone has got this working for Android yet???

    Also will this work with TC2 and Multi Tile terrains?


    Thanks.
     
  38. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Wow... just.... WOW :eek:

    Without:
    withoutDistingo.PNG
    With:
    withDistingo.PNG
    Now, how can I add the shaders to the included shaders easily?
     
    NemoKrad likes this.
  39. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    You could try to just drag n drop the Distingo folder onto that list of always included shaders and see if that works.

    Phew! ^^
     
  40. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    Can this significantly increase performance when using the Unity terrains? I have heard that the Unity terrain shader is not well optimized. I need something for VR (which has mobile requirements except Direct X 11).

    Thanks in advance! Looks neat.
     
  41. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    My shaders run at about the same, some have reported better than Unity's, but I can't see how as mine have more going on in them. If you have the time to scan through this thread, someone posted stats on here a while ago.
     
  42. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Great to see Distingo doing so well. Great stuff Charles!! :)
     
    NemoKrad likes this.
  43. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Thanks Adam :D
     
  44. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    429
    Just bought Distingo and imported into a Gaia project but I'm getting 3 errors in the console, right after import:
    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'
    Sorry couldn't see anyone else with this problem in the forums. I'm on Unity 5.3.4, latest Gaia (bought it after seeing your demo video, you should get a commission :)

    Am I doing something stupid?
     
  45. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    That has been reported to me by another user, I have not been able to re create it. The scripts that are erroring there do not belong to me/Distingo. The user that contacted me got around it by not importing the Demo and Standard assets folders when importing Distingo.

    CreaseShading is an image effect and from those error messages it's part of the Unity Standard Assets Image effects.
     
  46. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    429
    Great, that works.

    So the problem is obviously with incompatibilities between different versions of the Standard Assets. Whatever version I have installed on my machine (which I add to a project using Assets>Import Package> Effects) is different to what you've packaged with your asset package.

    When I install Distingo on top of an existing project I can see that it wants to update a few assets in my Standard Assets folder. Unticking those items (or the entire Standard Assets folder) allows me to import without any errors.

    I realise it's not really your fault but it may be worth a mention somewhere in your docs. Other people, like me, may be coming to Distingo via a Gaia project - as their tutorial walks you through the process of importing these Effects others may run into a similar problem.

    Thanks for the quick response.
     
    NemoKrad likes this.
  47. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I think it has only just started happening since the latest Unity updates, it's never occurred before.
     
  48. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    429
    Sorry, another odd thing...

    So i was following your tutorial on YouTube, changing settings and adding occlusion maps to accentuate the textures and all works fine in the Editor but when I build to PC (I'm running Unity 5.3.4 on Windows) all the ground textures appear black. (plains and mountains are affected, terrain objects like trees and flowers are fine)

    I'm a bit of a newbie so not sure if it's something to do with my render/lighting settings (sorry!) I've got the colour space set to deferred linear. Just a single Directional light (the sun) in my scene, set to Dynamic. Lighting-wise, baking is turned off (no lightmaps).

    Building a copy of the same Project before installing Distingo works fine.

    However, in the project where I installed Distingo even after removing the component from the terrain, the build still appears the same, with textures black.

    Any ideas?
     
    NemoKrad likes this.
  49. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    No worries, this is why the forum is here :)

    If you have not added the shaders to your build, as described in the documentation, Unity does not add them to the build, so you get black terrain.

    Check the documentation for Distingo and you should see the section where it tells you how to set this up.
     
  50. Vedrit

    Vedrit

    Joined:
    Feb 8, 2013
    Posts:
    514
    I was going to ask about Gaia compatibility, but I see this has already been confirmed.
     
    NemoKrad likes this.