How can I make caves with Unity’s terrain creator?
With Unity's terrain creator, I can't simply make a "hole" on the mesh. I don't know how I would make cave-like structures other than using "rock" meshes for the roof (wich will indeed look weird) or using portals (wich I always have problems with -- the teleportation isn't thruly smooth and there's always a small "jump". You know, not like a fluid thing. How can I make caves in terrain with Unity?
Starting from Unity 2019.3, you can properly cut holes in terrain surface (see https://blogs.unity3d.com/2019/08/27/unity-2019-3-beta-is-now-available/#attachment_82836)
However, this won’t create the cave mesh for you.
If you are looking for a terrain hole system that creates meshes automatically you may want to use a plugin like this one: https://assetstore.unity.com/packages/tools/terrain/digger-terrain-caves-overhangs-135178
You can’t make a cave in Unity’s terrain system natively because it uses a 2d heightmap, where each point can only have one height.
This allows for some major optimizations (and a radically different approach) compared to a system that allows for 3D height definition.
But there is an easy work around that AAA games have used (including certain CryENGINE games). Simply make a hole in the terrain and place a mesh representing the cave.
There are different approaches to making holes in a terrain like Unity’s. I like the approach taken here for being robust and easy to modify.
- Database Administration Tutorials
- Programming Tutorials & IT News
- Linux & DevOps World
- Entertainment & General News
- Games & eSport