Search Unity

DIGGER - Caves & overhangs for Unity terrains

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

  1. Adrad

    Adrad

    Joined:
    Mar 4, 2015
    Posts:
    11
    It does trenches really good too. That is actually how I have been doing my caves is dig down and set up my ground of the cave first. Then decide how I am doing the overhangs and outside of the cave from there. I hope that makes since. I have been up looking at code for too long today . So I apologize lol.
     
    Willbkool_FPCS and Amandin-E like this.
  2. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
  3. Cecrit

    Cecrit

    Joined:
    May 18, 2015
    Posts:
    18
    First of all, awesome Asset! I don't have a use case yet but decided to play around with the system. I created a simple terrain using Gaia and proceeded to just dig and add with the max size and opacity. While doing so I noticed that in some cases the generated voxels generate "holes" which are unpleasant. Trying to dig around them does not make them go away. I tried reproducing that bug with a flat terrain without success, but with a generated terrain it tends to happen sometimes.

    EDIT: Forgot to mention that I'm using Unity 2018.3.2f1

     
  4. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Thanks for this feedback. Looks like a bug. Could you tell me more how to reproduce this issue? Or maybe could you send me zip of your project (exporting won’t be enough because internal Digger data is ignored by Unity)
     
  5. Cecrit

    Cecrit

    Joined:
    May 18, 2015
    Posts:
    18
    I sent you a PM with steps of how I reproduced the issue and a test project.
     
  6. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    I’ll check this out thanks!
     
    GamePowerNetwork likes this.
  7. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    The “hole” error is fixed. I’m going to release a small update with new “high mesh resolution” feature and this fix + a few optimizations.
     
    hoodoo, Mark_01 and Adrad like this.
  8. Cecrit

    Cecrit

    Joined:
    May 18, 2015
    Posts:
    18
    Awesome to hear, I can wait for the update! :)
     
  9. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Digger 1.1 is pending for review ;)

    BTW, I uploaded a new video which I hope shows better what Digger can do. Let me know what you think!
     
    Adrad and hoodoo like this.
  10. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    154
    Thanks @Amandin-E - I haven’t had time yet to try out Digger, but I will make sure to dive into it with this new update. After that I promise to write a review for Digger. Thanks for the new video, it’s much appreciated!
     
    Mark_01 and Amandin-E like this.
  11. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    396
    why doesnt this work in runtime?
     
  12. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    It may in a future version, however I want to focus on edit time for this asset as I already have another voxel engine - UltimateTerrains - for real time stuff.
     
    Mark_01 likes this.
  13. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    396
    but i'll be usefull for those want to use it in runtime with unity terrains. like me :)
     
  14. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    634
    Please keep on track @Amandin-E feature creep is not good and you do have a whole system for run time.

    Plus he has to get out every bug before even trying, and even then it could break much easier with new Unity
    versions. Just saying imho
     
  15. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    I agree
     
  16. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Digger 1.1 is available, but there is an issue that will prevent your game from building (because of Editor script use). I'm going to fix this right now and send an update ASAP. Sorry for the inconvenience.
     
    Mark_01 likes this.
  17. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Digger 1.2 is pending for review. It just fixes the build issue of Digger 1.1
     
    Willbkool_FPCS likes this.
  18. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    Good, I switched to 2018.3 just to try Digger. So far, so good..
     
  19. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Thanks! I hope the upgrade of unity wasn’t painful!
     
    Willbkool_FPCS likes this.
  20. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    Is it possible or planned to change the brush shape or have a few options to choose from?
     
    Willbkool_FPCS likes this.
  21. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    It is planed, but to be honest I’m not sure what I should add as brush. Would you like to see something cubical? What else? I may not be able to create all shapes because it has to be done programmatically, but please share your ideas!
     
  22. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    How about a sphere but the bottom half of the sphere is squashed / flatter, making it easier to create a cave floor.
    sphere.jpg
     
    Amandin-E, hoodoo and Mark_01 like this.
  23. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Good idea! Thanks!
    And what about smooth and sharpen “brushes”?
     
    camta005 and Mark_01 like this.
  24. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I wonder if you could decide where you want your caves before using digger, and then make an indent or slight rise before you use your erosion filters. Might work. I use World Creator Standalone and curious to see if I could make the erosion look natural. The other point....most caves are in karst areas where erosion is not so pronounced.

    Karst_Solution_Features.jpg

    Any reason to show a geology picture. :)
     
    Amandin-E likes this.
  25. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    634
    Smooth and sharpen would be great too :) Could it be set up like other apps ,where if you use sharpen then hit shift and it changes to the smooth brush . ?
     
    Amandin-E and hoodoo like this.
  26. Cecrit

    Cecrit

    Joined:
    May 18, 2015
    Posts:
    18
    Hey, so I tried the new version and had no problems with the holes! But I found another problem (in the same project I sent you regarding the holes). For some reason I'm not able to dig straight down on top of the cliffs if the resolution is set higher than 1x. A level lower it works like a charm. Due to that digging problem the seams around the voxel mesh are not lining up with the terrain hole (I this is because they expect the hole to be deeper and the sides to steeper than they actually are)

    I recorded a quick video (using the same project as before) to showcase this new bug:


    Sorry for digging out the bugs :D
     
  27. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Looks like a good idea!

    Sure!

    Thanks for reporting it. I see what the problem is. I'll let you know when it's fixed!
     
    hoodoo and Mark_01 like this.
  28. SonGoku10c

    SonGoku10c

    Joined:
    Dec 9, 2017
    Posts:
    77
    a cone shape would be good, which you can flip. So we can create stalagmites and stalagtites.
     
    Amandin-E and hoodoo like this.
  29. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    I vote for cubes, and a way to select the depth that the brush takes away.

    I'm also having trouble with holes in the terrain, even after updating to the latest version of Digger. They're not really holes, as the terrain mesh is still there and can be driven or walked on, but holes in the textures.



    This doesn't always happen but it does do this most of the time. I tried the demo scene and everything works great in that. I'm using Landscape Builder to make my terrains, but they are standard Unity terrains, as I can still use Unity's terrain tools on them

    Also there is a glitch in the collision mesh, where it is sticking almost straight up. If I drive on the terrain that Digger has made it knocks my vehicle over or only pushes it away if going slow enough. You can see the nearly vertical tire tracks in the picture below.

     
  30. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Could you send me a package containing your scene (with the terrain) please?
    Also, could you send a screenshot with all these settings:
    terrainsettings.png

    I will release an update with bug fix ASAP.
     
    Mark_01 and Willbkool_FPCS like this.
  31. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    @Willbkool_FPCS I'm pretty sure I found the issue. It happens when the control map resolution of you terrain is low compared to the size of the terrain. I'm fixing this.
     
    Willbkool_FPCS likes this.
  32. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    I'm not at home this weekend so it will be tomorrow night at the earliest.

    I'm using a 4097 heightmap for a 4x4 km terrain.
     
  33. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    No worries, I can wait a few days :D
    Yeah, that's the heightmap but the controlmap is something different. Heightmap controls elevation, controlmap controls textures.
     
    Willbkool_FPCS likes this.
  34. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Purchased -

    My wishlist for digger:
    • Path tracing - Create a start/end (possibly curve?) and have it cut (or fill) using the current brush along the patch. (easy overhangs and caves)
    • Volumes - Attach a cutter script to any convex mesh (cube, sphere, etc). Scale, rotate, resize, etc to whatever you want. and have it cut (or fill) everything located inside. (use it to make easy dungeons).
     
    angrypenguin and Amandin-E like this.
  35. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Good ideas, but not as simple as it might look. I add it on the roadmap however.
     
  36. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Hey guys, just to let you know Digger 1.3 will be uploaded in a few days, probably next week.
    It will fix several issues (including those mentioned in this forum thread) and add a few more brushes (cube, half sphere and cone), as well as a « depth » parameter to control the position of the brush relatively to the terrain surface.
     
  37. DandyUnicorns

    DandyUnicorns

    Joined:
    Nov 21, 2016
    Posts:
    4
    Looking forward to the 1.3 update!

    I'm currently working on a WebGL project -- unfortunately the Digger terrain part shows shows up white instead of the painted layers. Any chance that can be tweaked to show up as intended?
     
  38. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    I will definitely test this. Might be a shader issue, even if I don’t see why the issue happens in WebGL only. Are you using default shader or CTS?
     
  39. DandyUnicorns

    DandyUnicorns

    Joined:
    Nov 21, 2016
    Posts:
    4
    Using the default shader. Screenshot below shows how it looks in WebGL
    Screen Shot 2019-02-11 at 00.57.29.png

    When switching the project to WebGL, using Digger causes this error message:
    Screen Shot 2019-02-11 at 00.45.14.png

    After that digging / adding is possible, but only shows up as a white material. Clearing / Sync & Refresh is possible, but is then followed by:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Digger.DiggerSystem.GetOrCreateChunk (Digger.Vector3i position, Digger.Chunk& chunk) (at Assets/Digger/Sources/Digger/DiggerSystem.cs:479)
    ... each time the 'brush' is used. It's possible to use the brush again (once) by removing Digger components in the scene and removing the DiggerData folder.

    Hope that helps :)
     
  40. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Oh I see! Texture Arrays are not supported by WebGL. I forgot that.
    The only thing I could do is to provide a shader that doesn’t use texture arrays, but there will be less than 8 textures on it (which is the limit of the current shader).
     
  41. DandyUnicorns

    DandyUnicorns

    Joined:
    Nov 21, 2016
    Posts:
    4
    That would still be great - what would be the maximum limit without using Texture Arrays?
     
  42. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    I don't know yet I have to test. However, as per this documentation, texture arrays should work with WebGL 2.0. Do you really need WebGL 1.0 (it supported by more browsers of course, but this will probably change in the future...)
     
  43. DandyUnicorns

    DandyUnicorns

    Joined:
    Nov 21, 2016
    Posts:
    4
    Yeah I read that too and then tested this, but the result is the same when forcing WebGL 2.0 (i.e. I deactivated AutoGraphics API and built for WebGL 2.0 only). WebGL 2.0 support would be fine -- it just did not seem to do the trick.
     
  44. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Ok, looks like the doc is not accurate. I will test it and provide a fallback shader if needed.
     
  45. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    @DandyUnicorns I updated Digger to make it compatible with WebGL. The fallback shader should be able to handle up to 6 different textures. Would you like to test it as a beta? If so, send me a PM with your email address and your invoice number (starting with IN).
     
  46. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Willbkool_FPCS likes this.
  47. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    No sir, just downloaded the update this morning, haven't had time to check it out. When I get home from work tonight, I will try it out..
     
  48. Cecrit

    Cecrit

    Joined:
    May 18, 2015
    Posts:
    18
    I just gave it a quick test and it seems to work like a charm now!
     
    Amandin-E likes this.
  49. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    Over the weekend I tried in an existing project and at first it looked like Digger had done nothing. I went into Play mode and tried an FPS character though and fell through the terrain into the hole that Digger had dug. But The terrain still had the original texture over the hole. So last night I created a new project and everything worked out ok. :confused:
     
    Last edited: Feb 21, 2019
  50. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Good to hear! Thanks!

    Did you try to click on "Sync and Refresh” button? It’s true that some updates can break previous work but I thought it was not the case with 1.3 update.