├── .gitattributes ├── .gitignore ├── LICENSE.md └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds//AssetStoreTools* 6 | 7 | # Visual Studio cache directory 8 | .vs/ 9 | 10 | # Autogenerated VS/MD/Consulo solution and project files 11 | ExportedObj/ 12 | .consulo/ 13 | *.csproj 14 | *.unityproj 15 | *.sln 16 | *.suo 17 | *.tmp 18 | *.user 19 | *.userprefs 20 | *.pidb 21 | *.booproj 22 | *.svd 23 | *.pdb 24 | *.opendb 25 | *.VC.db 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | *.pdb.meta 30 | 31 | # Unity3D Generated File On Crash Reports 32 | sysinfo.txt 33 | 34 | # Builds 35 | *.apk 36 | 37 | *.meta 38 | 39 | Backup 40 | World Creator 41 | ProjectSettings 42 | Logs 43 | Packages 44 | 45 | Assets/TerrainTools Demo 46 | Assets/WorldCreatorSyncTool 47 | Assets/TerrainToolSamples 48 | 49 | *.unitypackage 50 | Documentation 51 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | 2 | Dual License: 3 | 4 | ------------------------------------------------------------------------------------------------------------------------ 5 | 6 | MIT LICENSE 7 | 8 | Copyright 2019 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | ------------------------------------------------------------------------------------------------------------------------ 17 | 18 | This is based on the work of Unity, that way the license is the same as the original TerrainToolSamples license. Please be aware that Unity is in no way affiliated with this project! 19 | 20 | Original license from 21 | https://github.com/Unity-Technologies/TerrainToolSamples/blob/master/LICENSE.md 22 | 23 | ------------------------------------------------------------------------------------------------------------------------ 24 | 25 | UNITY COMPANION LICENSE 26 | 27 | PathPaintTool copyright © 2019 Unity Technologies ApS 28 | 29 | Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). 30 | 31 | Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ## **Path Paint Tool** 5 | 6 | The Path Paint Tool is a free and Open Source extension for the Unity Terrain Tools. It is a Path Painter which allows you to modify the Unity terrain in order to create paths, roads, river and lake beds, mountain advances and so on. 7 | 8 | 9 | ## Introduction 10 | 11 | Let's see in a video how it looks like in action, please click on the picture to see the video on youtube: 12 | 13 | [![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/K_XxgpzNZxc/0.jpg)](https://www.youtube.com/watch?v=K_XxgpzNZxc) 14 | 15 | ## Requirements and Supported Unity Versions 16 | 17 | + [2018.3+](https://github.com/Roland09/PathPaintTool/tree/unity-2018.3) 18 | + [2019.2+](https://github.com/Roland09/PathPaintTool/tree/unity-2019.2) 19 | + [2019.3+](https://github.com/Roland09/PathPaintTool/tree/unity-2019.3) 20 | 21 | ## Quick Setup 22 | 23 | * create a new Unity project 24 | * download and import PathPaintTool-Demo.unitypackage from here: 25 | 26 | http://bit.ly/PathPaintTool 27 | 28 | * update the code using the latest version from github, choose the branch depending on your version of Unity: 29 | + [2018.3](https://github.com/Roland09/PathPaintTool/tree/unity-2018.3) 30 | + [2019.2](https://github.com/Roland09/PathPaintTool/tree/unity-2019.2) 31 | + [2019.3](https://github.com/Roland09/PathPaintTool/tree/unity-2019.3) 32 | * open the demo scene TerrainToolsDemo/Scenes/Rocky Green Plateaus 33 | * select a terrain (it's multi-tile terrain for your checking-this-out preferences :-) 34 | * click the *Paint Terrain* menu button in the terrain inspector and select *Path Paint Tool* 35 | 36 | Have Fun :-) 37 | 38 | This is to get you started quickly. Delta updates of the code will be committed to this GitHub repository. Just replace the PathPaintTool folder with the latest commit if you get the latest version. 39 | 40 | ## Features 41 | - Supported Terrain Tools: 42 | Any combination of Paint, Bridge, Smooth, Ridge Erosion, Smudge. 43 | 44 | - Various Paint Modes 45 | 46 | * Paint Brush: Paint by dragging the mouse 47 | * Stroke: Create strokes by placing an anchor point and subsequently create strokes from the previous anchor point. 48 | * Automatic Waypoint creation and Spline manipulation are in development 49 | 50 | - Create paths, roads, plateaus, ramps, lake and river beds, mountain spurs 51 | 52 | - Multi Tile Terrain 53 | 54 | - Unity 2018+ and 2019+ Support 55 | 56 | - Vegetation Studio and Vegetation Studio Pro Support 57 | 58 | - Open Source, **FREE** for everyone, no DLL 59 | 60 | 61 | ## Integrations 62 | 63 | - Vegeation Studio 64 | - Vegetation Studio Pro 65 | 66 | For Vegetation Studio and Vegetation Studio Pro I recommend to use the include and exclude terrain texture rules. 67 | 68 | ## The Idea 69 | 70 | 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 varions Terrain Tools in 1 paint stroke. I still have to find the "golden settings" which work for everything, but I guess that's a not so easy task to accomplish. Sometimes you want smoothing, sometimes ridged erosion. So currently - until some feedback is gathered the advanced mode with full flexibility and all the settings available is the one to go. 71 | 72 | So the basic idea is this: 73 | 74 | Have multiple brushes overlapping, e. g.: 75 | 76 | * inner brush: texture tool 77 | * middle brush: bridge tool 78 | * outer brush: smooth tool 79 | 80 | To better visualize it, looks like this: 81 | 82 | ![Example](https://user-images.githubusercontent.com/10963432/52947668-af7f6f80-3377-11e9-9d8b-44228f558d73.jpg) 83 | 84 | The yellow circle is the Paint Texture brush, the blue one is the Bridge tool, the grey one is the Smooth tool. There are others optionally available. All of the tools are applied in sequence. To the left in the screenshot is the brush itself, the right disc is the anchor point from where a stroke is painted to the brush location. This is the Stroke paint mode. There is also the Paint Brush mode. At one point the Stroke mode is better suited, at another point the Brush paint mode. Stroke mode is e. g. preferred for longer distances, to paint a path along a mountain side. Or from top of a region to the bottom of a region. I'll create presets depending on feedback. 85 | 86 | As of the time of writing this readme file, the inspector looks like this: 87 | 88 | ![Inspector](https://user-images.githubusercontent.com/10963432/52947677-b4442380-3377-11e9-85ae-eaa610b01cfe.jpg) 89 | 90 | The result is a Path Paint Tool which you can see here animated: 91 | 92 | ![Demo](https://user-images.githubusercontent.com/10963432/52947682-b6a67d80-3377-11e9-81e5-8cb228cded1f.gif) 93 | 94 | So creating e. g. a motocross track was a matter of a minute: 95 | 96 | ![FinalScene](https://user-images.githubusercontent.com/10963432/52947688-bd34f500-3377-11e9-95e3-ccb66971cc20.jpg) 97 | 98 | Or here's multi-tile support (the orange line is the split line) in action, including Vegetation Studio Pro grass removal: 99 | 100 | ![MultiTile](https://user-images.githubusercontent.com/10963432/52947920-5f54dd00-3378-11e9-8a43-33c1003f1b2a.gif) 101 | 102 | Here is Vegetation Studio grass and tree removal in action: 103 | 104 | ![VsPro](https://user-images.githubusercontent.com/10963432/52947693-c32ad600-3377-11e9-96d9-3640a6b7488d.gif) 105 | 106 | Mountain advancement 107 | 108 | ![MountainAdvancement](https://user-images.githubusercontent.com/10963432/52947699-c8882080-3377-11e9-9e00-3487d493c0b8.gif) 109 | 110 | 111 | ## Notes 112 | 113 | The demo unitypackage is provided to get you started with a tiled and textured terrain. Future updates will be done on the code alone. 114 | 115 | ## Important 116 | 117 | The Undo feature is currently in development and not fully woring. Please backup your terrain before you start modifying it. 118 | 119 | Credits 120 | ------------------------------------- 121 | 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. 122 | 123 | Demo Scene: 124 | 125 | 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. 126 | 127 | The textures for the terrain after importing into Unity are Creative Common textures which are freely available and can be used without restriction. 128 | 129 | Credit to these providers: 130 | 131 | * CC0 Textures 132 | 133 | [https://cc0textures.com](https://cc0textures.com) 134 | 135 | * cgbookcase 136 | 137 | [https://www.cgbookcase.com](https://www.cgbookcase.com) 138 | 139 | ## Roadmap 140 | 141 | * Terrain Backup & Restore, Undo Operation 142 | * Automatic Waypoint finder and shaping the terrain 143 | * Spline creation, Spline saving and flexible adjustment 144 | * Embankment 145 | * Substance Support 146 | * Additional Terrain Tool support 147 | * Presets & Quick Access Settings 148 | 149 | --------------------------------------------------------------------------------