EDIT: added instructions for using Nav Mesh Modifiers - a life saver!
I ended up installing two packages from the package manager and really liking the improved experience. I recommend folks try it if you’re struggling with getting the terrain to do what you want it to do.
The first Is the Terrain Tools
Note the install process is a bit different version to version of Unity. There’s a guide here from Unity depending on the version of Unity you’re using. There’s a little drop down where you can select the version of Unity you have.
In general I’m really loving the improved usability and I’m only using maybe 2% of what comes with it.
A short list of stuff that I like in it
- Additional brushes become available - I like the effects/slope flatten tool to smoothen out rough or awkward discontinuities in my fast and loose terrain.
- You can save and load terrain palettes so you don’t have to redo your layers
- you can import and export “splatmaps” which are basically a texture map that represents what your layers (grass, rock, etc) are
The second is the NavMeshModifiers.
I found it WAY too awkward to try and craft terrain at just the right height and slope that it becomes an obstacle for nav mesh agents but not so high that it blocks the camera. The NavMesh Building components did the trick. Again installation may vary depending on what version of unity you have. The setup is not obvious.
- Install the AI Navigation package by Name (com.unity.ai.navigation)
- Add a NavMeshSurface component to your terrain. This is where you’ll bake your terrains from now on.
- Clear the previously baked terrain from the Navigation Tab.
- Create an empty game object as a child of your terrain. I called it NavMeshModifier
- Create additional empty child objects to the NavMeshModifier object – for each one of these leaf node children attach a NavMeshModifierVolume component. Size and place this component whereever you like and mark the area as “Not Walkable”
- Go to you Terrain object again and in the inspector go to that NavMeshSurface component and hit bake. You will now see a navmesh surface that is exactly what you like with no more fiddling of the terrain slopes and heights and parameters. So easy once you get the setup!
Some questions I had
- I saw Rick had additional brushes that I didn’t have. I really liked the effects of his brushes. Are those available anywhere or do I have to custom design brushes if I want to create the effects Rick had?
- What settings are folks using for their tree shaders? When I use “paint trees” I get warnings from Unity to switch my shader to a soft nature shader (or something like that) but I really don’t like the effects.