Geometry Nodes: Initial merge by distance node
This implements a merge by distance operation for point clouds. Besides the geometry input, there are two others-- a selection input to limit the operation to certain points, and the merge distance. While it would be a reasonable feature, the distance does not support a field currently, since that would make the algorithm significantly more complex. All attributes are merged to the merged points, with the values mixed together. This same generic method is used for all attributes, including `position`. The `id` attribute uses the value from the first merged index for each point. For the implementation, most of the effort goes into creating a merge map to speed up attribute mixing. Some parts are inherently single-threaded, like finding the final indices accounting for the merged points. By far most of the time is spend balancing the KD tree. Mesh support will be added in the next commit. Differential Revision: https://developer.blender.org/D13649
This commit is contained in:
@@ -1523,6 +1523,7 @@ struct TexResult;
|
||||
#define GEO_NODE_FLIP_FACES 1150
|
||||
#define GEO_NODE_SCALE_ELEMENTS 1151
|
||||
#define GEO_NODE_EXTRUDE_MESH 1152
|
||||
#define GEO_NODE_MERGE_BY_DISTANCE 1153
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
@@ -4802,6 +4802,7 @@ static void registerGeometryNodes()
|
||||
register_node_type_geo_join_geometry();
|
||||
register_node_type_geo_material_replace();
|
||||
register_node_type_geo_material_selection();
|
||||
register_node_type_geo_merge_by_distance();
|
||||
register_node_type_geo_mesh_primitive_circle();
|
||||
register_node_type_geo_mesh_primitive_cone();
|
||||
register_node_type_geo_mesh_primitive_cube();
|
||||
|
||||
Reference in New Issue
Block a user