Skip to content

What does packMesh mean? #3998

Answered by Grantim
Gihong-Yim asked this question in Q&A
Discussion options

You must be logged in to vote

Hello!

Remesh algorithms applies decimation and subdivision:

  1. decimation collapses too long edges witch means that some vertices and faces are removed from mesh, and other replaced
  2. subdivision introduce new vertices and faces

For example mesh had 5 faces:
face_0,face_1,face_2,face_3.face_4
we removed face_1 and face_3, so we still have array of 5 face, but 2 are removed:
face_0,_,face_2,_.face_4
the mesh still takes same amount of memory.

So here pack arrives, it deallocate not used space in Faces, Vertices and Edges arrays making them "dense",
in this case pack do this
face_0->new_face_0
face_2->new_face_1
face_4->new_face_2
and result mesh looks like this:
new_face_0,new_face_1,new_face_2

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Gihong-Yim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants