Terrain with overhangs

Just had an idea, not sure if it’ll work and haven’t tried it, but I thought I’d run it by you.

I know you can’t rotate a terrain, but you can rotate a camera.

What if you have two terrains and two cameras.

In the first pass you draw camera 1’s view of terrain 1, a normal upright terrain. This terrain is responsible for the top-down viewable terrain parts.

In the second pass you draw camera 2’s view of terrain 2 (keep the depth buffer), rotated 90 degrees so that you see terrain 2 as if it were vertical. You then use terrain 2 to model the sides of overhanging terrain parts. The two terrains intersect/overlap to create a seamless appearance.

Limitations I can think of… the vertical terrain only lets you have a one-sided view unless you use a two-sided terrain shader. Also the vertical terrain would limit you to one surface, so you couldn’t have a chasm with two sides without adding more terrains.

Um, and you wouldn’t want to put trees or grass on the vertical terrain cus they’d be sideways :stuck_out_tongue_winking_eye:

Just a thought.

The impact on the performance of that approach would be massive and ugly hard to design at all

You better use a voxel terrain editor and let it create a mesh for you, thats more likely going to work out fine.