Commit: 531a3f6c4e8575f1b9cc5b8524c92cc7e5895cf4 Author: Pablo Dobarro Date: Mon Aug 3 17:58:46 2020 +0200 Branches: blender-v2.90-release https://developer.blender.org/rB531a3f6c4e8575f1b9cc5b8524c92cc7e5895cf4
Sculpt: Use vertices instead of faces to limit the grids in each PBVH node This uses the vertices per grid instead of quads to set the limit of grids per PBVH Node. This should create more leaf nodes in lower subdivisions levels where the duplicates count is high, producing more uniform performance across different levels. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8454 =================================================================== M source/blender/blenkernel/intern/pbvh.c =================================================================== diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 67988427bd2..92a47f24240 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -644,7 +644,7 @@ void BKE_pbvh_build_grids(PBVH *pbvh, pbvh->totgrid = totgrid; pbvh->gridkey = *key; pbvh->grid_hidden = grid_hidden; - pbvh->leaf_limit = max_ii(LEAF_LIMIT / ((gridsize - 1) * (gridsize - 1)), 1); + pbvh->leaf_limit = max_ii(LEAF_LIMIT / (gridsize * gridsize), 1); BB cb; BB_reset(&cb); _______________________________________________ Bf-blender-cvs mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-blender-cvs
