<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ReverbMeshResource/init(positions:triangleIndices:materials:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation18ReverbMeshResourceC9positions15triangleIndices9materialsACSays5SIMD3VySfGG_Says6UInt32VGAMtKcfc"
  },
  "title" : "init(positions:triangleIndices:materials:)"
}
-->

# init(positions:triangleIndices:materials:)

Creates a reverb mesh resource from a list of positions, triangle indices, and material indices.

```
convenience init(positions: [SIMD3<Float>], triangleIndices: [UInt32], materials: [UInt32]) throws
```

## Parameters

`positions`

The vertex positions of the mesh.

`triangleIndices`

The triangle indices that reference positions in the `positions` array.

`materials`

An array of material indices, one per triangle, that map each face to a
material in the [`Audio.Material`](/documentation/RealityKit/Audio/Material) array provided to [`simulated(mesh:materials:)`](/documentation/RealityKit/Reverb/simulated(mesh:materials:)).

## Discussion

Use this initializer when you have precise control over the geometry:

```swift
let mesh = try ReverbMeshResource(
    positions: myPositions,
    triangleIndices: myIndices,
    materials: perFaceMaterialIndices
)
```

---

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)