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
This commit is contained in:
Victor-Louis De Gusseme
2021-09-20 18:39:39 -05:00
committed by Hans Goudey
parent 13a4bccdb1
commit 05f3f11d55
9 changed files with 433 additions and 0 deletions

View File

@@ -503,6 +503,7 @@ geometry_node_categories = [
NodeItem("GeometryNodeAttributeRemove", poll=geometry_nodes_fields_legacy_poll),
NodeItem("GeometryNodeAttributeCapture", poll=geometry_nodes_fields_poll),
NodeItem("GeometryNodeAttributeStatistic", poll=geometry_nodes_fields_poll),
]),
GeometryNodeCategory("GEO_COLOR", "Color", items=[
NodeItem("ShaderNodeMixRGB"),