0
$\begingroup$

I have two terrain meshes separated by a long gap. I need to fill the gap. The two sides do NOT have the same number of vertices; the vertices are not always aligned with a mate on the other side. However, the vertices along each side are perfectly aligned along the axis running the length of the gap.

straight gap separating two triangulated meshes with points at various heights

looking down the gap to see some aligned elevation, some not

I tried selecting all verts on both sides, adding a single face (with 423 edges), and then triangulating the face. The algorithms for triangulation unfortunately produce results that do not connect the shortest spots across the gap. For example, there's obviously a mountain ridge here that should connect right across.

mountain ridge that does not connect, 1 mountain ridge that does not connect, 2

Other than manually creating hundreds of edges, can you think of a technique to automate this? (There are other gaps besides this one I need to bridge.) The algorithm, I think, would be for each vertex on one edge to connect to the closest vertex on the opposite edge.

$\endgroup$

1 Answer 1

2
$\begingroup$

Extrude the edges out from one of the edges of the terrain mesh.

enter image description here

Right click to just leave them in place. Then Ctrl+G > Add to New Vertex Group.

enter image description here

Then add a Shrinkwrap modifier, set it to Nearest Vertex and use the vertex group as the mask for that mod.

Result:

enter image description here

You might need to add some vertices where needed to get the two sides to match 1:1.

Without verts: enter image description here

New verts + edges: enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .