---
title: "convertToAdditive(baseAnimation:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/sampledanimation/skeletalanimationoperation/converttoadditive(baseanimation:)"
---

# convertToAdditive(baseAnimation:)

Converts animation to additive format by subtracting a base animation.

## Declaration

```swift
static func convertToAdditive(baseAnimation: AnimationResource) -> SampledAnimation<Value>.SkeletalAnimationOperation
```

## Parameters

- `baseAnimation`: Base animation to subtract.

## Return Value

Return Value A SkeletalAnimationOperation that, when processed, produces a SampledAnimation<JointTransforms> in additive format.

## Discussion

Discussion Creates a delta animation that represents the difference between this animation and the provided base animation. You can layer the resulting animation on top of other animations using additive blending. If the base animation has more samples than the target animation, the function subtracts the last sample from each remaining sample in the target. The function throws an error if the base and target animations do not have the same frame interval (sample rate).

## See Also

### Converting to additive animation

- [convertToAdditiveUsingRestPose()](realitykit/sampledanimation/skeletalanimationoperation/converttoadditiveusingrestpose().md)
- [convertToAdditiveUsingFirstSample()](realitykit/sampledanimation/skeletalanimationoperation/converttoadditiveusingfirstsample().md)
