---
title: isObjectMaskingEnabled
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/photogrammetrysession/configuration-swift.struct/isobjectmaskingenabled
---

# isObjectMaskingEnabled

A Boolean value that indicates whether the session uses object masks.

## Declaration

```swift
var isObjectMaskingEnabled: Bool
```

## Discussion

Discussion If this value is true, but the samples don’t contain object masks, RealityKit attempts to automatically create a mask algorithmically. If it’s unable to create a mask, RealityKit reverts to reconstructing the object using the entire image. If this value is true and the request’s samples do include object masks, RealityKit uses the provided masks to separate the foreground object from the background. If this value is false, RealityKit doesn’t attempt to separate the sample foreground from the background, even if the samples have object masks.
