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

Add support for subdividing non-closed meshes #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chromakode
Copy link

Thanks for the awesome library! I am using this to subdivide meshes from Blender on the client. When encountering a non-closed mesh, I found it to produce artifacts (see demo below).

This patch adds support for subdividing meshes which are non-closed or contain holes. The algorithm is based on step 3 and 4 here:
https://graphics.stanford.edu/wikis/cs148-09-summer/Assignment3Description

Here's another reference (but it describes a different interpolation for edge points which mismatches Blender)
https://rosettacode.org/wiki/Catmull%E2%80%93Clark_subdivision_surface

Before:
before

After:
after

@ghost
Copy link

ghost commented Dec 8, 2017

This patch works great for me for displaying a subdivided version of the teapot model without spikes.

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.

None yet

1 participant