Page MenuHome

Optim of vgroups usage in cloth simulation
Needs ReviewPublic

Authored by Christian Hubert (alikendarfen) on May 23 2018, 11:08 AM.

Details

Summary
  • Stored key parameters before the loops so that indirections are evaluated once
  • Used 'dm->getVertData(dm, i, CD_MDEFORMVERT)' instead of 'DM_get_vert_data' to obtain a direct access to deform verts
  • Changed 'if ( a && b )' tests so that the more simple are tested first (a more simple than b)
  • Renamed 'verts' as 'vert' as used as a single vertex (for a better readability).

Though, about './blenkernel/intern/cloth.c:675:3: /* can be optimized to do all groups in one loop */', I see no way to avoid that, or the data structure needs to be changed?

Diff Detail

Repository
rB Blender
Branch
optim_cloth (branched from blender2.8)
Build Status
Buildable 1681
Build 1681: arc lint + arc unit

Event Timeline

Note that this isn't really a great area to be optimizing at the moment since we are removing DerivedMesh in 2.8x.

I think this patch may be left un-applied because it's going to be removed soon.