Page MenuHome

(WIP): Transform: Update normal and tessellation of the transformed geometry only
AbandonedPublic

Authored by Germano Cavalcante (mano-wii) on May 17 2021, 11:53 PM.

Details

Summary

WIP because we still need to benchmark.

The idea is simple. For BMesh, tag the geometry that is transformed and
just recalculate the normal and triangulation of that geometry.

Note: This shouldn't make much difference for meshes with modifiers.

Diff Detail

Repository
rB Blender
Branch
arcpatch-D11283 (branched from master)
Build Status
Buildable 14650
Build 14650: arc lint + arc unit

Event Timeline

Germano Cavalcante (mano-wii) requested review of this revision.May 17 2021, 11:53 PM
Germano Cavalcante (mano-wii) created this revision.
  • Improve tagging in transformation with proportional editing
Campbell Barton (campbellbarton) requested changes to this revision.May 25 2021, 1:46 PM
Campbell Barton (campbellbarton) added inline comments.
source/blender/bmesh/intern/bmesh_mesh.c
547

These costs are getting difficult to follow, better make this a struct.

source/blender/bmesh/intern/bmesh_polygon.c
1560–1562

This interferes with the flow control from the if check above which has an else statement below.

1560–1562

Shouldn't this be checking the flag of any of the vertices instead of the face flag?

source/blender/editors/transform/transform_convert_mesh.c
1743–1746

The BM_ELEM_SELECT flag is important as only selected geometry should be used as merge targets.

This revision now requires changes to proceed.May 25 2021, 1:46 PM

Good start, note that we may want to use a dedicated tag to denote elements need to be updated since tagging is already used quite a lot in the rest of the code base - which could make tagging for updates or could elsewhere.

Although we could do with that separately from this patch.

source/blender/bmesh/intern/bmesh_mesh.c
547

typo: costs -> casts

Address issues raised by own review:

  • Correct flow control in face tessellation.
  • Enable the selection flag for auto merge.