Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    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. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    732
    Try another name, anything thats listed in AssemblyInfo should work.
     
  2. drupaljoe

    drupaljoe

    Joined:
    Feb 4, 2019
    Posts:
    125
    There is only that 1 name in AssemblyInfo.cs:

    Code (CSharp):
    1. using System.Runtime.CompilerServices;
    2.  
    3. [assembly: InternalsVisibleTo("Unity.TerrainTools.Editor.Tests")]
     
  3. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    732
    Ah sorry, i guess thats not possible then. Your only bet is reflection
     
  4. drupaljoe

    drupaljoe

    Joined:
    Feb 4, 2019
    Posts:
    125
    I guess I'll just continue to copy/paste code over into my own editor scripts for now..
     
  5. Tesrym

    Tesrym

    Joined:
    Dec 2, 2012
    Posts:
    64
  6. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    434
    Didn't got my questions answered
    And can we get performance improvements aswell... the demo wasn't performing that great
     
  7. xDELCO

    xDELCO

    Joined:
    Feb 16, 2020
    Posts:
    1
    Hi,

    It was the only page that appeared in google when i pasted error msg.

    I created new project (3D core) and it was 1st package I imported --> Two errors.
    Version: Unity 2020.3.28f1 <DX11>

    Can you please assist?
     

    Attached Files:

    • 1.PNG
      1.PNG
      File size:
      10.2 KB
      Views:
      211
    • 2.PNG
      2.PNG
      File size:
      9.6 KB
      Views:
      198
  8. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,681
    Hi TerrainTools Team
    For the erosion tools can we get a simulate toggle button to erode the terrain locally or globally, so we don't have to manually paint them when trying to erode the entire terrain?
     
    EagleG likes this.
  9. wyattt_

    wyattt_

    Unity Technologies

    Joined:
    May 9, 2018
    Posts:
    406
    I'm sorry for making you wait for this extremely late response. "Weeks" ended up being months.

    There is CPU culling that is done for each detail patch on the Terrain. You can control this somewhat by specifying detail resolution and detail resolution for each patch in the Terrain's settings.

    Compute is used because of limitations from the instancing buffer that is used. When compute is not available, it will work, but more work is done on the CPU.

    The performance gains you do get are from the patch culling and GPU instancing of the detail meshes.
     
    EagleG likes this.
  10. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    434
    @wyattt_ can u share the plans of what we should expect from the terrain tools this year?? Are all the pain points and important tools like performance, placement tools, workflow improvements which many people complained and requested over years, considered??? And should we expect them to land this year???And why don't we have a dedicated 4.0 thread for the terrain tools??? to be honest the development of terrain tools seems very slow to me, is it because u guys are waiting for DOTS 1.0 to create a complete new and powerful systems???
     
    TerraUnity, Lymdun and Gokcan like this.
  11. Gokcan

    Gokcan

    Joined:
    Aug 15, 2013
    Posts:
    287
    To be honest, I am frusrated a lot because I was expecting to see somethings on GDC. I see now we should wait more to see a real open world environments...
     
    EagleG likes this.
  12. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    434
  13. DanielTG

    DanielTG

    Unity Technologies

    Joined:
    Feb 15, 2018
    Posts:
    111
    Hi @EagleG and all,

    If you have any more questions on the World Building roadmap from GDC, please let us know. The presentation was only a high level overview but, for example, scattering improvements focus on multi-prototype scattering using a single brush with controls to manage distribution for each of the details.

    To help answer the question on why development for Terrain Tools seems slow, Terrain Tools v.0 is the first official release to be included in the Editor (as of 2021.2) an optional package; with that came additional quality control and standards that need to be met for us to finally remove the 'preview' (aka Experimental) package tag.

    Thanks,
    Daniel
     
    wyattt_, Gokcan and EagleG like this.
  14. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    434
    So does this mean that we will be getting multiple prefab painting and something like brush mask filters/rule based spawning for placement??? sounds great then, i expect the same for mass place function!!! is there anything planned for slope alignment... its a very important feature, without this we cannot paint grass clusters and wider grass species, rocks, trees directly over the slopes of terrain, otherwise it looks terrible to see the painted object floating mid air or intersecting inside the slope( in nature grass, trees, and rocks do align to the slope)
    It felt slow mainly because the patch notes showed that the last few updates didn't received any major content... and also the GPU tree renderer, terrain shadergraph, terrain SRP rendering improvements on productboard didn't show much progress for more than a year.....
    BTW can i know the progress of the both i mentioned above, does the tree renderer help in improving performance on all platforms like consoles and PC??? Anything about DOTS terrain or Concurrent binary trees terrain (which u guys showcased last year at SIGGRAPH)??
     
  15. Gokcan

    Gokcan

    Joined:
    Aug 15, 2013
    Posts:
    287
    Finally some answers on this forum:) Better than nothing...
     
  16. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    434
    I forgot to mention about the non destructive terrain workflow which was showcased at 2020 GDC, but it has been 2 years and we haven't heard about it anything, i know u guys paused the development of it with the spline system to add overlays and cleanup the terrain source code, but now that the splines are coming should we expect this to return???
     
  17. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    8,926
    So I guess my question here is... if this is the case, why does the current package currently suffer from some many errors when performing basic operations? Right now there's multiple threads about how the package is just constantly throwing errors on install, errors when attempting to use brushes, errors that keep the editor UI panel from rendering...

    Why does the quality control let that through but not fixes?
     
  18. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    434
    @DanielTG what happened??? Nothing from your end??? Can u atleast reflect the roadmap on the product board with some details.... For now it seems like nothing is happening with terrain tools:)
     
  19. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,107
    You may want to take a look at this thread:

    https://forum.unity.com/threads/the-usability-of-the-terrain-tools-is-most-horrible.1271774/

    In short: The code and functionality is excellent from what I can see. The UI however makes the Terrain Tools an upleasant experience that one likes to avoid and rather switches to 3rd party. With experimental it was tolerable, but now that this is release, it needs an extreme overhaul.
     
    EagleG likes this.
  20. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    961
    Terrain tools in 2021.3.1 have some consistent issues and errors.
    Whenever I change my terrain mode, let's say to "paint texture" from something else, this happens(only after installing terrain tools):

    upload_2022-5-8_2-6-32.png

    and console errors:
    upload_2022-5-8_2-6-54.png

    - This isn't a show stopper, the errors don't block me from running the game but it's a bit frustrating.
    I can fix the terrain inspector UI by switching to a different game object and then back to the terrain object.
     
    ibernd and Rowlan like this.
  21. ActiveMe

    ActiveMe

    Joined:
    Jan 10, 2014
    Posts:
    6
    You're aware of these simple include errors since more than about a year (and half now) and these are always not fixed today... What's wrong ? It's possible to have a fix quickly ?
     
  22. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    732
    I was wondering if there is some guide or more documentation on how to make this specific custom terrain tool. I've read through the documentation, and what i'd like to do is paint to another custom texture, instead of one of the builtin ones.

    The existing API is very context-sensitive, e.g. you BeginPaintHeightmap, but you cant BeginPaintCustomTextureWithDimensions.

    I cant really copy over the builtin tools because CommonUI is private, despite a whole bunch of utilities accepting it (for example Utility.GenerateAndSetFilterRT). The examples in the documentation also dont work, the namespaces and classes are outdated.
     
    Last edited: May 19, 2022
  23. wyattt_

    wyattt_

    Unity Technologies

    Joined:
    May 9, 2018
    Posts:
    406
    Hi. With which version of the package are you still seeing the visualization shader errors?
     
  24. wyattt_

    wyattt_

    Unity Technologies

    Joined:
    May 9, 2018
    Posts:
    406
    Could you tell me the use for the custom texture you're wanting to modify? I might be able to help a little better with that info.

    I only looked quickly, but it does seem like the only part you'll need to implement is a class that inherits from BaseBrushUIGroup. The Utility class (at least based on the API you linked) should also be publicly accessible but I will check in a new project.
     
  25. wyattt_

    wyattt_

    Unity Technologies

    Joined:
    May 9, 2018
    Posts:
    406
    Try the following code (4.0.3 terrain tools):

    Code (CSharp):
    1. using System;
    2. using UnityEngine;
    3. using UnityEditor.TerrainTools;
    4. using UnityEngine.TerrainTools;
    5.  
    6. public class BrushUI : BaseBrushUIGroup
    7. {
    8.     public BrushUI(string name, Func<TerrainToolsAnalytics.IBrushParameter[]> analyticsCall = null) : base(name, analyticsCall)
    9.     {
    10.     }
    11. }
    12.  
    13. public class PaintTool : TerrainPaintTool<PaintTool>
    14. {
    15.     private Material m_Material = new Material(Shader.Find("My/Paint/Material")); // change this to your Material name
    16.     private BrushUI m_BrushUI = new BrushUI("Paint Tool");
    17.  
    18.     public override string GetName() => "Paint Tool";
    19.  
    20.     public override string GetDescription() => "Description";
    21.  
    22.     public override bool OnPaint(Terrain terrain, IOnPaint editContext)
    23.     {
    24.         // I'm only setting things up so I can call the Utility.GenerateAndSetFilterRT using the BrushUI : BaseBrushUIGroup implementation.
    25.         // You could probably copy directly from the "DefaultBrushUIGroup" class that is in TerrainTools.
    26.         // Should get you the same functionality as the rest of our tools
    27.         var bounds = TerrainPaintUtility.CalculateBrushTransform(terrain, editContext.uv, m_BrushUI.brushSize, m_BrushUI.brushRotation);
    28.         var paintContext = TerrainPaintUtility.BeginPaintHeightmap(terrain, bounds.GetBrushXYBounds(), 0);
    29.      
    30.         Utility.GenerateAndSetFilterRT(m_BrushUI, paintContext.sourceRenderTexture, paintContext.destinationRenderTexture, m_Material);
    31.      
    32.         // do your paint stuff here
    33.  
    34.         return true;
    35.     }
    36. }
    37.  
    This is in a script I have in my Project's Assets/Editor folder
     
    Last edited: May 26, 2022
    Rowlan likes this.
  26. mattb-unity

    mattb-unity

    Unity Technologies

    Joined:
    Feb 7, 2020
    Posts:
    17
    Hi! Thanks for taking the time to post details about these errors. We've got a bug filed for this one and it is being tracked here.
     
    Last edited: Jun 3, 2022
  27. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    434
    Sorry, but i want to ask again...
    What is the progress of improvements to the placement tools and those stuck on the roadmap under "in progress" and "planned" for more than a year?? This product board page https://unity.com/roadmap/unity-platform/3d-world-building isn't helping at all!! It hasn't even reflected the 2022 roadmap and hasn't been updated for a long time!! There is literally no information of what's happening with terrain tools and what is it's progress!!
     
    Last edited: Jul 2, 2022
  28. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    434
    Bump
     
  29. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,107
    There's not really anything new that's official. All I've seen is that now there'll finally an api to place terrain details. I doubt you'll get anything of those on the roadmap in 2022 and rather have to wait for 2023. But that's just guesswork, just like the roadmap on which you can't rely on. I've waited long for the splines. Too long. Now it's there and I can't use it because I need to stay backwards compatible and there's no backport of the splines.
     
    EagleG likes this.
  30. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    434
    I really hate how the shader graph support for terrain, which is the most important and anticipated feature is just stuck under "in progress" for almost 1.5 years.... Don't know why but the world building tools are always ignored and don't recieve much love, and whatever they receive, is at very slow rate and get abandoned like polybrush and probuilder... This has been the same from the start of unity so nothing because of layoffs or acquisition.. unity never focused on wold building, right from beginning and depended upon third party like Gaia!! Non-destructive workflow is really a important thing for today's terrain system and unity was working on it in 2020 and showed it in their GDC, but it was stopped because they first wanted to bring overlays which is good, but it's 2+ years now and we haven't heard anything about both of them and aren't present in any roadmaps...
     
  31. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    434
    https://twitter.com/ost_51/status/1551517714715660288?s=20&t=Iwq63jKJcUkKyNZYHGW6XA
    Finally seeing some improvements to the placement tools, thanks a lot!! I still don't understand why such changes aren't reflected anywhere so that wide range of people can know what's happening!! HDRP team properly maintains and updates their roadmap with time, and gives insights on upcoming features and plans on forums too....don't know why it isn't happening with world building tools!!
     
  32. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,107
    It's all beta. But at least there's progress. eg they've only just started making their detail api public:
    • Terrain: Changed: All built-in Terrain Tools can now be overridden and Detail API is publicized.
    2022.2.0b1

    What you see in the twitter post of yours is in the terrain tools 5.0.0-pre3.
     
    Last edited: Jul 26, 2022
    wyattt_ and EagleG like this.
  33. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,256
  34. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,107
    wyattt_ likes this.
  35. kunkerkarshubham

    kunkerkarshubham

    Joined:
    Aug 4, 2022
    Posts:
    1
    https://portal.productboard.com/dzc...als?utm_medium=social&utm_source=portal_share any news on this??? My team is currently using mesh because terrain doesn't support shader graph, but workflow is very bad and tedious as we need to switch back and forth to make changes, between mesh and terrain... We did try using shadergraph on terrain with hacks, but it lead to increase in batch count as draw instanced had to be disabled to use it, which was unacceptable for our project... Is there any other easy and better way to do this without increasing batch count, and how long would it take for official solution?? BTW we are using HDRP for now....
     
    shikhrr, PutridEx and EagleG like this.
  36. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    434
    Hey!! I was playing around with UE5's grass painting system and found that it performs much better than unity's :eek:!! It can handle very high poly grass meshes (each of around 15k tris) easily at a very long distances of more than 5000 units!! It all happens because these detail (foliage) meshes support a simple tool called LOD system and nothing fancy like nanite was used, just 2-3 simple LODs and a billboard makes all this possible!! On the other hand unity paint details doesn't support LOD and things start lagging when distance is set beyond 1000m with grass meshes having just approximately 1000tris!! I feel that LOD support for grass meshes is mandatory because GPU instancing alone does not give the performance and optimizations required for efficient rendering of grass!! I can use the paint trees option, but it doesn't align to slope and i won't get additional performance because of the lack of GPU instancing!! I really hope that the worldbuilding team is reading this and considers it important:(.......
     
  37. useraccount1

    useraccount1

    Joined:
    Mar 31, 2018
    Posts:
    181
    Damn, this means the new vegetation system is still isn't usable in production.
    Companies often just buy the vegetation engine and nature renderer. I suppose that's all you can do for now.
     
    EagleG likes this.
  38. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    434
    A simple Prefab painter can work too!! My UE5 grass test wasn't using anything fancy to perform great, just some LOD's and a billboard with staticinstanced ticked which must be equivalent to unity 's SRP batcher/Material GPU instancing/Static batching... Nature renderer might provide additional performance boost because of GPU instancing
     
  39. Querke

    Querke

    Joined:
    Feb 21, 2013
    Posts:
    49
    You could try doing the same with PolyBrush, which is a tool that has prefab painting.
    And using something like GPUInstancer, would probably yield some very good results (GPUInstancer actually has a built in LOD system, due to how important LOD is for performance)
     
unityunity