Page MenuHome

Fix Mesh filter and transform tool performance after a full mesh update
Needs ReviewPublic

Authored by Pablo Dobarro (pablodp606) on Jul 5 2020, 7:08 PM.



In some cases (remesh with mask reprojection, undo) the PBVH is rebuild
when it still has mask data on it. The state flags of mask data for the
nodes were not updated after building the PBVH, so if a tool that uses
them to filter inactive nodes was used after a rebuild it will iterate
over the whole mesh even when it contains fully masked areas.

Diff Detail

rB Blender
arcpatch-D8210 (branched from master)
Build Status
Buildable 10286
Build 10286: arc lint + arc unit

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Jul 5 2020, 7:08 PM
Pablo Dobarro (pablodp606) created this revision.

I am not sure why masks are so special over color, visibility. It also sounds as if there is a missing request of mask information somewhere.

To me it seems either of those is a more correct approach:

  • Tag all updates on rebuild (mask, color, visibility). This way is only appropriate if it doesn't increase memory footprint and doesn't have performance impact when mask is not needed.
  • Tag updates of all "data layers" when PBVH is rebuilt. For example, if PBVH had mask, tag mask update after the builds. This can be done for all "data layers" as a generic solution.

Makes sense to me to update everything. For color update actually doesn't do anything, and for visibility there is the test to check if nodes are fully hidden, which is probably needed after a rebuild too?

Probably the best option would be to combine this fix with D8225 so after the visibility state is copied from the face sets, both mask and visibility flags are updated after the PBVH creation.

EDIT: After the last update to D8225, merging both patches should make all flags update correctly

I think this patch is still relevant, is it ok to commit?

I think this patch is still relevant, is it ok to commit?

My previous comment is still relevant, and seems unaswred (unless I've missed something).