If you've loaded low-poly .dae
or .obj
models like Utah teapot
, you should use the antialiasing mode
instance property for smoothing faceted surfaces. You can choose between 4 samples per screen pixel, 2 samples, or none. This will help you load more models, while being smoothed, and not exceed 100K polygons limit.
var antialiasingMode: SCNAntialiasingMode { get set }
SceneKit can provide antialiasing, which smooths edges in a rendered scene, using a technique called multisampling. Multisampling renders each pixel multiple times and combines the results, creating a higher quality image at a performance cost proportional to the number of samples it uses.
Real code looks like this:
let sceneView = SCNView(frame: .zero)
sceneView.antialiasingMode = .multisampling4X
This is a pivot table showing values that available in macOS and iOS.
| macOS | iOS |
|------------------------------------|----------------------------------|
| .none | .none (default) |
| .multisampling2X | .multisampling2X |
| .multisampling4X (default) | .multisampling4X |
| .multisampling8X | - |
| .multisampling16X | - |