Mesh Subdivision
Before subdivision: After subdivision:
1. Define my data structure for loop subdivision(not winged edge). It has these properties:
Every vertex has its vertex data(position, normal, texcoord). It has a list of faces indices which are connected to it.
Each vertex has N faces. different vetex has different number of faces. so here I use linked list to store all faces indices connected to a vertex.
Each face has 3 vertices and 3 faces. Here I use face and vertex indices.
2. Subdivison is fast
I write a MeshSubdivision class for data structure and loop subdivision. It's easy to use. I mainly use array and indices of that array to implement the loop subdivision.
The subdivision is very fast. It takes 0.8s to subdivide a mesh which has 4210688 triangle faces.
Before subdivision: After subdivision:
Every vertex has its vertex data(position, normal, texcoord). It has a list of faces indices which are connected to it.
Each vertex has N faces. different vetex has different number of faces. so here I use linked list to store all faces indices connected to a vertex.
Each face has 3 vertices and 3 faces. Here I use face and vertex indices.
2. Subdivison is fast
I write a MeshSubdivision class for data structure and loop subdivision. It's easy to use. I mainly use array and indices of that array to implement the loop subdivision.
The subdivision is very fast. It takes 0.8s to subdivide a mesh which has 4210688 triangle faces.
Before subdivision: After subdivision: