diff options
author | Hans Goudey <h.goudey@me.com> | 2022-01-25 19:51:52 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2022-04-11 01:28:39 +0300 |
commit | 9d385a00399b0bbfbc5cde33d75ff336fd9b6f6c (patch) | |
tree | 1d3deffd12f679c236db95f7f84580a83115b39b /source/blender/blenkernel/intern/node.cc | |
parent | 5dab7ea3b64659f75a8895244ea108167d946ccb (diff) |
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
Diffstat (limited to 'source/blender/blenkernel/intern/node.cc')
-rw-r--r-- | source/blender/blenkernel/intern/node.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index 626aa503f42..ea6186cbbc2 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -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(); |