The geometry source that defines the influence of each bone on the positions the geometry’s vertices.
SDKs
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Scene
Kit
Declaration
var boneWeights: SCNGeometry Source { get }
Discussion
This geometry source’s semantic
property must be bone
. Its data is an array of floating-point vectors, whose components
count is the number of bones influencing each vertex. Each vector corresponds to a vertex in the geometry’s vertex
geometry source, and each component in a vector specifies the influence of a bone on that vertex’s position. The bone
source determines which nodes in the bones array correspond to each component in the vector. A component value of 0
means that the bone has no influence on that vertex; positive or negative values scale the transformation of a bone node before SceneKit applies that transformation to the vertex.
Note
SceneKit performs skeletal animation on the GPU only if the components
count in this geometry source is 4
or less. Larger vectors result in CPU-based animation and drastically reduced rendering performance.