Search Unity

DIGGER - Caves & overhangs for Unity terrains

Discussion in 'Assets and Asset Store' started by Amandin-E, Dec 25, 2018.

  1. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    I did not do that. IlI try that tonight or tomorrow.

    Another thing I noticed was the drop in framerate. I literally lost 100 FPS when looking at the Digger made hole. I'm wondering if it's my terrain textures. They are all 8k so that the terrain looks good in first person. It takes Digger a long time to gather the data, so I think I will try with 4k textures.
     
  2. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Indeed 8k textures might be the cause of the frame drop. Please let me know if 4K textures solve the issue. If so, I’ll add an option to downsize textures used by Digger... or I’ll improve the Digger shader. You’re not using CTS btw?
     
  3. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    No, I'm not using CTS. I was using mostly 4k textures and only one 8k, but found out that there were 8k textures available. ;)
     
  4. PrismicStudios

    PrismicStudios

    Joined:
    Oct 31, 2013
    Posts:
    37
    Hi there, I'm noticing after I "Setup Terrains" all vertical walls in my terrain changed their texture. I'm trying to paint them back to the right texture, but I get no results on vertical walls with either the normal terrain paint brush or the Digger paint function. Thanks!

    Also, I notice paint DOES work if I have edited the that part of the terrain with Digger, but to just go through and paint the terrain when it hasn't been edited won't work.

    https://i.imgur.com/BPLWbj7.jpg

    Notice the solid green walls? They are supposed to be the brown rocky texture.
     
  5. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    This is normal that Digger paint brush does not affect the terrain. It only paints Digger meshes which is wanted.

    About your cliffs, it should not have changed the textures! Digger replaces default terrain shader with a triplanar mapping shader so it should actually improve the look of your cliffs but it should not change the texture. And you say you can’t apply texture on cliffs with terrain brush?
     
  6. PrismicStudios

    PrismicStudios

    Joined:
    Oct 31, 2013
    Posts:
    37
    So something strange is happening because I've added a duplicate of the texture to the terrain and it works just fine.

    What I've noticed is that that particular brown rocky texture is painting green! So somewhere in the mix something got crossed up under the hood.

    The moment I clicked "Setup Terrains" The brown changed to green.
    I'm also noticing that the terrain texture still has the brown rocky normal map it's supposed to.

    Also, look at this!
    https://i.imgur.com/6JCfJij.jpg
    I've painted one solid line with the terrain paint brush, and it's correct on flat terrain and incorrect on the wall!

    So something wrong somewhere. :)
     
  7. PrismicStudios

    PrismicStudios

    Joined:
    Oct 31, 2013
    Posts:
    37
    Also, a smoothing brush would make your tool absolutely perfect and complete. It's the only thing that seems to be missing!
     
  8. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    What is the index of the terrain layer of the brown texture?
     
  9. PrismicStudios

    PrismicStudios

    Joined:
    Oct 31, 2013
    Posts:
    37
    I'm guessing it's 3, because it's 0,1,2,3 (forth) on the list.
     
  10. PrismicStudios

    PrismicStudios

    Joined:
    Oct 31, 2013
    Posts:
    37
    Also, is there a way to scale the texture size in the digger? The dug textures are really huge and zoomed in compared to the rest of my textures.
     
  11. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    I think I found the bug. Line 178 and 223 of TerrainSplatmapCuttableTriplanar.cginc. You have to replace cX2 and cZ2 by cX3 and cZ3. Could you try and let me know if it fixes the issue?
     
  12. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Normally, textures should be scaled exactly like they are on the terrain. Is it the case?
     
  13. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    I did that in dev but I have a problem to smooth between chunks. It’s postponed.
     
  14. PrismicStudios

    PrismicStudios

    Joined:
    Oct 31, 2013
    Posts:
    37
    So that instantly fixed the terrain, but now I noticed that the voxel painter is messed up in what might be the same way. Texture 0 and 1 paint fine, but Texture 3 is painting texture 3 on the floor but texture 2 on the walls.
     
  15. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Thanks for the feedback. Yeah probably!
     
  16. PrismicStudios

    PrismicStudios

    Joined:
    Oct 31, 2013
    Posts:
    37
    Where is the code for the digger texture located so i can try replacing the values?
     
  17. PrismicStudios

    PrismicStudios

    Joined:
    Oct 31, 2013
    Posts:
    37
    Specifically texture 3 is being painted with it's top correct but the sides are painted as texture 2.
     
  18. PrismicStudios

    PrismicStudios

    Joined:
    Oct 31, 2013
    Posts:
    37
    Found one, line 142 of meshTriplanar.cginc do the same thing
     
    Amandin-E likes this.
  19. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Yeah that should be it
     
  20. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    So I changed all but one of my textures to 4k and that helped a lot. My framerate dropped only 50 fps instead of 100. But I also noticed that my textures changed to one color kind of like the person above. I had to change the shader several times before the textures looked normal. But things are definitely better than before. :D
     
  21. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Good to know! What changes have you made to the shader?
     
  22. PrismicStudios

    PrismicStudios

    Joined:
    Oct 31, 2013
    Posts:
    37
    I need to know this too, I've still got issues in the generated chunks:

    https://i.imgur.com/rttxJaL.jpg
     
    Willbkool_FPCS likes this.
  23. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Could you send me the scene (including the terrain of course) that has the issue?
     
  24. PrismicStudios

    PrismicStudios

    Joined:
    Oct 31, 2013
    Posts:
    37
    Any particular address you want me to send it to?
     
  25. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    I’m sending you a PM
     
  26. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Hi there!
    Just so you know, Digger 1.4 is available.

    Release note:
    - fixed critical bug where chunks near terrain borders were not reloaded
    - improved setup for CTS 2019
    - added feature to completely remove Digger from the scene
    - small performance improvements
    - fixed shaders triplanar mapping at index 3
    - fixed potential issue where delegates could be added several times
    - added a new shader that doesn't use 2DArrayTexture for compatibility with WebGL
     
    Willbkool_FPCS likes this.
  27. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    Hi i have a few questions,

    it is possible to create a illusion of a flying island ?
    any chance for an exmaple, or a screenshot
     
  28. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,021
    Hi @Amandin-E,

    Thanks for the new updates. Was also wondering if you had thought any more about the 'export to mesh' option?

    Being able to export to a mesh would greatly improve the tools usefulness and also allow users to chose the material for the mesh.

    Thanks
     
  29. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Yes it should be possible, I will send you a screenshot.

    I’ve not been working on this for now. I think this feature will be added but I can’t give an ETA yet.
     
  30. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    @everyone There is a bug in Digger 1.4 that makes meshes look completely black.
    I’m aware of the issue and I’m working on a fix. Sorry for the inconvenience.
     
    GamePowerNetwork likes this.
  31. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    Ok i wait for it :)
     
  32. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Digger 1.5 is available.

    Release note:
    - fix bug where all Digger meshes are rendered completely black
    - fix editor issue where Digger is still digging when the mouse goes outside scene view
    - fix bug when digging on terrain borders
    - improve editor by saving inspector values
    - increase max brush size to 20
    - improve warning messages when terrain layers are missing
     
  33. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    I made this very quickly. Could be improved and look better of course. But it might take time to sculpt big floating islands. Not sure this will be practical if there are many of them in the scene. digger-floating-island-1.png digger-floating-island-2.png
     
  34. Emperor

    Emperor

    Joined:
    Feb 13, 2014
    Posts:
    41
    Considering buying but is there are workaround to change the mesh texture when using CTS? Otherwise I'll have to wait for that update
     
  35. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Unfortunately there is no workaround for now. I’m in touch with CTS developer and it will come sooner or later ;)
     
  36. Alakryon

    Alakryon

    Joined:
    Jan 26, 2013
    Posts:
    13
    Hi, I just bought Digger (v1.5), and try to use it on Unity version 2018.3.9.
    My problem is that after using Digger->Setup Terrains, and wait for it to finish it's work, if I try to do any digging by simply clicking on the terrain (even in the Demo scene provided with the package or in any other scene), the first click seems to work after a few sec, some deforming can be seen on the surface, but if I do another simple click, the whole Unity Editor simply closing in a moment without any error message. What could be the problem?
     
  37. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Sorry for the inconvenience. What is your hardware configuration?
    What OS are you using?
    Could you get a look at the editor log files to see if there is any error inside? https://docs.unity3d.com/Manual/LogFiles.html
     
  38. Alakryon

    Alakryon

    Joined:
    Jan 26, 2013
    Posts:
    13
    Operating System: Windows 10 Enterprise 64-bit (10.0, Build 17134) (17134.rs4_release.180410-1804)
    Config is:
    Motherboard: GA-MA770T-UD3
    Processor: AMD Phenom(tm) II X4 B55 Processor (4 CPUs), ~3.2GHz
    Memory: 16384MB RAM
    DirectX Version: DirectX 12
    Video card: NVIDIA GeForce GTX 1050
    Display Memory: 10167 MB
    Dedicated Memory: 1977 MB
    Shared Memory: 8190 MB

    The content of the Editor.log is: https://pastebin.com/EazK5krz
    The report of DxDiag: https://pastebin.com/jdsCXpJW
    And the content of one of the related Report.wer files (Appcrash_Unity): https://pastebin.com/V1LeiFsE

    Edit 1: Checked with Unity version 2018.3.3f1 too, but it does exactly the same.
    Edit 2: Also if I click on Sync & Refresh, it also closes (crashes) the Unity Editor without any kind of error message. It turned out in the morning today, right now.
    Edit 3: Tried it on a different computer, on a laptop with i7 CPU, 8 GB RAM and an integrated Intel video card with DirectX 11 (in the i7 CPU), on a Windows 8.1 OS, and there it is working fine. Will try to do a clean OS install on the original machine, and check again.
     
    Last edited: Mar 22, 2019
  39. Alakryon

    Alakryon

    Joined:
    Jan 26, 2013
    Posts:
    13
    Did a completely clean OS (Windows 10) install, then Unity (the most recent version) install, installed the needed Burst, Collections and Mathematics packages, imported Digger v 1.5, set up terrains (in the demo scene coming with digger), and still the same issue, after the first click of digging, at the next click it closes the complete Unity Editor without any error message. Maybe it has something to do with the NVIDIA video card or the driver? It worked on the other machine with the integrated Intel video card.
     
  40. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    That’s so weird. I’m wondering... could you disable Burst, restart Unity and try again? You can disable Burst compilation from the Burst menu
     
  41. Alakryon

    Alakryon

    Joined:
    Jan 26, 2013
    Posts:
    13
    Yes, without Burst it is working fine.
    Slower than on the youtube wideo, but working.
     
  42. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    I think you should report a bug to Unity.
    Honestly, Burst is awesome, but it looks still quite unstable to me. Unfortunately there is not much I can do on my side.

    BTW, the "black mesh" issue I was having with Digger 1.4 was due to Burst as well because it does not handle ternary operators properly... They still have a lot of work.
     
  43. Alakryon

    Alakryon

    Joined:
    Jan 26, 2013
    Posts:
    13
    Ok, thanks for the help and point out where the problem lies, the important is that it is working. :)
     
  44. Alakryon

    Alakryon

    Joined:
    Jan 26, 2013
    Posts:
    13
    Now I had a little more time to play around with Digger, and just to let you know I am amazed by this tool, thank you very much for it, it is just doing exactly what I was after for. :)
     
    Amandin-E likes this.
  45. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Thanks for the kind words!
    Don’t hesitate to write a little review on the Asset Store, would be greatly appreciated :)
     
    Alakryon likes this.
  46. Alakryon

    Alakryon

    Joined:
    Jan 26, 2013
    Posts:
    13
    And one more thing. Later I was able to turn "Enable Compilation" on again if I unchecked "Safety Checks" and enabled "Synchronous Compilation". So now it seems to be working fine.
     
  47. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Hum, interesting! That means the safety checks themselves make Unity crash, even though there is no safety issue!
    Thanks for this feedback
     
  48. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I'm really looking forward to this.

    As a partial solution, do you know how your generated meshes would work with the Terrain Blending module?
     
  49. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    The idea is to use MicroSplat directly on the meshes, so, no blending would be necessary. However it is quite complicated to achieve because each mesh generated by Digger (each chunk) would require its own material instance. So this leads to a lot of materials and I'm not sure it will be appropriate in the end. Will see.
     
  50. PaperPrototype

    PaperPrototype

    Joined:
    Jan 3, 2018
    Posts:
    7