Page MenuHome

Fix Sculpt Relax operation when deforming mesh boundaries
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Jul 19 2020, 11:43 PM.
Tags
None
Subscribers
None
Tokens
"Burninate" token, awarded by amalbubble."Burninate" token, awarded by Frozen_Death_Knight."Mountain of Wealth" token, awarded by TheAngerSpecialist."Mountain of Wealth" token, awarded by Brandon777.

Details

Summary

Previously, mesh boundaries were relaxed as any other vertex, which was
causing artifacts and unwanted deformation. In order to prevent this,
the mesh filter was using the automasking system to lock the boundary
vertices.

Now the relax vertex function slides the boundary vertices along the
mesh boundary edges, relaxing all the topology correctly while
preserving the shape of the mesh.

Before:

After:

Diff Detail

Repository
rB Blender
Branch
sculpt-fix-relax-boundaries (branched from master)
Build Status
Buildable 9105
Build 9105: arc lint + arc unit

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Jul 19 2020, 11:43 PM
Pablo Dobarro (pablodp606) created this revision.

From the description I am not really sure what is causing the artifacts in the current code (before this patch).
Is it the brush and filter are behaving differently (and brush was causing artifacts, but not the filter?). Is the auto-masking broken? Or is not usable because of some other issue?

Such information should be communicated more clearly via patch description and commit messages.

Both the brush and the filter were using the SCULPT_relax_vertex function for this deformation, which before this commit it was not preserving the boundaries and it was deforming them in an incorrect way. The workaround was to enable boundary automasking for the brush to lock the boundaries in place (which was not enabled by default). The filter had the boundary automasking functionality hardcoded for preventing these artifacts, but the relax function is the same. This removes all those hacks and lets the SCULPT_relax_vertex handle the boundaries correctly, making vertices slide instead of being locked by the automasking system.

The filter had the boundary automasking functionality hardcoded for preventing these artifacts, but the relax function is the same.

A bit confusing about "the same". So, the auto-masking boundary thing was only hacked to some tools, but not the others?

This removes all those hacks

That's great :)

Anyway, code seems fine. Just make sure all the information is summarized in the final commit message.

This revision is now accepted and ready to land.Jul 27 2020, 6:37 PM