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-03-08 20:45:06 +0300
committerHans Goudey <h.goudey@me.com>2021-03-08 20:45:06 +0300
commit84a4f2ae68d40830111ae41b25d76b165e37d611 (patch)
tree7139f1aa647987016ce189eecc1dba96c52c51f9 /source/blender/blenlib/BLI_math_matrix.h
parentfc0de69471f0e6a69ae6ffd01ca27156e524ce40 (diff)
Geometry Nodes: Improve performance of point distribute node
This commit refactors the point distribute node to skip realizing the instances created by the point instance node or the collection and object info nodes. Realizing instances is not necessary here because it copies all the mesh data and and interpolates all attributes from the instances when this operation does not need to modify the input geometry at all. In the tree leaves test file this patch improves the performance of the node by about 14%. That's not very much, the gain is likely larger for more complicated input instances with more attributes (especially attributes on different domains, where interpolation would be necessary to join all of the instances). Another possible performance improvement would be to parallelize the code in this node where possible. The point distribution code unfortunately gets quite a bit more complicated because it has to handle the complexity of having many inputs instead of just one. Note that this commit changes the randomness of the distribution in some cases, as if the seed input had changed. Differential Revision: https://developer.blender.org/D10596
Diffstat (limited to 'source/blender/blenlib/BLI_math_matrix.h')
-rw-r--r--source/blender/blenlib/BLI_math_matrix.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h
index eac7f25f11a..6324963f06a 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -331,6 +331,7 @@ void rescale_m4(float mat[4][4], const float scale[3]);
void transform_pivot_set_m3(float mat[3][3], const float pivot[2]);
void transform_pivot_set_m4(float mat[4][4], const float pivot[3]);
+void mat4_to_rot(float rot[3][3], const float wmat[4][4]);
void mat3_to_rot_size(float rot[3][3], float size[3], const float mat3[3][3]);
void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], const float wmat[4][4]);
void mat4_to_loc_quat(float loc[3], float quat[4], const float wmat[4][4]);