Geometry Nodes: initial scattering and geometry nodes
authorJacques Lucke <jacques@blender.org>
Wed, 2 Dec 2020 12:25:25 +0000 (13:25 +0100)
committerJacques Lucke <jacques@blender.org>
Wed, 2 Dec 2020 14:38:47 +0000 (15:38 +0100)
commit6be56c13e96048cbc494ba5473a8deaf2cf5a6f8
tree83435d439b3d106eb1405b2b815bf1d5aa1fdd43
parentddbe3274eff68523547bc8eb70dd95c3d411b89b
Geometry Nodes: initial scattering and geometry nodes

This is the initial merge from the geometry-nodes branch.
Nodes:
* Attribute Math
* Boolean
* Edge Split
* Float Compare
* Object Info
* Point Distribute
* Point Instance
* Random Attribute
* Random Float
* Subdivision Surface
* Transform
* Triangulate

It includes the initial evaluation of geometry node groups in the Geometry Nodes modifier.

Notes on the Generic attribute access API

The API adds an indirection for attribute access. That has the following benefits:
* Most code does not have to care about how an attribute is stored internally.
  This is mainly necessary, because we have to deal with "legacy" attributes
  such as vertex weights and attributes that are embedded into other structs
  such as vertex positions.
* When reading from an attribute, we generally don't care what domain the
  attribute is stored on. So we want to abstract away the interpolation that
  that adapts attributes from one domain to another domain (this is not
  actually implemented yet).

Other possible improvements for later iterations include:
* Actually implement interpolation between domains.
* Don't use inheritance for the different attribute types. A single class for read
  access and one for write access might be enough, because we know all the ways
  in which attributes are stored internally. We don't want more different internal
  structures in the future. On the contrary, ideally we can consolidate the different
  storage formats in the future to reduce the need for this indirection.
* Remove the need for heap allocations when creating attribute accessors.

It includes commits from:
* Dalai Felinto
* Hans Goudey
* Jacques Lucke
* Léo Depoix
103 files changed:
release/scripts/startup/bl_operators/__init__.py
release/scripts/startup/bl_operators/geometry_nodes.py [new file with mode: 0644]
release/scripts/startup/bl_operators/simulation.py [deleted file]
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/nodeitems_builtins.py
source/blender/blenkernel/BKE_attribute.h
source/blender/blenkernel/BKE_attribute_access.hh [new file with mode: 0644]
source/blender/blenkernel/BKE_geometry_set.h [new file with mode: 0644]
source/blender/blenkernel/BKE_geometry_set.hh [new file with mode: 0644]
source/blender/blenkernel/BKE_modifier.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_pointcloud.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/attribute.c
source/blender/blenkernel/intern/attribute_access.cc [new file with mode: 0644]
source/blender/blenkernel/intern/fluid.c
source/blender/blenkernel/intern/geometry_set.cc [new file with mode: 0644]
source/blender/blenkernel/intern/hair.c
source/blender/blenkernel/intern/lib_remap.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/object_dupli.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/pointcloud.cc
source/blender/blenkernel/intern/simulation.cc
source/blender/blenlib/BLI_rand.h
source/blender/blenlib/BLI_rand.hh
source/blender/blenlib/BLI_user_counter.hh [new file with mode: 0644]
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/intern/rand.cc
source/blender/blenloader/intern/versioning_290.c
source/blender/depsgraph/CMakeLists.txt
source/blender/depsgraph/DEG_depsgraph_build.h
source/blender/depsgraph/intern/depsgraph_build.cc
source/blender/editors/include/ED_node.h
source/blender/editors/object/object_modifier.c
source/blender/editors/space_node/CMakeLists.txt
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_group.c
source/blender/editors/space_node/node_relationships.c
source/blender/editors/space_node/space_node.c
source/blender/functions/CMakeLists.txt
source/blender/functions/FN_generic_value_map.hh [new file with mode: 0644]
source/blender/functions/FN_multi_function.hh
source/blender/makesdna/DNA_modifier_defaults.h
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesdna/DNA_node_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/intern/dna_defaults.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_attribute.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_space.c
source/blender/modifiers/CMakeLists.txt
source/blender/modifiers/MOD_modifiertypes.h
source/blender/modifiers/MOD_nodes.h [moved from source/blender/nodes/NOD_simulation.h with 79% similarity]
source/blender/modifiers/intern/MOD_edgesplit.c
source/blender/modifiers/intern/MOD_nodes.cc [new file with mode: 0644]
source/blender/modifiers/intern/MOD_simulation.cc [deleted file]
source/blender/modifiers/intern/MOD_triangulate.c
source/blender/modifiers/intern/MOD_util.c
source/blender/nodes/CMakeLists.txt
source/blender/nodes/NOD_derived_node_tree.hh
source/blender/nodes/NOD_geometry.h [new file with mode: 0644]
source/blender/nodes/NOD_geometry_exec.hh [new file with mode: 0644]
source/blender/nodes/NOD_math_functions.hh [new file with mode: 0644]
source/blender/nodes/NOD_node_tree_multi_function.hh
source/blender/nodes/NOD_node_tree_ref.hh
source/blender/nodes/NOD_static_types.h
source/blender/nodes/NOD_type_callbacks.hh [new file with mode: 0644]
source/blender/nodes/function/node_function_util.cc
source/blender/nodes/function/nodes/node_fn_float_compare.cc
source/blender/nodes/function/nodes/node_fn_random_float.cc
source/blender/nodes/geometry/node_geometry_exec.cc [new file with mode: 0644]
source/blender/nodes/geometry/node_geometry_tree.cc [moved from source/blender/nodes/simulation/node_simulation_tree.cc with 66% similarity]
source/blender/nodes/geometry/node_geometry_util.cc [moved from source/blender/nodes/simulation/node_simulation_util.cc with 76% similarity]
source/blender/nodes/geometry/node_geometry_util.hh [moved from source/blender/nodes/simulation/node_simulation_util.h with 85% similarity]
source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc [new file with mode: 0644]
source/blender/nodes/geometry/nodes/node_geo_boolean.cc [new file with mode: 0644]
source/blender/nodes/geometry/nodes/node_geo_common.cc [moved from source/blender/nodes/simulation/nodes/node_sim_common.cc with 83% similarity]
source/blender/nodes/geometry/nodes/node_geo_edge_split.cc [new file with mode: 0644]
source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc [new file with mode: 0644]
source/blender/nodes/geometry/nodes/node_geo_object_info.cc [new file with mode: 0644]
source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc [new file with mode: 0644]
source/blender/nodes/geometry/nodes/node_geo_point_instance.cc [new file with mode: 0644]
source/blender/nodes/geometry/nodes/node_geo_random_attribute.cc [new file with mode: 0644]
source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc [new file with mode: 0644]
source/blender/nodes/geometry/nodes/node_geo_transform.cc [new file with mode: 0644]
source/blender/nodes/geometry/nodes/node_geo_triangulate.cc [new file with mode: 0644]
source/blender/nodes/intern/derived_node_tree.cc
source/blender/nodes/intern/math_functions.cc [new file with mode: 0644]
source/blender/nodes/intern/node_geometry_exec.cc [new file with mode: 0644]
source/blender/nodes/intern/node_socket.cc
source/blender/nodes/intern/node_tree_multi_function.cc
source/blender/nodes/intern/node_tree_ref.cc
source/blender/nodes/intern/type_callbacks.cc [new file with mode: 0644]
source/blender/nodes/shader/node_shader_util.c
source/blender/nodes/shader/nodes/node_shader_math.cc