Quick tips: Z's Geometry Nodes Cookbook

Merge by Index



The merge by distance node is limited. It allows you to limit the merging to a selection, but doesn’t let you choose exactly what gets merged with what. This setup allows you to input an index instead. Points with the same index will be merged, and points with different indices will be ignored, regardless of location. This gives you a lot of control over merging, letting you weld islands that are touching, without accidentally fusing them together.

First, capture the position attribute. Set the position of each point to the index, and merge by distance. Set the position back to the original position.

Usage:


There are a lot of advanced index math techniques, but to reproduce the result above, simply capture the indices of both meshes before joining, and add them together. Merge the points using this as the index.

5 Likes