Page MenuHome

Fix T81915: Draw Face Sets not working with deformed sculpt mesh
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Nov 2 2020, 11:16 PM.

Details

Summary

The draw face sets brush uses the poly center when used in meshes to increase
its precision when working in low poly geometry. For this to work with deformed
meshes, the deformed coordinates from the PBVH should be used instead.

Diff Detail

Repository
rB Blender

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Nov 2 2020, 11:16 PM
Pablo Dobarro (pablodp606) created this revision.
Sergey Sharybin (sergey) requested changes to this revision.Nov 3 2020, 9:29 AM
Sergey Sharybin (sergey) added inline comments.
source/blender/editors/sculpt_paint/sculpt_face_set.c
144–152

I do not see a reason for this access happening in the loop from the performance reasons.
It also feels like such check-and-access happens in other places of sculpt code, so worth looking into making it a reusable function accessing deformed mverts.

This revision now requires changes to proceed.Nov 3 2020, 9:29 AM
Pablo Dobarro (pablodp606) marked an inline comment as done.
Pablo Dobarro (pablodp606) edited the summary of this revision. (Show Details)
  • Review update
Sergey Sharybin (sergey) requested changes to this revision.Nov 4 2020, 9:20 AM
Sergey Sharybin (sergey) added inline comments.
source/blender/editors/sculpt_paint/sculpt.c
295

I would call it SCULPT_mesh_deformed_mverts_get with a comment that if there are no shapekeys or modifiers the original mesh vertices array is returned, otherwise PBHV's vertices are returned.

This revision now requires changes to proceed.Nov 4 2020, 9:20 AM
Pablo Dobarro (pablodp606) marked an inline comment as done.
  • review update
This revision is now accepted and ready to land.Nov 5 2020, 9:45 AM