Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve smoothing of flat faces #821

Merged
merged 15 commits into from
May 28, 2024
Merged

Improve smoothing of flat faces #821

merged 15 commits into from
May 28, 2024

Conversation

elalish
Copy link
Owner

@elalish elalish commented May 23, 2024

This includes a bunch of smoothing improvements. I'll add some screenshots below - first I need to take a look at the diff and clean things up before merging.

@elalish elalish self-assigned this May 23, 2024
@elalish
Copy link
Owner Author

elalish commented May 28, 2024

Here's my original weird shape, complete with a bunch of large flat faces, as well as some quads and triangles. Many of the edges have dihedral angles of 60 or 45 degrees. I'll show various automatic smoothing of this mesh below.
image

Below, using shape.CalculateNormals(0, 50).SmoothByNormals(0).Refine(8);, which is the same as shape.SmoothOut(50).Refine(8);
image

Below using shape.SmoothOut(180, 1).Refine(8); - smoothing everything as much as possible.
image

Below using shape.SmoothOut(50, 0.5).Refine(8); - making the sharp corners a bit rounded.
image

@elalish elalish merged commit bf18c9f into master May 28, 2024
18 checks passed
@elalish elalish deleted the flatFaces branch May 28, 2024 18:06
@elalish elalish mentioned this pull request Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant