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

Official Terrain Tools 3.0.2-preview.3 release is now available!

Discussion in 'World Building' started by wyattt_, Nov 11, 2020.

  1. Deleted User

    Deleted User

    Guest

    I asked in the comment section of the video he said it will be implemented in the engine but I don't know whether it will be available for us to use ... I think it will be available on GitHub later just like auto LOD
     
  2. Gokcan

    Gokcan

    Joined:
    Aug 15, 2013
    Posts:
    289
    @wyattt_
    Hi
    Terrain tools package was going really well. Finally, terrain started to improve after long time. However, although I am waiting for a long time for new tools, I cant see any improvement anymore....

    Is it about new big update is coming???
     
    Deleted User likes this.
  3. Tesrym

    Tesrym

    Joined:
    Dec 2, 2012
    Posts:
    64
    Import heightmaps is nice. I would like splatmaps added to that feature.
    If I got a 4x4 terrain with 4 splatmaps each... It's gonna need a full cup of coffee.
     
    Deleted User likes this.
  4. Tesrym

    Tesrym

    Joined:
    Dec 2, 2012
    Posts:
    64
    Last edited: Nov 28, 2021
  5. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    * Erosion functions are useless, try to do it like bryce3d does.
    * There are options to copy over terrain layers, but there are none to copy over trees and details.
     
    MaxRoetzler likes this.
  6. rwana

    rwana

    Joined:
    May 22, 2018
    Posts:
    4
    Where can i manually download this since preview packages no longer show up in unity 2021?
     
  7. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    You have to enable Pre-release/ Release Candidate content in File > Project Settings> Package manager
     

    Attached Files:

  8. rwana

    rwana

    Joined:
    May 22, 2018
    Posts:
    4
    Yes, i know about that, but that only works in unity 2020 versions. The package manager in the 2021 versions wil not show preview packages. A unity blog post says that you have to manually download and install preview packages if you are using 2021 versions of unity
     
  9. rwana

    rwana

    Joined:
    May 22, 2018
    Posts:
    4
    found a solution
    installed the package with a 2020 ver. found it on disk in the project/library/packagecache folder, and was able to manually install it from disc via the package manager (select the package.json from inside the package folder)
     
  10. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    hrmm I'm not entirely sure where your issue lies in that case.
    i'm glad you found a workaround though.

    For anyone else, the steps are below in 2021.2
    If you don't have this, I recommend reporting a bug for your editor version.
     

    Attached Files:

  11. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594

    this looks like the resolution +1 for the tiling.
    if you're using an external tool to generate the tiled height maps. id ensure you resample the output to the correct resolution.

    unity uses resolution +1

    so 512x512 is 513x513

    tools like World Machine, Houdini, World Creator and GAEA all have this for export
     
  12. Tesrym

    Tesrym

    Joined:
    Dec 2, 2012
    Posts:
    64
    But I am not allowed to.
    upload_2021-9-2_23-22-48.png
     
  13. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594

    Ah I see.

    So it's possible that unity is treating the +1 to add a pixel to the terrain (it should be a cell calculation)

    Are you able to export a height single non-split terrain @16x16units 512resolution (height doesn't matter height just keep it flat.

    And then the same again but tile it 4X4

    You should be able to physically see if the split has in fact added the 1 pixel boarder to the terrain

    And another
     
  14. MaxRoetzler

    MaxRoetzler

    Joined:
    Jan 3, 2010
    Posts:
    136
    Some of the features and possibilities the terrain toolbox brushes enable makes it a very interesting concept! Looking at what other users have implemented shows huge potential for this type of workflow. However, there are many problems with the toolbox and Unity's ancient terrain...

    The biggest issue is the API. Everything is made for the official toolbox brushes, but extending it is difficult and limited. Many useful features are locked inside the 'CommonUI' and are difficult to replicate or extend (like custom brush shortcuts, Undo support, etc.). How, and when the brush tools are enabled / updated seems like a hack (ScriptableSingleton). Undo operations mostly fail when brushing across multiple terrain tiles, or only Undo half of the operation. Saving brush presets is not supported.

    Getting to the main terrain API, the toolbox is merely a bandage put on a severed leg. For example, there is no easy way to change how splatmap values are painted, what parameters are stored in the terrain layer asset, the paint texture brush copying layers between terrains, each terrain tile having it's own settings, normal maps only being used with instancing, instancing not working with SRP batching (broken shadows in LTS). It's no wonder there are hardly any examples of high quality terrains in anything 'Made with Unity'.

    However, looking again at what can be done with the concept, I wish Unity would focus more on writing more extendable code and better API's, rather than implementing erosion brushes that are fairly useless. To make an acceptable terrain-editing workflow, there are so many obstacles you have to overcome...
     
    Waterlane likes this.
  15. Deleted User

    Deleted User

    Guest

    Hello, does unity terrain use jobs system + burst and does the terrain tree paint system use graphics.draw mesh instanced (GPU instancing) because I want to use the terrain system for my huge open world game and after reading many topics about terrain vs mesh I have come to a conclusion that unity terrain uses more memory, batches and 2x slower than a mesh terrain.... So are there any plans to make the terrain performance better?? Unity also lacks terrain streaming which is extremely important for gigantic worlds and still uses the old and slow method of quadtree for terrain LOD.... And also lots of Dev's including me want more texture layers because 8 aren't enough (maybe increase it to atleast 32)and tessellation support for terrain + proper collision and also octahedral imposters instead of normal billboards... Unity showcased concurrent binary trees based terrain which could solve all these performance issues with terrain (but I don't feel unity has any plans to integrate it :()
     
  16. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594

    The shipped version doesn't use jobs/burst,
    the terrain itself does use an instancing batched solution, but it's not instancing indirect.

    there's a lot of third party support from the asset store like, Mega World, nature renderer and like you said GPUI.
    world streamers too, and megasplat to add your 256 odd texture levels. of course these are still all not one size fits all and you would have to still leverage the optimisation passes of your specific project.

    You can however use GPUI along with the unity terrain system, you just need to add the GPUI details and terrain tree managers to your scene(s).

    There's absolutely nothing stopping you use the terrain system and the mesh terrain and turning off the mesh rendering for the terrain though if you still want the freedom to use the terrain system for placement for example.
    You'd still need to see how this would behave in the scope of your project.

    there is also nothing stopping you from using the terrain system and the early stages of your project and switching out in favour of the mesh version later ( with whatever ends up being your streaming solution on top.)

    It [terrain system] is long overdue for an overhaul and that is certainly in the works, DOTs in the general mind is also still very very early in the works too.

    hope that gives you some ideas to work with though
     
    Deleted User likes this.
  17. Flow-Fire-Games

    Flow-Fire-Games

    Joined:
    Jun 11, 2015
    Posts:
    305
    Hey, Is there any update on this?
    We are really struggling with the lack of material compatibility
     
  18. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
  19. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Terrain tools 4.0-pre2 (latest) doesn't support undo operations. :(
     
  20. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    I think it's specific toolsets no? Like yes to painting no to sculpting.
     
  21. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I believe it's everything, nothing has undo functionality for terrain tools. Although the terrain itself which is a separate thing does, so if you raise/sculpt you can undo it. But you can't undo any of the terrain tools parameter changes etc.
     
    HIBIKI_entertainment likes this.
  22. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594

    Good to know. I know it's previously been a little quirky sometimes, so maybe it's just been pulled to revisit.
     
  23. wyattt_

    wyattt_

    Unity Technologies

    Joined:
    May 9, 2018
    Posts:
    424
    heya. could you provide a video/gif? and some steps to reproduce this. and also, if you could, share info for you terrain settings (screenshot of the setting UI would be ideal) so I can see what your texture resolutions are. this definitely sounds like a bug, barring any limitations due to settings you have on the terrain.
     
  24. Deleted User

    Deleted User

    Guest

    @wyattt_ Hello!!
    Screenshot (85)_LI.jpg
    The grass in the area highlighted with red is painted with the terrain paint detail and as u can see the shading looks wierd and they don't recive any shadows and on the left blue highlighted area is just a bunch of same prefabs thrown together and have proper shading and receive shadows... Both use same HDRP lit shader and settings... Is it a bug or am I doing something wrong.. I am using 2021.2 b14
     
    Last edited by a moderator: Oct 14, 2021
  25. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594

    Be sure to add a diffusion profile if you plan on using materials that use translucency or Sub surface scattering
     
  26. Deleted User

    Deleted User

    Guest

    Both use same material as they are the same prefabs and have foliage diffusion profile assigned
     
  27. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    Hrmm interesting. The new SRP details isn't fully documented at this stage, so it's hard to discern exactly what it is.

    Are you using the new new SRP details shader graph for terrain details. I think at this stage it's just for wind, but there may also be colour involved.

    I don't think grass "health" has the same effect in this new system.

    In saying that.
    The terrain system does have a different colour bases.

    ( Usually not this different pre baking though)

    Which asset did you grab the meadow grass package from?
    There's many from beyond BotD that sold it.
     
  28. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    Looking at it here, it may be that it isn't currently fully implemented into the light loop.

    you can see here that the detail grass, just stays dark, has no SSS.

    Funnily enough, this seems to be the opposite of the issues you're having. o_O

    Maybe Wyatt knows more in this after all :D
     

    Attached Files:

    Deleted User likes this.
  29. Deleted User

    Deleted User

    Guest

    Yes it is from BOTD and using the new terrain tools paint detail feature... I am still facing the issue... I will try again to reproduce it in a new project... I feel like HDRP lit isn't supported for grass maybe because in this tutorial https://t.co/M4nSqflKzt?amp=1 it shows that it is using other shadergraph material called "TerrainGrass" which I am not able to find
     
  30. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594

    I ended up finding this bug report, so looks like the light loop, or whatever may be the issue will be solved in a future 2021.2 beta release.
     
    wyattt_ and Deleted User like this.
  31. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,794
    Wow, what have I been missing, does the terrain support grass mesh details finally? I would actually like that. Also does it curve or at least angle with terrain and not float?
     
  32. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    Yes for the latest versions ( 20201.2+)

    in terms of curvature, I believe it's still a single-centre pivot but only for details.
    Trees are still mostly Y-up, that is the terrain system as a whole though, not necessarily this terrain tools package

    The new details GPU instance support doesn't currently work with light layers, however. a bug more so than a feature limitation mind.
     
  33. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,794
    Hmm, it still seems to not follow the terrain but I can live with that, my main problem now is that whatever shaders I add it's always darker than it should be. Did I miss something here, I have been using the unity example shaders too and it makes no difference also my diffusion profiles are white? Any suggestions? In any case, glad to see the details actually work but not happy about the grass blackness.

    Black Grass.jpg
     
    wyattt_ likes this.
  34. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    That would be the light layers bug I had mentioned.


    if you don't need light layers in your project, you can turn it off and it'll work.
    if you do, however, I have no answer for that one I'm afraid.
     
    Rowlan and florianalexandru05 like this.
  35. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,794
    Ok yah it works, I'm actually impressed now, that was the issue. This is pretty nice, I can finally paint terrains with grass, not bad. And it works with any shader you want. I don't know what the point of light layers is thou. Tbh now I'm wondering if I should use this tool or not for my asset pack.
     
  36. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594

    Similar to layers and Tags. You can use light layers to mask for specific tasks.

    Cinematic lighting, internal external, reflection probes etcetc.

    It's be extremely handy for those circumstances in Particular.

    We had reported this bug a while back so hopefully a fix is coming, or some input on it in general would be nice.
     
  37. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,794
    I guess I'll be using the terrain details anyway, I hope this will encourage Unity to keep working on it and fixing the issues at hand. I'll just tell users to turn off light layers or find other options in the mean time, no biggie.

    The details don't really angle with the terrain slope but that's ok, I'll just make the texture extra long so there won't be any floating details and make dedicated grass textures for terrain.
     
    Last edited: Dec 18, 2021
    HIBIKI_entertainment likes this.
  38. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    That's not a bad idea, you can always link them to the light layers documents page as well so they can understand the potential needs in their project as well
     
    florianalexandru05 likes this.
  39. Deleted User

    Deleted User

    Guest

    @wyattt_ The new paint details is really performant...great job guys!!! But i would like to know that does it do any kind of GPU based culling or CPU cell culling and does it decrease the grass density as per distance from the camera??? and how having no LODs is a performant way for grass??? How well does it perform on mobiles (for URP) and is it only supported on compute capable mobile devices?? I feel that having alignment to the slope atleast as an option would be really great because bigger grass cluster prefabs would just float when painted on slopes (or does it perform similar when using multiple single grass prefabs???) and I also can paint rocks properly aligned on the terrain slopes if it lands for tree painting as well instead of placing them manually and more rotational option like rotation randomizer and brush mask filters for painting trees and grass to quickly make the terrain look believable would really make the world building system versatile and faster to use
    Sorry for asking so many questions together:p
     
    Last edited by a moderator: Dec 19, 2021
    wyattt_ and PutridEx like this.
  40. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    When I was floating around in Overdraw Debug Mode I could actually see some cell based culling happening.

    I can't confirm that's completely the case, but the edge fade tuning is useful too.
     

    Attached Files:

    Deleted User likes this.
  41. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,794
    I would suggest you use a free mesh brush to paint details like small rocks and stuff like that, the terrain tool doesn't really give you the option of paint different types of meshes at once but it's ok for grass. The grass clumps don't angle with the terrain, single grass meshes might be better but it's only one pivot pointing up I think, but you can overcome that by extending the texture of the grass at the bottom.
     
    Deleted User likes this.
  42. Deleted User

    Deleted User

    Guest

    Thats okay for vegetation which grows in vertical direction but for vegetation which grows in more sideways direction like for example ferns or alovera... some parts of them will just clip inside the slopes, shouldn't i place them as grass than???
     
  43. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,794
    I don't think you have any options if you're using the terrain system only, I would paint those as mesh with a mesh brush instead.
     
    Deleted User likes this.
  44. wyattt_

    wyattt_

    Unity Technologies

    Joined:
    May 9, 2018
    Posts:
    424
    No worries! Great questions. I don't know the answers to most of them off the top of my head except for maybe the alignment to slope one. Out of the box, we don't enable that but I think you can author a ShaderGraph to do that. I'll double check. I'll forward these to the primary dev & tech artists that worked on this feature and share their responses here once I receive them. It might be a couple of weeks though. We are all starting to log off for holiday. I can also take a peek at the code/feature myself to see if I can find anything out.
     
  45. Deleted User

    Deleted User

    Guest

    Thanks for the tip!!! never thought of using shadergraph for alignment :eek:!!! Have happy holidays:)!!!
     
  46. Jon_BMG

    Jon_BMG

    Joined:
    Aug 17, 2021
    Posts:
    3
    Is there any updated documentation on the file formats? I found some info that instead of 2^n+1 it is now 2^n but do terrains still need to be square? Can any dimension work or still locked in 2^n? Where are these details documented?
    any help here on where these kinds of details live would be great; everything I try to search sends me to ancient info or unrelated nonsense.
     
  47. Bluelattice5555

    Bluelattice5555

    Joined:
    May 8, 2020
    Posts:
    34
    So, although I really love some of the tools that come with this package and the idea of doing terrains right in Unity, I did notice one thing that might be a deal-breaker for me. The way terrains are triangulated, the diagonal cut for every square all go in the same direction. The problem with doing it this way is whenever you have a steep diagonal drop-off on your terrain. It's fine if the edge of that drop-off happens to be on the side of the triangle cut that follows the direction of your cliff-like edge, but if it's on the other side, your cliff edge will look pointy. For example, you cannot make a flat octagonal-shaped plateau because only 6 of the 8 edges will line up perfectly with the triangles of the boxes of the terrain.

    There is a better way to triangulate the boxes that avoids this problem altogether and does allow you to make octagonal-shaped plateaus. There are two ways game devs do it. The first is taking a plane, triangulating it where all the edges will go the same way (just like in Unity), but then going back and "rotating" every other one. The second, is to make a plane, then use the "poke" operation, which takes each box and makes it into what effectively is a square pizza. Both methods essentially do the same thing, but for people using 3D programs, both Maya and Blender have the poke operation and it is easier to do it that way. For Unity though, I'm sure it wouldn't be too difficult to simply alternate every other edge to make it go in the other direction, in the code that creates the plane. Examples of this type of terrain triangulation can be seen in World of Warcraft terrain. You can export tiles of maps using something like wow.tools website.

    The way it is now, our only option is to either smooth edges like this off or go up in heightmap resolution. You would have to increase the resolution quite a lot to get even close to a comparable, straight edge. I understand that the terrain can provide more resolution on demand, based on where you paint, and will default to a lower resolution in flat, unpainted areas, but there are situations where we might not want to go up in resolution in order to keep the grid size a constant dimension. And furthermore, making the triangular edge as I described is a very simple fix that should be done anyway. I actually cannot think of any benefit to keeping the triangulation the way it is now, due to the pointy edges it can potentially create, but there is good reason to alternate them, eliminating the pointy edges.

    Would enjoy hearing your take on this. The tool is absolutely amazing and I look forward to its progression. A lot of hard work has been put into it and we all thank you for it.
     
  48. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    191
    Not sure where else to ask this but it would be great if the TerrainToolbox APIs could be opened up for other scripts. I ended up copy/pasting half of TerrainToolboxUtilities.cs into my own script just so that I could call its functionality from my own editor scripts.
     
  49. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    Yes 100%.

    As a temporary workaround, you have two options. One is reflection, which isnt ideal for performance and upgradability.

    Second is tricking the compiler so you can access internal classes. Luckily TerrainToolboxUtilities is marked as internal, so that will be possible. What you do is check the AssemblyInfo.cs file, this has an InternalsVisibleTo "Unity.TerrainTools.Editor.Tests" attribute. If you put your own editor code in an assembly definition file, and fill in the assembly name to be that exactly, you can access the internal classes!
     
  50. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    191
    Thanks for your help. I tried the 2nd trick but am getting these errors:

    Assembly with name 'Unity.TerrainTools.Editor.Tests' already exists (Assets/Scripts/Editor/Terrain/HobbleTerrainAssembly.asmdef)

    Assembly with name 'Unity.TerrainTools.Editor.Tests' already exists (Packages/com.unity.terrain-tools/Tests/Editor/Unity.TerrainTools.Editor.Tests.asmdef)