---
title: ARMatteGenerator
framework: arkit
role: symbol
role_heading: Class
path: arkit/armattegenerator
---

# ARMatteGenerator

An object that creates matte textures you use to occlude your app’s virtual content with people, that ARKit recognizes in the camera feed.

## Declaration

```swift
class ARMatteGenerator
```

## Overview

Overview Use this class when you want full control over occluding your app’s virtual content, based on people ARKit recognizes in the camera feed. note: Apps using one of the standard renderers  (ARView or ARSCNView) don’t need this class to effect people occlusion. See frameSemantics for more information. To assist your custom renderer with people occlusion, matte generator processes alpha and depth information in a frame’s segmentationBuffer and estimatedDepthData to provide you with matte and depth textures. You use these textures to layer people on top of your app’s virtual content.

## Topics

### Creating a Matte Generator

- [init(device:matteResolution:)](arkit/armattegenerator/init(device:matteresolution:).md)

### Creating an Alpha Matte Texture

- [generateMatte(from:commandBuffer:)](arkit/armattegenerator/generatematte(from:commandbuffer:).md)

### Creating a Depth Texture

- [generateDilatedDepth(from:commandBuffer:)](arkit/armattegenerator/generatedilateddepth(from:commandbuffer:).md)

### Controlling Resolution

- [ARMatteGenerator.Resolution](arkit/armattegenerator/resolution.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Occlusion

- [Occluding virtual content with people](arkit/occluding-virtual-content-with-people.md)
- [Effecting People Occlusion in Custom Renderers](arkit/effecting-people-occlusion-in-custom-renderers.md)
- [Visualizing and interacting with a reconstructed scene](arkit/visualizing-and-interacting-with-a-reconstructed-scene.md)
