Search Unity

[FREE] Terrain Tools 3 Mixer (Open Source, GitHub)

Discussion in 'Assets and Asset Store' started by Rowlan, Jul 19, 2021.

  1. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    Terrain Tools 3 Mixer

    Mixer for Unity's Terrain Tools 3 is a free and Open Source extension for the Unity Terrain Tools version 3. You can stack and order the provided tools via drag & drop and change the size and opacity of the brushes quickly. During painting the tool stack is painted one after the other.

    That way you can create an arbitrary order and use the tool as a road painter, path painter, river and lake bed painter, mountain andvances and so on.

    This is an update to its predecessor Path Paint Tool which supports now Unity 2021+. The name got changed to "Mixer" because it'll become more over time with Unity's addition of more Terrain Tools like Terrace, Thermal and Hydraulic Erosion, Twist and even with their awesome filters for Noise.


    Introduction

    Let's see in a video how it looks like in action, please click on the picture to see the video on youtube. In the example I use the Mixer for creating a path from scratch for a bike driving scene:




    Installation

    In Unity 2020+ or 2021+ open package manager and install via git url:

    https://github.com/Roland09/TerrainTools3Mixer.git?path=/Assets/TerrainTools/Mixer

    Additionally you can download this free unity package which includes a Demo Terrain with Textures (see credits) in order to get you started quickly:

    https://bit.ly/DemoTerrain

    For older Unity versions I recommend Path Paint Tool.


    Requirements

    • Unity 2020+ and Unity 2021.1 ... support for Unity's experimental version of their terrain tools
    • Unity 2021.2 ... support for Unity's release version of their terrain tools

    Changes compared to Path Paint Tool

    The code was adapted to work with Unity 2020+ and 2021+.

    The UI has become more compact. The individual Terrain Tools are quickly accessible and the Brush Size and Opacity can be quickly compared and changed.

    To the right of the Terrain Tool Name is the slider for the brush size and next to it is the slider for the brush opacity, i. e. strength. Those values are relative to the overall Brush Size and Strength.

    Example:

    mixer-ui.gif


    Features

    Various features are implemented, most notably:
    • Supported Terrain Tools

      Any combination of Paint, Path, Smooth, Ridge Erosion, Smudge, Underlay

    • Various Paint Modes
    • Paint Brush: Paint by dragging the mouse
    • Stroke: Create strokes by placing an anchor point and subsequently create strokes from the previous anchor points.
    • Automatic Waypoint creation and Spline manipulation are in development and will be implemented as soon as Unity releases their Spline Package
    • Create roads, paths, plateaus, ramps, lake and river beds, mountain spurs, ...

    • Multi Tile Terrain

    • Unity 2021.1 and 2021.2+ Support

    • Vegetation Studio Pro Support

    • Open Source, **FREE** for everyone, no DLL
    Integrations

    Integrations which can be used for worklfow automatization
    • Vegetation Studio Pro

      For Vegetation Studio Pro I recommend to use the include and exclude terrain texture rules for automatic vegetation placement.


    The Idea

    Unity created and provided various tools for terrain manipulation for free. When I studied them I figured that it would make sense to combine them. So I tried and implemented a quick tool which combines various Terrain Tools in 1 paint stroke.

    So the basic idea is to have multiple brushes overlapping, e. g.:
    • inner brush: texture tool
    • middle brush: path tool
    • outer brush: smooth tool

    Examples

    Multi-Tile Terrain Road & Path Painting

    pathpainttool-motocross-track.gif

    motocross-track.jpg


    Vegetation Studio Pro Integration

    multi-tile-with-vspro.gif

    Underlay Paint for e. g. River Beds

    underlay-paint.gif

    Another use case in a video:




    Notes

    The demo unitypackage is provided to get you started with a tiled and textured terrain.


    Credits

    Full credit and a BIG THANK YOU(!!!) to the very skilled and most awesome developers at Unity who provided the Terrain Tool Samples for free for the community.

    Demo Scene:

    World Creator 2 with which the creation of the demo terrain was possible within minutes. Most of all thank you to Yanik for providing the base terrain.

    The textures for the terrain after importing into Unity are Creative Common textures which are freely available and can be used without restriction.

    Credit to these providers:

    Roadmap

    * Integrate the upcoming Terrain Tools 4
    * Automatic Waypoint finder and shaping the terrain
    * Spline creation, Spline saving and flexible adjustment
    * Additional Terrain Tool support
    * Presets & Quick Access Settings
    * Paint and remove terrain details using Unity's detail painter
    * ...
     
  2. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    Just to show what's coming in the future with the Terrain Tools 4: You can add jitter and noise which gives some very useful modifications, e. g. here's a simple star brush used with the Path Tool which jitters during painting and in that way also modifies the mountain edges:

    js.gif

    I'll add that to Mixer once the Terrain Tools 4 come out of preview. For now, if anyone is interested in that, feel free to check out this path tool core thread.
     
    wyattt_ and Minzie like this.
  3. Minzie

    Minzie

    Joined:
    Jul 26, 2019
    Posts:
    77
    Awesome! Thanks a lot for providing this for free. Btw, is it possible to have "grab" or "pinch" tool so that we can make cliff/ overhang easily?
     
    TerraUnity, wyattt_ and Rowlan like this.
  4. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    The heightmap is just a 2d image in the end, for cliffs and overhangs you'd need dedicated tools that create a mesh. Sebastian Lague has a free solution for that.
     
    wyattt_ likes this.
  5. Minzie

    Minzie

    Joined:
    Jul 26, 2019
    Posts:
    77
    Thanks for sharing I shall look into that. :)

    Sorry to bother you, but could you help on how to install it? I inserted the above link into package manager & I got error as below:
    upload_2021-7-20_3-55-46.png
     
    Rowlan likes this.
  6. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    Which Unity version are you using exactly? eg in Unity 2020.3.12f1 you should use this option:

    upload_2021-7-19_22-51-26.png

    Alternatively there's always the manual way. Just go to the GitHub page, click the green Code button, click "Download ZIP"

    dl.png

    and extract the TerrainTools folder of the zip file into your project's Assets folder.
     
    wyattt_ likes this.
  7. Minzie

    Minzie

    Joined:
    Jul 26, 2019
    Posts:
    77
    Thank you! :)
     
    Rowlan likes this.
  8. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Great tool, Thanks for making it available to us!
     
    wyattt_ and Rowlan like this.
  9. Ereroa

    Ereroa

    Joined:
    Apr 27, 2017
    Posts:
    10
    I can't wait for spline integration. I have been trying to make Path Painter tool to work with my spline but the result isn't that great.

    Would love to have a tool that just takes a bezier curve as input and draw that path on top of the terrain so I can choose parameters and carve and paint over it.


    upload_2021-12-7_9-33-55.png
     
  10. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    You could e. g. use the technique I used here:

    https://forum.unity.com/threads/wow-terrain-projection-is-super-fast.1005583

    Basically it's a separate bitmap. On that bitmap you paint the spline by iterating along in steps and connect the steps using e. g. a simple Bresenham algorithm. Then you blend the bitmap on the heightmap of the terrain. Embankment could be achieved by e. g. blurring. Or you could use Unity's own Spline Tools (see their examples), have the road mesh created and blend that on the terrain.

    That being said, all effort might be a waste of time tomorrow if Unity announces either the support of that for the terrain tools or better yet they announce the new Environment System.
     
    Ereroa likes this.
  11. Ereroa

    Ereroa

    Joined:
    Apr 27, 2017
    Posts:
    10

    That seems like exactly what I needed thank you for that.
     
  12. stetsmando

    stetsmando

    Joined:
    Jun 2, 2015
    Posts:
    1
    @Rowlan you're a champion. I appreciate you making this tool free and open source. Keep up your great work.
     
    wyattt_ and Rowlan like this.
  13. jubaerjams8548

    jubaerjams8548

    Joined:
    Jun 8, 2020
    Posts:
    41
    Can U please attach a license on github repo like MIT?
     
  14. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
  15. jubaerjams8548

    jubaerjams8548

    Joined:
    Jun 8, 2020
    Posts:
    41
    Rowlan can u do anything for the old problem "terrain texture streching" i.e when raising cliffs and mountains ...the textures get streched and looks weird ...., Thanks a Lot)
     
  16. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    Either use a mesh for that or a shader that supports triplanar UVs.
     
  17. jubaerjams8548

    jubaerjams8548

    Joined:
    Jun 8, 2020
    Posts:
    41
    cant triplanar feature be added on your terrain height blend shader on github?
     
  18. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    No. That's part of the material of the terrain.
     
  19. Alimohammadlo

    Alimohammadlo

    Joined:
    Jun 20, 2017
    Posts:
    16
    can you add tools for scale system for terrain i mean i scaling entire all objects in scene include terrains
     
  20. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    I moved on to more efficient things than the Unity Terrain Tools ;)









     
    TerraUnity likes this.