Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-09-28 20:14:13 +0300
committerHans Goudey <h.goudey@me.com>2021-09-28 20:14:13 +0300
commit262b2118565826177133013c324212c66d882456 (patch)
tree0be55bc95b3c79c712642aa6157f194baf54785a /source/blender/blenkernel
parent797064544ea3e176c511f7ff7c1303498a783182 (diff)
Geometry Nodes: Mesh Point Cloud Conversion Nodes
This commit adds nodes to do direct conversion between meshes and point clouds in geometry nodes. The conversion from mesh to points is helpful to instance once per face, or once per edge, which was previously only possibly with ugly work-arounds. Fields can be evaluated on the mesh to pass them to the points with the attribute capture node. The other conversion, point cloud to mesh vertices, is a bit less obvious, though it is still a common request from users. It's helpful for flexibility when passing data around, better visualization in the viewport (and in the future, cycles), and the simplicity of points. This is a step towards T91754, where point clouds are currently combined with meshes when outputing to the next modifier after geometry nodes. Since we're removing the implicit behavior for realizing instances, it feels natural to use an explicit node to convert points to vertices too. Differential Revision: https://developer.blender.org/D12657
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_node.h2
-rw-r--r--source/blender/blenkernel/intern/node.cc2
2 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 16d4eb51d31..70700246d29 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -1503,6 +1503,8 @@ int ntreeTexExecTree(struct bNodeTree *ntree,
#define GEO_NODE_DISTRIBUTE_POINTS_ON_FACES 1090
#define GEO_NODE_STRING_TO_CURVES 1091
#define GEO_NODE_INSTANCE_ON_POINTS 1092
+#define GEO_NODE_MESH_TO_POINTS 1093
+#define GEO_NODE_POINTS_TO_VERTICES 1094
/** \} */
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index c8ba7991f31..8a6f1471ddb 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -5778,6 +5778,7 @@ static void registerGeometryNodes()
register_node_type_geo_mesh_primitive_uv_sphere();
register_node_type_geo_mesh_subdivide();
register_node_type_geo_mesh_to_curve();
+ register_node_type_geo_mesh_to_points();
register_node_type_geo_object_info();
register_node_type_geo_point_distribute();
register_node_type_geo_point_instance();
@@ -5785,6 +5786,7 @@ static void registerGeometryNodes()
register_node_type_geo_point_scale();
register_node_type_geo_point_separate();
register_node_type_geo_point_translate();
+ register_node_type_geo_points_to_vertices();
register_node_type_geo_points_to_volume();
register_node_type_geo_raycast();
register_node_type_geo_realize_instances();