Page MenuHome

Round corners for dilated UVs when texture painting
ClosedPublic

Authored by Luca Rood (LucaRood) on Mar 2 2019, 2:42 AM.

Details

Summary

This fixes the issue of long spikes on sharp corners by rounding them, guaranteeing that the bleed will never exceed the bleed distance set by the user in any part of the mesh.

Here is a comparison with and without the corner rounding:

This patch adds some extra overhead, and I'm not completely sure I'm taking the best approach. This was implemented in the simplest way on top of the computations in D4436. Thus the algorithm calculates an area such as shown on the left picture below, and then rounds the corners, while it would perhaps be better to compute an area as shown on the right, and then append the rounded corners afterwards.

The reason that appending the round corners onto rectangular sections might be better, is that it would eliminate the need to check many irrelevant pixels in the case of sharp corners. Though actually it might be enough to simply change the computation of bounds_px, to extend around a bleed edge only by the amount of pixels defined by the user. This is a simple change I can look at tomorrow.

Diff Detail

Repository
rB Blender