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

Terrain Former - The Best Manual Terrain Sculpting Tools for Unity

Discussion in 'Assets and Asset Store' started by AquaGeneral, Jul 27, 2014.

  1. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
  2. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Terrain Former v1.5.0 is out now! The biggest new feature is support for sculpting and texture painting across multiple terrains. A new tool found at GameObject > Create Terrain Grid allows you to create a grid of terrains which will all share the same properties and will be perfectly positioned at the center of the scene.

    Terrain Former v1.5.0 Release Notes:
    Features
    • Multi-terrain sculpting and painting.
    • Tool for creating a grid of terrains (multi-terrain) via Game Object > 3D Object > Create Terrain Grid….
    • The Terrain Former component can now be added to the parent of a terrain grid.
    • Multiple terrains inside of a common parent are considered to be part of a terrain grid.
    • Ability to invert a custom brush's texture per brush mode.
    • Setting to invert all custom brushes globally.
    • Brush selection is now tab-grouped with the option to switch to how it was before or to show an icon which indicates the type of the brush.
    • Paint texture tool - even across terrain grids as well of course.
    • Add, remove and edit textures for terrains across entire terrain grids.
    • Heightmap tool to import heightmaps from any arbitrary Texture2D.
    • Terrain/TerrainData-specific settings are now present in the Settings tab (and work across an entire grid). Terrain Former-specific settings have been moved into the Unity Preferences window.
    • Neighbours foldout found in Settings which show the terrain grid from a top-down perspective.
    Improvements
    • The Settings.tf JSON file is now formatted with "Pretty Print".
    • Minor improvements to the scene view widget panel's appearance and it's now slightly transparent.
    • Lots and lots of miscellaneous UI tweaks.
    • Massive behind-the-scenes changes that improve the way Terrain Former is structured, hopefully make the code a little more understandable and perhaps a little more performant as well.
    Fixes
    • Changing the falloff curve will no longer be slow while using bigger brushes.
    • The Settings.tf file is now properly upgraded from previous versions to the current version (however, downgrading isn't supported).
    • When the Settings.tf is malformed, there will now actually be a decent error message explaining what's wrong.
    • Fixed a few issues that caused the scene view panel to have no texture and/or incorrect padding.
    • Removed the "Toolbar Style" setting as it requires such a large area to be usable and is aesthetically challenged.
    • Removed the foldout for the "Behaviour" heading under brush settings since it was not necessary.
    • Removed interactive smoothing since it both never worked as it should've in the first place wasn't necessary either.
     
    Teila likes this.
  3. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    I recorded a little screencast to show off the new multi-terrain feature in Terrain Former v1.5:


    Also, patch version 1.5.1 is on its way soon with a bunch of bug fixes.
     
  4. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Nice! Texture painting and full non-destructible multi-terrain scaling! Super nice!
    Thanks! :)
     
  5. EiknarF

    EiknarF

    Joined:
    Apr 28, 2011
    Posts:
    142
    +1 requrest for wacom support, would also be nice to have brush size and strength change by pressing and holding a key then moving the mouse (like 3d sculpting programs) and have smooth as modifier key (I would put it on shift)
     
  6. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Noted! Unfortunately this takes a lower priority and might take a while until I get to it.
     
    EiknarF likes this.
  7. Xoduz

    Xoduz

    Joined:
    Apr 6, 2013
    Posts:
    135
    Hi, I imported the latest version of Terrain Former (1.5.4) into a blank project in Unity 5.6.2p1 (64bit) on Windows 10, created a new terrain and added the Terrain Former component to the terrain object. If I now try to use Terrain Former component to raise/lower the terrain or otherwise modify the (so far untouched) terrain, I get the following error message:

    NullReferenceException: Object reference not set to an instance of an object
    JesseStiller.TerrainFormerExtension.TerrainFormerEditor.UpdateRandomSpacing () (at Assets/TerrainFormer/Editor/TerrainFormerEditor.cs:2040)

    Edit: By adding a debug message to TerrainFormerEditor.cs, Unity recompiled the scripts and the issue was somehow fixed. I can now add new terrains and use Terrain Former without problems. Hm
     
    Last edited: Jul 25, 2017
  8. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    That's very strange. I was having troubles with my project that also had Terrain Former inside of it where when compiling scripts, it was compiling the second last version. That surely can't be releated to the similar strange occurance you ran into?
     
  9. Xoduz

    Xoduz

    Joined:
    Apr 6, 2013
    Posts:
    135
    Not sure. I have a different project where an older version of Terrain Former was included, but I basically redownloaded the asset from the asset store and imported it into a brand new, blank project. Very strange.
     
  10. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
    Unity 5.6.0f3 so far no luck getting this to work. It's not overriding the default terrain tools.What are some things to check?
     
  11. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Terrain Former tools aren't meant to override the built-in terrain tools, but rather it's made to be used beside them. In the future they will be completely overridden, but at the moment painting details (eg, trees, grass) requires you to use the default tools since Terrain Former doesn't currently handle it. On your terrain object, add the "Terrain Former" component and you'll be good to go.
     
  12. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Terrain Former v1.6 is out now! One of the big new features is "Shirkn Wrap":


    NOTE: Terrain Former v1.6.0 only supports Unity 5.3 and above.

    1.6.0 - 6th of August 2017
    Feeatures

    • Shrinkwrap tool - moulds the terrain around any 3D Physics collider in the scene - particularly useful for making the terrain around roads and paths the same height.
    • Height Offset in the Heightfield tab, which offsets the entire heightmap(s) by the accompinying value.
    • Export heightmap as an EXR (available in Unity 2017.1 and later).
    • Choose which axis the linear ramp generator runs along.
    • Framing (with the shortcut key "F") now longer is relying on the Terrain inspectors' implementation, and works across terrain grid.
    Improvements
    • Centered the Flatten icon's arrow.
    Fixes
    • Complete support for having multiple "Inspector" tabs opened at once while Terrain Former is active.
    • Fixed an issue where Initialize was being called twice on changing mode for the first time after OnEnable was called.
    • Pressing the shortcut keys to change the brush angle would result in jitter as they go past the minimum and maximum values and then clamped a frame later.
    • Fixed an issue where the brush projector was flipped around in a strange way.
    • The top projector plane visible in Flatten and Set Height tools wasn't being rotated based on the current brush angle.
    • If Unity will automatically show tooltips on toolbars (in Unity 2017.1 and above), it will no longer double up on tooltips and show Terrain Former's custom tooltip.
    • The tooltips that appear when hovering over the toolbar are no longer cutoff at low widths and behave more responsively.
    • Fixed an issue where Terrain Former would think the left mouse button is still pressed down when it isn't.
    • Fixed multiple bugs related to opening the edit/add texture window (found in the Paint Texture tool), and the window updating to add/edit states.
    • Vast under-the-hood script improvements. Many "TODOs" have been removed and/or fixed.
     
    Xoduz likes this.
  13. mirts

    mirts

    Joined:
    Dec 26, 2012
    Posts:
    32
    Hi! Just purchased the tool and tried Shrinkwrap. It changes the terrain at the correct place, but the terrain is extruded past the collider. Tried it with a simple Unity 3D cube. Terrain extends straight through really fast when painting the terrain where the cube is... Any idea what the trouble could be?
     
  14. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    If it's extending only a little bit through, you can adjust this by changing to "Raycast Offset" parameter to 0, or whatever you'd prefer (the value can be a negatrive or a positive value).

    If the behaviour isn't realted to the raycast offset and is instead extending way past where it should, it must be bug.

    If it is a bug, email me at "aquageneral AT hotmail DOT com" with your Unity Editor version, and potentially a screenshot showing the issue.
     
  15. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Terrain Former v1.7.0 is out now! It brings massive performance improvements including multithreading.

    1.7.0 - 3rd of November, 2017
    Features:

    - Sweeping performance improvements delivering up to 5x (on a 4-core Intel Core i7 6700K) faster results than v1.6.0 using multithreading and various other optimizations.
    - While in Flatten mode, keyboard shortcuts "Y" and "U" step backwards and forwards Flatten Modes.
    - While in Paint Texture mode, keyboard shortcuts "Y" and "U" step backwards and forwards textures.

    Improvements:
    - Renamed the "Shrink Wrap" tool to "Mould".
    - If the Settings.tf file is invalid, Terrain Former will automatically create a new one behind the scenes without prompting the user, because it it's invalid in the first place it's contents are of no use.
    - Refactored code has increased performance of all tools by up to 30% (excluding multithreading). Note that applying the changes is still relatively slow due the way Unity currently works, and that the Mould tool is only partially multithreaded.
    - All tools are now multithreaded, yielding up to a 98% core count scaling, while smoothing has up to a 90% core count scaling rate. With a quad-core Intel Core i7 6700K, Raise/Lower is up to ~3.94x faster, smoothing is now ~3.59x faster.
    - The default falloff for the Smooth and Mould tools have been adjusted to make them work faster.
    - The default brush colour's alpha value is a little more transparent than before (170 down to 155).
    - Change Smooth's "Smooth Radius" UI to indicate it's true size
    - Added smooth size to the Mould tool.
    - Renamed the Mould tools' "Raycast Offset" parameter to "Height Offset".
    - Brush falloff creation is now 4x quicker.
    - Double clicking on an empty area in the Textures area in Paint Texture mode is now a shortcut for adding a texture.
    - Changed the "Alpha" parameter for brush falloff to be by default, and in place it's now called "Invert" and can be applied to procedural brushes.
    - Lots of internal code cleanup.

    Fixes:
    - Fixed "Offset Height" in the Heightmap tab not working on a terrain grid correctly.
    - Fixed a bug where Create Terrain Grid wasn't prompting for files that will be overwritten.
    - Fixed an exception when there is only one terrain as a child and there is a Terrain Former component attached the parent object.
    - Fixed a stutter noticable when editing a terrain grid where each and every terrain was told to update their state after using a tool even though they didn't actually change.

    Buy Terrain Former on the Unity Asset Store: https://assetstore.unity.com/packages/tools/terrain/terrain-former-20052
     
  16. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Hello our assets folder is from small letter start "asset" not "Asset" and we have problem to implement your prouct here is exception (we have toset this kind of name of asset because of collab)

    ArgumentException: The 'assetsPath' parameter must contain 'Assets/'
    JesseStiller.TerrainFormerExtension.Utilities.GetLocalPathFromAbsolutePath (System.String absolutePath) (at assets/TerrainFormer/Editor/Utilities.cs:122)
    JesseStiller.TerrainFormerExtension.BrushCollection.Initilize () (at assets/TerrainFormer/Editor/BrushCollection.cs:18)
    JesseStiller.TerrainFormerExtension.TerrainFormerEditor.Initialize (Boolean forceReinitialize) (at assets/TerrainFormer/Editor/TerrainFormerEditor.cs:287)
    JesseStiller.TerrainFormerExtension.TerrainFormerEditor.OnInspectorGUI () (at assets/TerrainFormer/Editor/TerrainFormerEditor.cs:508)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1240)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  17. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    OKi fixed it by small change in code But I clicked now F3 and there is always smoothing tool no mater what I choose in editor icon
     
    Last edited: Dec 9, 2017
  18. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    @kubaskia F1, F2, etc can only act as shortcuts for Unity's built-in terrain tools, since they receive the shortcut before Terrain Former. By default Z, X, C, V, B, N, and M are the shortcuts to change tools in Terrain Former.

    If I follow you correctly, you try to change the mode by clicking on the icons in the toolbar in Terrain Former and it only lets you select the smooth tool? I have tested a project with "assets" as the main folder name instead of "Assets" and everything seems to be fine when I replaced the first line of GetLocalPathFromAbsolutePath in Utilities.cs with:
    int indexOfAssets = absolutePath.IndexOf("Assets", StringComparison.OrdinalIgnoreCase);

    Note that I changed "StringComparison.Ordinal" to StringComparison.OrdinalIgnoreCase".

    If you still need assistance please try to explain what's going on in greater detail.

    Best,
    Jesse.
     
  19. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Reseting unity fixed my problem but now I have other, I changed Falloff spline of brush, to had now when I change it back brush of some tools still have hard falloff, Reseting unity didnt helped, How to reset terrrain former settings? Also my smooth tool hae some work spikes what i Mean it smooths then it stops for few seconds and again work and stops, and work.
     
    Last edited: Dec 19, 2017
  20. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    That is all fairly strange behaviour. Are there any errors being logged in the console due to Terrain Former?

    Deleting the Settings.tf file in the Terrain Former directory while Terrain Former is not being used is how you delete the settings. Also note there are seperate settings in Preferences > Terrain Forner, those can be reset by scrolling to the bottom of the window and clicking "Restore Defaults".
     
  21. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Hmm I'm still experiencing spikes of work durin using smooth tool and mould tool, I dont know why but it is really hard to work with that if every second have spike. and fre second lag
     
  22. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    I noticed a few days ago in another project I was receiving massive lag spikes while playtesting my game, and according to the Unity Profiler it "Editor Overhead" or something along those lines. It went away after a few minutes by itself. I wonder if that's happening for you too.

    When you notice these lag spikes, open the Unity Profiler and start profiling. On the frames that have large spikes could you send me a screenshot capture? This way we'll know if it's Terrain Former itself or something else.
     
  23. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
  24. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Hello here is a screen, it seems liek after start of unity it works good for some time and with time it starts to getting worse and worse. upload_2018-1-12_13-28-58.png
     
  25. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    How much RAM does your computer have? My guess is that it has to call GC.Collect much more often since it might be running out of memory (or at least it's closer to doing so).

    Edit: I've identified some massive GC allocations and a fix for them will appear in the next version of Terrain Former (v1.7.3). They are definetely the cause for the lag spikes - I'm able to reprdoduce them on my PC.

    If you'd like this updated version sooner, you can send me a private message on the forums here with your email adress and I can send you this updated version.
     
    Last edited: Jan 13, 2018
    zmaxz likes this.
  26. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    Just in case anyone sees this thread, this asset is amazing. It is the real deal. Unity's terrain brush is obsolete with this.

    Height / splat painting on multiple terrains is an absolute breeze, and performance is perfect. There might be crashing due to Unity's flatten feature when using a multi terrain grid, but other than that perfect stability. It would be nice to be able to set the brush to higher bounds (It's already much larger than unity's terrain brush), but that's not been a serious problem.
     
  27. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Thanks for the review and support Flurgle!

    In saying "There might be crashing due to Unity's flatten feature", do you mean you are switching back and forwards between Unity builtin terrain tools, and when using the builtin Unity flatten tool it crashes on a multi-terrain grid?

    The main reason I don't allow the maximum brush size larger than that of the terrain size (even when there are multiple terrains) is that at higher heightmap resolutions it becomes ridiculously slow and even more memory hungry. It can be changed in the future but I am not completely sure its worth the extra work (it will take more than just a few minor changes, I checked just earlier).
     
  28. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    I said in the past that Terrain Former would have a road tool, but because Terrain Former has never been able to cover its development costs I will make the road tools a standalone asset. If possible I will offer a discount to Terrain Former customers. I think it would work as an upgrade discount to a bundle with Terrain Former plus the road tools.

    Sorry everyone, but I do believe it will be worth the cost and worth the wait because I'm aiming to make the most inuititive while highly controallable road tools ever!
     
  29. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
  30. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    A fresh, new version of Terrain Former (v1.7.4) comes with a bunch of bug fixes and some minor improvements.
    1.7.4 - 13th of April, 2018
    Improvements:

    • Paint Texture's parameter editor now automatically closes when Terrain Former is no longer active.
    • Brush angle shortcut now wraps to/from -180° from/to 180°.
    • The brush name label is no longer bold since it was unnecessary and looks strange in Unity 2018.
    • Changed Generate's "Height" option label to "Max Height".

    Fixes:
    • Fixed an issue where image brushes weren't being sorted alphabetically.
    • Fixed a bug when trying to paint a newly added texture onto the terrain.
    • Fixed a bug when trying to import a heightmap onto a non-square terrain grid.
    • Fixed a bug when trying to sculpt on a non-square terrain grid.
    • Fixed a bug when exporting non-square terrain to a EXR heightmap.
    • Fixed a bug where the brush angle shortcuts seemingly roated the brush in the opposite direction.
    • Fixed a bug where after the brush has been rotated by shortcut keys its opacity would be affected by the brush speed.
    • Fixed a bug when checking the "Invert Brush Textures Globally" option in Settings that causes an exception.
    • Fixed potential floating point precision inaccuracies that might make valid terrains incorrectly not part of a terrain grid.
    • Fixed a mistake that allows terrains to be a part of a terrain grid even if they are of different resolutions.

    Also Terrain Former is still 25% for Unity Plus/Pro customers: https://assetstore.unity.com/packages/tools/terrain/terrain-former-20052

    v2.0 of Terrain Former will be coming in less than 6 months with lots and lots of new juicy features. Have a look at the updated roadmap here: https://www.terrainformer.com/roadmap.html
     
    Don-Gray likes this.
  31. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
  32. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    Can this be used to seamlessly connect terrains I made in Terrain Composer 2 without actually combining them into a single terrain? I still need the multiple terrains to be segregated but would like to cleanup the edges so they would look continuous and without any breaks.
     
  33. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Hi! Yes, as long as the terrains are completely adjacent to each other (where the borders of each line up perfectly), then yes, you can use Terrain Former for exactly what you want.
     
  34. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    Sorry, what do you mean where the borders of each line up perfectly? I can place the multiple terrains I made in TC2 adjacent to each other only after creating them. But I made each of the terrains separately and without any planning so some have really high edges (example cut hills, mountains, etc.). But I plan to use this tool to modify those terrains and mold them by decreasing/increasing the height of the edges so borders can line up perfectly and look seamlessly connected...
     
  35. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    By the borders, I just mean the lateral borders of the terrain objects themsevels - the height along the borders doesn't matter. What you have planned will work perfectly. If you run into any issues or have any other questions, I'm happy to help.
     
  36. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    I see, ok. What about the splat maps/textures from TC2? I can also use/import them within Terrain Former as well?
     
  37. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    I do not use Terrain Composer 2 so I don't know for sure, but I think internally it outputs a regular Unity Terrain object, so in that case Terrain Former will be able to make use of those too - no import step required.
     
  38. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    Terrain Former, more specifically its multi terrain editing feature, is exactly what we're looking for. I have one question though, for which I didn't find an answer yet.

    Once I created a terrain grid, let's say with 3x3 cells, can I afterwards add further terrain cells to it?

    For example, imagine this terrain grid cell layout (O=cell):
    Code (CSharp):
    1. OOO
    2. OOO
    3. OOO
    Now I want to add a new terrain cell to extend the world in one specific place, like shown below:
    Code (CSharp):
    1. OOO
    2. OOOO
    3. OOO
    Is this possible?
    How would I add a new terrain cell like this?

    Thanks in advance.
     
    Last edited: Oct 9, 2018
  39. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Hi Peter,

    Yes, you can add or remove terrain from a terrain grid even after creating the terrain grid.

    The easiest way to add another terrain to the grid is to:
    1. Select one of your existing terrain assets within Unity and press Ctrl+D to duplicate the asset.
    2. Drag that asset into the your scene
    3. Position this new terrain exactly where you want it to be alongside the rest of the terrain grid. Note that the position should be exactly along the perimeter/edge an existing terrain in your terrain grid - otherwise Terrain Former won't know it's actually a part of the terrain grid (plus it would not look right in-game anyway).
    4. Add the "Terrain Set Neighbours" component to the newly created terrain, and assign to necessary neighbours. This makes the terrain grid render seamlessly across the borders of each terrain.
     
    Peter77 likes this.
  40. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    Thanks for the answer! I bought the tool today and it does solve the multi terrain editing I was running into.

    Here is a list of feedback after testing the tool for a day, if I can use it for production.

    1) I use lower-case names for everything files and folders, including the "Assets" folder. The project path is "C:\projects\mygame\unity\assets" for example. The "Create Terrain Grid..." functionality doesn't handle lower case naming and I wasn't able to create a terrain grid.

    I had to change the string comparisons in CreateTerrainGrid.IsDirectoryValid to:
    Code (CSharp):
    1. directory.StartsWith("Assets", StringComparison.OrdinalIgnoreCase)
    2. directory.StartsWith(Application.dataPath, StringComparison.OrdinalIgnoreCase)
    Could you check the code and use StringComparison.OrdinalIgnoreCase for path comparisons?

    2) I created 16x16 grid cells, each at a size of 64, which represents 1 square kilometer terrain in total. With a alpha and height map resolution of 256x256 pixels each.

    terrainformer_settings.png

    Terrain Former's "Raise/Lower" tool has significant performance problems handling even little brush sizes such as "1". The tools causes Unity to freeze for 500ms, which makes it very difficult to modify terrain.

    I profiled the code and it's caused by TerrainFormerEditor.UpdateAllUnmodifiedHeights. As I understand the code, this method does really backup the entire heighmap data of all terrain cells (4096x4096 pixels with my setup), each mouse-click, which results in huge performance and usability issues for me.

    terrainformer_profiler.png

    I changed the code to only copy the parts of the heightmap data which are going to be affected. This brought a huge performance boost (only the first click is slow, where the initial array is being created). The Raise/Lower tool performance then only depends on the size of the affected terrain cells, but not the size of the entire terrain. In the best case, it only updates a single cell which would be 256x256 pixels.

    However, since I'm not familiar with your code, perhaps this change has any side effects, that I didn't notice.
    Code (CSharp):
    1.         private void UpdateAllUnmodifiedHeights() {
    2.             if(allUnmodifiedTerrainHeights == null || allUnmodifiedTerrainHeights.GetLength(1) < heightmapWidth ||
    3.                 allUnmodifiedTerrainHeights.GetLength(0) < heightmapHeight) {
    4.                 allUnmodifiedTerrainHeights = new float[heightmapHeight, heightmapWidth];
    5.  
    6.                 // copy everything on array creation, really slow.
    7.                 for (int x = 0; x < heightmapWidth; x++) {
    8.                     for (int y = 0; y < heightmapHeight; y++) {
    9.                         allUnmodifiedTerrainHeights[y, x] = allTerrainHeights[y, x];
    10.                     }
    11.                 }
    12.             }
    13.  
    14.             // update affected area only, rather than everything.
    15.             // performance depends on brush size, but not the entire combined terrain size.
    16.             if (globalCommandArea != null) {
    17.                 for (int x = 0; x < globalCommandArea.width; x++) {
    18.                     for (int y = 0; y < globalCommandArea.height; y++) {
    19.                         TerrainFormerEditor.allUnmodifiedTerrainHeights[y + globalCommandArea.bottomOffset, x + globalCommandArea.leftOffset] =
    20.                             TerrainFormerEditor.allTerrainHeights[y + globalCommandArea.bottomOffset, x + globalCommandArea.leftOffset];
    21.                     }
    22.                 }
    23.             }
    24.         }
    Can you take a look at such terrain setup/size and see if you can get it to perform well, such as without 500ms freezes?

    3) Every time I select the gameobject with the "Terra Former" Component, Unity freezes for like 15 seconds.

    4) Every time I select the "Paint" tool, Unity freezes for about 15 seconds.

    Again, thanks for such as great tool.
     
    Last edited: Oct 10, 2018
  41. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    In response to point 1: Sure thing, this will be fixed officially in Terrain Former 1.7.5.

    In response to point 2: I am sorry for this performance issue. Note that creating many smaller terrains appears to have much more overhead than using say a 2x2 grid with a higher base resolution. This is one of the core reasons why I've started a partial rewrite which will become Terrain Former 2.0. I will work on optimizing this as much as I can without eating too much into time I could spend on Terrain Former 2.0 instead. Send me an email with your invoice number to my email adress and I will send you an optimized pre-release version of TF v1.7.5 today.

    In regards to points 3 and 4, this is because I have Terrain Former load all heightmap/alphamap samples so they are in memory so there is no wait for them to come from a HDD/SSD. This in retrospect doesn't bring enough good to warrant the stutter - I'm working on adressing this in Terrain Former 2.0.
     
  42. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    Painting along tile boundaries, causes visible seams/artifacts, which are visible in edit- and play-mode. Please see the screenshot below.

    Any idea how to avoid this?

    screenshot.png
     
  43. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Hi Peter.

    I'm also noticing this with a terrain setup like yours. I will work on a fix for this right now and I'll PM you the fixed build in the meantime before the next patch goes live. By the way, Terrain Former 1.7.5 is out now officially to all customers on the Unity Asset Store.

    Edit: It seems what I am noticing is instead an issue with tiling textures not lining up correctly. I am actually not able to reproduce the seam issue you are experiencing. What are your terrain settings? Better yet, could you send me your terrains and scene via a private message?
     
    Last edited: Oct 17, 2018
  44. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Terrain Former 1.7.7 is out now, and it is also currently on sale at the Unity Asset Store!

    Also Terrain Former Lite is on sale, it has also received the same update below.

    1.7.7 - 1st of December, 2018
    Improvements
    • Massive internal refactoring to make sculpting and painting very large terrain grids sufficiently quick.
    • The Smooth and Mould tools now use a seperable gaussian blur kernel, leading up to a 4x speed improvement.
    • All tools now have the same maximum brush speed/strength of 100 (from 2.0 in most tools), but the internal speed mutliplier has been refactored.
    • Maximum Smooth size increased from 11 to 15
    • Smoothing Iterations now applies to realtime sculpting.
    • Smooth All and Mould All has been removed since it will create a lot of complexity to reimplement with the new internal changes.
    • General performance improvements across all tools.
    • Renamed Mould Iterations to Smooth Iterations
    • Importing of heightmaps is now a lot quicker.
    Fixes
    • Target Brush Opacity and the selected texture wasn't been saved across sessions.
    • Fixed an issue where Paint Texture's target opacity feature was not working as intended.
    • Fixed numerous other bugs.
    • No more freezes when first Terrain Former is initialized
    • No more freezes when the Paint Texture tool is selected.
    • Small textures are stretched to in the Paint Texture textures pallette.
     
  45. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    v1.7.9 is out now with many fixes including this time, full support for the new terrain system, including terrain layers. This might be the final version of Terrain Former 1.x since Terrain Former 2.0 is on the horizon with massive speed improvements thanks to GPU sculpting, a new erosion tool and more!

    1.7.9 - 11th of March, 2019
    Improvements:

    - Slightly improved Paint Texture editor dialog to support Terrain Layers properly.
    - Terrain Layer parameters "Normal Scale" and "Mask" are now exposed.
    - Support for mixing different textures in Paint Textures across terrain grids.

    Fixes:
    - Terrain Mismatch finder now checks and handles empty Terrain Layers.
    - Terrain Mismatch finder now accepts mixing of different textures.
    - Full support for Terrain Layers including being able to swap them out.
    - Fixed crash when using terrain layers usage in Unity 2018.3.
    - Fixed errors that occurred when Terrain Layers are null.
    - Fixed incorrect alignment with the brush selection and texture selection grids.
    - Fixed an infinite loop when there is a malformed settings file
     
  46. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    I've created an official Discord server for Terrain Former. I'm eager to hear which features that level designers, world builders, artists and all others are keen on seeing in Terrain Former 2.0. Also, there will be many sneak peeks posted about upcoming features, announcements and more!

    Join the server here: https://discord.gg/TAgVknv
     
  47. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Heads up to all Terrain Former Lite customers, I have deprecated Terrain Former Lite and I will be handing out free upgrades to Terrain Former Lite customers for the next couple of weeks as compensation.

    Terrain Former Lite never made enough business sense, and only really took a very lot of time since it required creating a simple build system, which would then have to be rewritten for the upcoming Terrain Former 2.0.
     
    Don-Gray and Flurgle like this.
  48. maneku

    maneku

    Joined:
    Jun 4, 2017
    Posts:
    5
    Hi @AquaGeneral
    Any news for this new road tool?
     
  49. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Hi @maneku, I do have some intention of creating a toad tool in the future, but it hinges on wether the market demands yet another one (there’s a bunch of them already out there). At the same time I find it interesting working with Bézier curves, plus I think there’s a very big potential for a (hopefully) fully thought-out road tool with the super user friendly way of doing things I have in mind.
     
    maneku likes this.
  50. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Hello everyone!

    After quite a lot of thought, I have decided that Terrain Former 2.0 is not a viable enough product due to the time it has taken, how much more work is still remaining, the competing tools such as the Unity 2019.x terrain tools and other cool tools like Polybrush, and with all these issues standing, I am deciding to cancel Terrain Former 2.0.

    I will, however, be working this week on a big bug fix patch for Terrain Former 1.x that will address every bug and officially support the latest versions of Unity.

    Do bear in mind that Terrain Former is still the best manual terrain sculpting tool prior to Unity 2019.1. It will receive bug fixes for the foreseeable future, but I am not sure if it will receive any new features.

    I'm happy to answer anyone's questions.