<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLAccelerationStructureMotionInstanceDescriptor/init(options:mask:intersectionFunctionTableOffset:accelerationStructureIndex:userID:motionTransformsStartIndex:motionTransformsCount:motionStartBorderMode:motionEndBorderMode:motionStartTime:motionEndTime:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So48MTLAccelerationStructureMotionInstanceDescriptora7options4mask31intersectionFunctionTableOffset012accelerationB5Index6userID021motionTransformsStartM00pQ5Count0pR10BorderMode0p3EndtU00pR4Time0pvW0ABSo0abD7OptionsV_s6UInt32VA5QSo09MTLMotiontU0VASS2ftcfc"
  },
  "title" : "init(options:mask:intersectionFunctionTableOffset:accelerationStructureIndex:userID:motionTransformsStartIndex:motionTransformsCount:motionStartBorderMode:motionEndBorderMode:motionStartTime:motionEndTime:)"
}
-->

# init(options:mask:intersectionFunctionTableOffset:accelerationStructureIndex:userID:motionTransformsStartIndex:motionTransformsCount:motionStartBorderMode:motionEndBorderMode:motionStartTime:motionEndTime:)

Creates an acceleration-structure motion instance with the property values you
provide.

```
init(options: MTLAccelerationStructureInstanceOptions, mask: UInt32, intersectionFunctionTableOffset: UInt32, accelerationStructureIndex: UInt32, userID: UInt32, motionTransformsStartIndex: UInt32, motionTransformsCount: UInt32, motionStartBorderMode: MTLMotionBorderMode, motionEndBorderMode: MTLMotionBorderMode, motionStartTime: Float, motionEndTime: Float)
```

## Parameters

`options`

An option set for new acceleration-structure motion instances.

`mask`

A mask for testing ray-tracing rays in a scene’s geometry
for new acceleration-structure motion-instances.

`intersectionFunctionTableOffset`

An offset into the intersection-function
table for ray tracing.

`accelerationStructureIndex`

The index of an acceleration structure
that applies to new acceleration-structure motion-instances.

`userID`

An unique identifier for an acceleration-structure motion-instance.

`motionTransformsStartIndex`

An index of the motion data that represents the first
key-frame’s motion data.

`motionTransformsCount`

The number of motion data key-frames that begin at
[`motionTransformsStartIndex`](/documentation/Metal/MTLAccelerationStructureMotionInstanceDescriptor/motionTransformsStartIndex).

`motionStartBorderMode`

A behavior that configures how an acceleration-structure
motion-instance handles timestamps before [`motionStartTime`](/documentation/Metal/MTLAccelerationStructureMotionInstanceDescriptor/motionStartTime).

`motionEndBorderMode`

A behavior that configures how an acceleration-structure
motion-instance handles timestamps after [`motionEndTime`](/documentation/Metal/MTLAccelerationStructureMotionInstanceDescriptor/motionEndTime).

`motionStartTime`

A starting time for the range of motion that the key-frame data
(see [`motionTransformsStartIndex`](/documentation/Metal/MTLAccelerationStructureMotionInstanceDescriptor/motionTransformsStartIndex) and [`motionTransformsCount`](/documentation/Metal/MTLAccelerationStructureMotionInstanceDescriptor/motionTransformsCount)) represent.

`motionEndTime`

An ending time for the range of motion that the key-frame data
(see [`motionTransformsStartIndex`](/documentation/Metal/MTLAccelerationStructureMotionInstanceDescriptor/motionTransformsStartIndex) and [`motionTransformsCount`](/documentation/Metal/MTLAccelerationStructureMotionInstanceDescriptor/motionTransformsCount)) represent.

## Discussion

The initializer sets the descriptor instance’s properties to the values you pass to the
initializer’s parameters.
However, you can change the descriptor’s property values at any time, such as
between creating separate acceleration-structure motion instances.
For example, apps typically assign a unique value to [`userID`](/documentation/Metal/MTLAccelerationStructureMotionInstanceDescriptor/userID) before they create
each motion instance with the same descriptor.

---

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)