Blender Git Loki

Git Commits -> Revision e2ffe9d

July 30, 2021, 14:51 (GMT)
Surface Deform: support sparse binding mode for improving performance.

When a vertex group is used to limit the influence of the modifier
to a subset of vertices, binding data for vertices with zero weight
is not needed. This wastes memory, disk space and CPU cycles.

If the vertex group contents is known to be final and constant,
it is reasonable to optimize by only storing data group vertices.
This has to be an option in case the group can change.

Supporting this requires adding a vertex index field and spliting
the vertex count into mesh and bind variants, but both happen to
fit in available padding. The old numverts field is renamed to the
new bound vertex count field to maintain the array length invariant.
Versioning is used to initialize the other new fields.

If a file with sparse binding is opened in an old blender version,
it is corrupted into a non-sparse bind with vertex count mismatch,
preventing the modifier from working until rebind.

Differential Revision: https://developer.blender.org/D11924

Commit Details:

Full Hash: e2ffe9d630de50891189d23a0a2f8ee16bf31a33
Parent Commit: 5c7968a
Committed By: Fabian Schempp
Lines Changed: +121, -22

6 Modified Paths:

/source/blender/blenloader/intern/versioning_300.c (+19, -0) (Diff)
/source/blender/makesdna/DNA_modifier_defaults.h (+2, -1) (Diff)
/source/blender/makesdna/DNA_modifier_types.h (+5, -7) (Diff)
/source/blender/makesdna/intern/dna_rename_defs.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_modifier.c (+9, -0) (Diff)
/source/blender/modifiers/intern/MOD_surfacedeform.c (+85, -14) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021