Question: Cutting hole in Terrain?

Hello All,

I’ve been looking into way to create a tunnel for a project in Unity. Bassically I want to create a tunnel through a small hill in the terrain. And I’ve run into a dead end with everything I’ve tried.

What would be the best way to accomplish this? Would I need to make the whole thing a model somehow in (God forbid) a program like Blender? Goodness only know how I would go about making a hill in that thing or maybe a little better SketchUp at least I know how to texture items in that program (well sometimes it works).

And advice is greatly appreciated?

Thanking you in advance.

1 Like

It isn’t possible with Unity terrain. You need to model it yourself or use a third party terrain system. The Unity terrain is simply height based. No overhangs or holes or anything like that.

1 Like

Hi.

Maybe you can fake it with a fade/load screen when you cross the entrance/exit of the tunnel ?

1 Like

Thanks for your reply. I wasn’t sure of the capabilities of Unity’s Terrain system so thanks greatly for explaining it to me :sunglasses:.

I forgot to mention it was for a car racing game so it would only be a smallish tunnel, not something I could use to load another scene. But that could be a good idea for when I get back to other projects like the RPG and FPS I have going on. Thanks for the tip! :smile:.

No prob.

You could also mix unity terrain with a model of the hill with the tunnel on top of the terrain(the terrain is flat in that area and you drop the hill on top). But maybe it’s difficult making it seamless .

Yep - that’s exactly what I’ve been working on :sunglasses:. I managed to find a hill mesh so it’s not fully solid and then getting a model of a tunnel and using that to cut a hole in the hill mesh in SketchUp - and like you said putting it on a flat surface of the terrain. And then adding the terrain grass and normals to a material and adding to the hill the hill after being imported. It’s not as bad as I thought it would be especially after adding the material and messing with the settings. Unfortunately there are some points where the mesh drops to the level of the tunnel causing some unpleasantries, but, I don’t know how to make my own meshes in a modelling program, so, I’ll live with it :sunglasses:.

1 Like

Try putting a trigger at the cave entrance that disables terrain collision (or car collider) as the car runs into the hill so it passes through. Reenable it once it passes through. Put the tunnel just inside. Paint a hole on the terrain at the cave entrance. Fake the transition with camerawork. Have not tried this, but it might work.

Can honestly say I never thought of that :p. That would be interesting to try out though!