<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNGeometry/removeMaterial(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNGeometry(im)removeMaterialAtIndex:"
  },
  "title" : "removeMaterial(at:)"
}
-->

# removeMaterial(at:)

Removes a material attached to the geometry.

```
func removeMaterial(at index: Int)
```

## Parameters

`index`

The index of the attached material to be removed.
  
  > Important:
  > Raises an exception (<doc://com.apple.documentation/documentation/Foundation/NSExceptionName/rangeException>) if `index` is beyond the bounds of the ``doc://com.apple.scenekit/documentation/SceneKit/SCNGeometry/materials`` array.

## Discussion

---

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)