diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-10-15 08:08:36 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-10-15 08:08:36 +0300 |
commit | 010c10febe46c1c24ca3e32ee8b03e2da2eea4fe (patch) | |
tree | 6e74e54c2fe9338a502e1d91b698721208ddc5c4 /source/blender/blenkernel/BKE_pbvh.h | |
parent | bc06fcca47caa182cad0818de6ccb8cde9ea215e (diff) |
Sculpt: Ensure faces are uniquely assigned to PBVHNodes
PBVH_FACES and PBVH_GRIDS do not store faces directly in nodes;
instead they store 'primitives', which are tesselation triangles
for PBVH_FACES and grids (which are per-loop) for PBVH_GRIDS.
Primitives from the same face could sometimes end up in different
PBVH nodes. This is now prevented in two ways:
* All primitives of the same face are given the same boundary
during PBVH build. This prevents them from being swapped
away from each other during partitioning.
* build_sub adjusts the final partition midpoint to fall
between primitives of different faces.
Diffstat (limited to 'source/blender/blenkernel/BKE_pbvh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_pbvh.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h index 89743f1d2b4..42cd1536dcf 100644 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@ -267,7 +267,8 @@ void BKE_pbvh_build_grids(PBVH *pbvh, void **gridfaces, struct DMFlagMat *flagmats, unsigned int **grid_hidden, - struct Mesh *me); + struct Mesh *me, + struct SubdivCCG *subdiv_ccg); /** * Build a PBVH from a BMesh. */ |