Skip to content

Commit 9d73305

Browse files
committed
Update README.md
Remove normal crease protection from permissive mode example. With parallel collapses, this should be mostly unnecessary so we should no longer recommend it in the documentation.
1 parent 4fb3564 commit 9d73305

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ lod.resize(meshopt_simplifyWithAttributes(&lod[0], indices, index_count, &vertic
503503
target_index_count, target_error, /* options= */ meshopt_SimplifyPermissive, &lod_error));
504504
```
505505

506-
To maintain appearance, it's highly recommended to use this option together with attribute-aware simplification, as shown above, as it allows the simplifier to maintain attribute appearance. In this mode, it is often desirable to selectively preserve certain attribute seams, such as UV seams or sharp creases. This can be achieved by using the `vertex_lock` array with flag `meshopt_SimplifyVertex_Protect` set for individual vertices to protect specific discontinuities. To fill this array, use `meshopt_generatePositionRemap` to create a mapping table for vertices with identical positions, and then compare each vertex to the remapped vertex to determine which attributes are different:
506+
To maintain appearance, it's highly recommended to use this option together with attribute-aware simplification, as shown above, as it allows the simplifier to maintain attribute quality. In this mode, it is often desirable to selectively preserve certain attribute seams, such as UV seams or sharp creases. This can be achieved by using the `vertex_lock` array with flag `meshopt_SimplifyVertex_Protect` set for individual vertices to protect specific discontinuities. To fill this array, use `meshopt_generatePositionRemap` to create a mapping table for vertices with identical positions, and then compare each vertex to the remapped vertex to determine which attributes are different:
507507

508508
```c++
509509
std::vector<unsigned int> remap(vertices.size());
@@ -515,9 +515,6 @@ for (size_t i = 0; i < vertices.size(); ++i) {
515515

516516
if (r != i && (vertices[r].tx != vertices[i].tx || vertices[r].ty != vertices[i].ty))
517517
locks[i] |= meshopt_SimplifyVertex_Protect; // protect UV seams
518-
519-
if (r != i && (vertices[r].nx * vertices[i].nx + vertices[r].ny * vertices[i].ny + vertices[r].nz * vertices[i].nz < 0.25f))
520-
locks[i] |= meshopt_SimplifyVertex_Protect; // protect sharp normal creases
521518
}
522519
```
523520

0 commit comments

Comments
 (0)