2
\$\begingroup\$

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?

\$\endgroup\$
  • \$\begingroup\$ Why not use one mesh matrix for the floor and one for the ceiling? \$\endgroup\$ – wolfdawn Jan 30 '14 at 17:24
  • \$\begingroup\$ Maybe it's just that I'm that slow, but I really don't imagine what you're trying to point right there. \$\endgroup\$ – Iridium616 Jan 30 '14 at 17:37
  • \$\begingroup\$ I was wrong. The most recommended way is using Blender. \$\endgroup\$ – wolfdawn Jan 30 '14 at 17:46
  • 2
    \$\begingroup\$ Unity terrain is heightmap based, which fundamentally cannot support overhangs (such as caves and arches). This isn't really possible without making the roof from some other mesh. Unity Terrain was never "intended" to make caves and such. In fact, like all heightmap systems, it doesn't even do cliffs very well. \$\endgroup\$ – user41442 Jan 30 '14 at 17:52
  • 1
    \$\begingroup\$ I never used it, but Robert Yang once posted a possible solution for this on his blog. Maybe that works? \$\endgroup\$ – xeophin Jan 31 '14 at 7:42
2
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.