Creates a new mesh by subdividing the specified mesh.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- Model I/O
The mesh from which to generate a new subdivided mesh.
The index of the submesh in the original mesh from which to generate the new mesh.
The number of times to iteratively perform the subdivision process.
A new mesh object, or
nil if subdivision fails.
Surface subdivision creates a smooth mesh from a coarse mesh by splitting each primitive (triangle or quad) in the original mesh into multiple smaller primitives and projecting the newly created vertices along surface normal vectors. The
subdivision parameter controls the level of detail (and resulting performance cost) of the subdivision process. For example, in a triangle mesh, a subdivision level of 1 replaces each triangle with a set of four smaller triangles; a subdivision level of 2 replaces each of those four triangles with four even smaller triangles (for a total of 16 created from the triangle in the original mesh.
Meshes intended for use with surface subdivision contain topology information to ensure that the results of subdivision match the artist’s intent. To make use of this information, use the
init initializer when creating an
MDLAsset object to load meshes from.