<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhotogrammetrySession/Configuration-swift.struct/isObjectMaskingEnabled",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation21PhotogrammetrySessionC13ConfigurationV22isObjectMaskingEnabledSbvp"
  },
  "title" : "isObjectMaskingEnabled"
}
-->

# isObjectMaskingEnabled

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

```
var isObjectMaskingEnabled: Bool
```

## 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.

---

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)