forked from bartvdbraak/blender
Fix for subsurf oscillations along creased boundary edges
Changed the "exterior edge interior shift" section of subsurf calc to always treat boundary edges the same, regardless of sharpness. We should revisit subsurf creasing to see if more consistent and predictable results are possible, but for now this a non-intrusive way to avoid wavyness along the boundary. Fixes bug [#31864] Artifacts when using Subsurf+Crease on plane http://projects.blender.org/tracker/index.php?func=detail&aid=31864&group_id=9&atid=498
This commit is contained in:
parent
fd36fb8f63
commit
c9e98e848d
@ -1914,14 +1914,18 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
|
||||
avgSharpness = 0;
|
||||
}
|
||||
|
||||
if (_edge_isBoundary(e) && (!e->numFaces || sharpCount < 2)) {
|
||||
if (_edge_isBoundary(e)) {
|
||||
for (x = 1; x < edgeSize - 1; x++) {
|
||||
int fx = x * 2;
|
||||
const float *co = EDGE_getCo(e, curLvl, x);
|
||||
float *nCo = EDGE_getCo(e, nextLvl, fx);
|
||||
|
||||
/* Average previous level's endpoints */
|
||||
VertDataCopy(r, EDGE_getCo(e, curLvl, x - 1), ss);
|
||||
VertDataAdd(r, EDGE_getCo(e, curLvl, x + 1), ss);
|
||||
VertDataMulN(r, 0.5f, ss);
|
||||
|
||||
/* nCo = nCo * 0.75 + r * 0.25 */
|
||||
VertDataCopy(nCo, co, ss);
|
||||
VertDataMulN(nCo, 0.75f, ss);
|
||||
VertDataMulN(r, 0.25f, ss);
|
||||
|
Loading…
Reference in New Issue
Block a user