-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This is documented at the end of https://meshoptimizer.org/#advanced-simplification. Briefly, you could simplify each subset (element) separately, but that is not quite ideal because the boundaries between elements will either need to be locked, or they will be simplified differently which may leave gaps. You can instead make a big index buffer out of all triangles and simplify the entire index buffer in one call; for you to be able to retrieve the materials again, you need to make sure each unique vertex index has only material - which may require duplicating vertices depending on whether this is already the case or not. As long as different elements refer to different vertices, if the vertex position on the boundary matches, the simplifier will correctly preserve the boundary. |
Beta Was this translation helpful? Give feedback.
This is documented at the end of https://meshoptimizer.org/#advanced-simplification. Briefly, you could simplify each subset (element) separately, but that is not quite ideal because the boundaries between elements will either need to be locked, or they will be simplified differently which may leave gaps. You can instead make a big index buffer out of all triangles and simplify the entire index buffer in one call; for you to be able to retrieve the materials again, you need to make sure each unique vertex index has only material - which may require duplicating vertices depending on whether this is already the case or not. As long as different elements refer to different vertices, if the v…