diff options
author | Victor-Louis De Gusseme <victorlouis> | 2021-09-21 02:39:39 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-09-21 02:39:39 +0300 |
commit | 05f3f11d553e97f27fc88b1dada9387acdb768a6 (patch) | |
tree | 0826726565b83168598ab5e4c88501ee66f435c0 /source/blender/blenkernel | |
parent | 13a4bccdb196770b4f357c2a3c312bd4629ecb36 (diff) |
Geometry Nodes: Attribute Statistic Node
This nodes evaluates a field on a geometry and outputs various
statistics about the entire data set, like min, max, or even
the standard deviation. It works for float and vector types currently,
though more types could be supported in the future.
- All statistics are calculated element-wise for vectors.
- "Product" was not added since the result could very easily overflow.
- The "Size" output was not added since it isn't specific to an
attribute and would fit better in another node.
The implementation shares work as much as possible when multiple
statistics are needed.
This node has been in development since the beginning of this year,
with additions from Johnny Matthews and Hans Goudey.
Differential Revision: https://developer.blender.org/D10202
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/node.cc | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 8e82ab6d6be..45ce843ef78 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -1494,6 +1494,7 @@ int ntreeTexExecTree(struct bNodeTree *ntree, #define GEO_NODE_MATERIAL_SELECTION 1081 #define GEO_NODE_MATERIAL_ASSIGN 1082 #define GEO_NODE_REALIZE_INSTANCES 1083 +#define GEO_NODE_ATTRIBUTE_STATISTIC 1084 /** \} */ diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index 3a76cbf6f84..7d679cfd076 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -5175,6 +5175,7 @@ static void registerGeometryNodes() register_node_type_geo_attribute_randomize(); register_node_type_geo_attribute_remove(); register_node_type_geo_attribute_separate_xyz(); + register_node_type_geo_attribute_statistic(); register_node_type_geo_attribute_transfer(); register_node_type_geo_attribute_vector_math(); register_node_type_geo_attribute_vector_rotate(); |