<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/BlendTreeNode",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation13BlendTreeNodeP"
  },
  "title" : "BlendTreeNode"
}
-->

# BlendTreeNode

An interface for a node that’s a member of a blend tree.

```
protocol BlendTreeNode
```

## Overview

This protocol specifies the common functionality for the animations that
compose a [`BlendTreeAnimation`](/documentation/RealityKit/BlendTreeAnimation). The animation defines a
[`root`](/documentation/RealityKit/BlendTreeAnimation/root) node of this type. To define the tree, you
assign the root node one of the follow structures that adopt this protocol:

- [`BlendTreeBlendNode`](/documentation/RealityKit/BlendTreeBlendNode), which branches the tree for every element in
  [`sources`](/documentation/RealityKit/BlendTreeBlendNode/sources).
- [`BlendTreeSourceNode`](/documentation/RealityKit/BlendTreeSourceNode), which defines an
  animation to blend with its [`source`](/documentation/RealityKit/BlendTreeSourceNode/source) property.

> Note: A node in the tree may be of type ``doc://com.apple.RealityKit/documentation/RealityKit/BlendTreeInvalidNode``, which
> neither specifies a list of sources nor an animation.

Each node type supplies a name and weight, which you can set during or after
initialization.

```swift
let animation1 = FromToByAnimation(...)

let blendNode = BlendTreeSourceNode(
    source: animation1,
    name: "Anim1",
    weight: .value(0.25))
```

## Topics

### Configuring the blend tree node

[`var name: String`](/documentation/RealityKit/BlendTreeNode/name)

A textual name for the blend node.

[`var weight: BlendWeight`](/documentation/RealityKit/BlendTreeNode/weight)

A normalized percentage that designates how much effect this node has
relative to peer nodes.

### Blending animations

[`func blend(sources: [any BlendTreeNode], name: String, isAdditive: Bool) -> any BlendTreeNode`](/documentation/RealityKit/blend(sources:name:isAdditive:))

Combines the animations that result from the individual blend-tree nodes of
the given array to a single blend-tree node.

[`func blend(any BlendTreeNode, any BlendTreeNode, name: String, isAdditive: Bool) -> any BlendTreeNode`](/documentation/RealityKit/blend(_:_:name:isAdditive:))

Combines the animations that result from two blend-tree nodes into a single
blend-tree node.

## Relationships

### Conforming Types

[`BlendTreeSourceNode`](/documentation/RealityKit/BlendTreeSourceNode)

[`BlendTreeBlendNode`](/documentation/RealityKit/BlendTreeBlendNode)

[`BlendTreeInvalidNode`](/documentation/RealityKit/BlendTreeInvalidNode)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)