subdivisionLevel
The number of subdivisions SceneKit uses to smooth the geometry’s surface at render time.
Declaration
var subdivisionLevel: Int { get set }Discussion
Surface subdivision is a technique for using low-detail geometry to generate a smooth surface for rendering. When you increase the subdivisionLevel value of a geometry, SceneKit automatically splits each face in the rendered surface, creating a more detailed, smoother geometry, as shown in . SceneKit performs this subdivision process at render time, preserving the original geometry data.
[Image]
Subdividing a surface rounds away any sharp edges and corners in the geometry; however, such details may be important to a model’s design. To preserve edges, use the edgeCreasesElement property to identify edges and the edgeCreasesSource property to specify how smooth or sharp they should appear after subdivision. To preserve corners, include a geometry source whose semantic value is vertexCrease when creating the geometry.
The default subdivision level is zero, specifying no subdivision—SceneKit renders the geometry exactly as its vertex data specifies.