Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [5.1.5] - 2024-05-31

### Changed

- Rebuilt static libraries with Xcode version 15.4 (15F31d). You are now required to build iOS apps with Xcode 15.4 or newer.
  • Loading branch information
Unity Technologies committed May 31, 2024
1 parent 353e3c8 commit a9e1db4
Show file tree
Hide file tree
Showing 9 changed files with 121 additions and 11 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [5.1.5] - 2024-05-31

### Changed

- Rebuilt static libraries with Xcode version 15.4 (15F31d). You are now required to build iOS apps with Xcode 15.4 or newer.
- Changed the AR Foundation dependency version from 5.1.4 to 5.1.5.

### Fixed

- Fixed issue [ARKB-58](https://issuetracker.unity3d.com/issues/arfoundation-application-crashes-when-arocclusionmanager-is-disabled-if-multithreaded-rendering-is-enabled-on-ios-devices-that-use-lidar) where iOS apps could intermittently crash when destroying the `AROcclusionManager` with multithreaded rendering enabled.

## [5.1.4] - 2024-04-29

### Changed
Expand Down
32 changes: 32 additions & 0 deletions Documentation~/arkit-camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,38 @@ uid: arkit-camera
---
# Camera

This page is a supplement to the AR Foundation [Camera](xref:arfoundation-camera) manual. The following sections only contain information about APIs where ARKit exhibits unique platform-specific behavior.

[!include[](snippets/arf-docs-tip.md)]

## Optional feature support

ARKit implements the following optional features of AR Foundation's [XRCameraSubsystem](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystem):

| Feature | Descriptor Property | Supported |
| :------ | :--------------- | :---------: |
| **Brightness** | [supportsAverageBrightness](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsAverageBrightness) | |
| **Color temperature** | [supportsAverageColorTemperature](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsAverageColorTemperature) | Yes |
| **Color correction** | [supportsColorCorrection](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsColorCorrection) | |
| **Display matrix** | [supportsDisplayMatrix](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsDisplayMatrix) | Yes |
| **Projection matrix** | [supportsProjectionMatrix](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsProjectionMatrix) | Yes |
| **Timestamp** | [supportsTimestamp](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsTimestamp) | Yes |
| **Camera configuration** | [supportsCameraConfigurations](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsCameraConfigurations) | Yes |
| **Camera image** | [supportsCameraImage](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsCameraImage) | Yes |
| **Average intensity in lumens** | [supportsAverageIntensityInLumens](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsAverageIntensityInLumens) | Yes |
| **Focus modes** | [supportsFocusModes](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsFocusModes) | Yes |
| **Face tracking ambient intensity light estimation** | [supportsFaceTrackingAmbientIntensityLightEstimation](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsFaceTrackingAmbientIntensityLightEstimation) | Yes |
| **Face tracking HDR light estimation** | [supportsFaceTrackingHDRLightEstimation](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsFaceTrackingHDRLightEstimation) | Yes |
| **World tracking ambient intensity light estimation** | [supportsWorldTrackingAmbientIntensityLightEstimation](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsWorldTrackingAmbientIntensityLightEstimation) | Yes |
| **World tracking HDR light estimation** | [supportsWorldTrackingHDRLightEstimation](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsWorldTrackingHDRLightEstimation) | |
| **Camera grain** | [supportsCameraGrain](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsCameraGrain) | iOS 13+ |
| **Image stabilization** | [supportsImageStabilization](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsImageStabilization) | |
| **Exif data** | [supportsExifData](xref:UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor.supportsExifData) | iOS 16+ |

> [!NOTE]
> Refer to AR Foundation [Camera platform support](xref:arfoundation-camera-platform-support) for more information
> on the optional features of the camera subsystem.
## Light estimation

ARKit light estimation can only be `enabled` or `disabled`. The availability of either `Ambient Intensity` or `Environmental HDR` data is governed by the active tracking mode. See the following table for more details.
Expand Down
53 changes: 48 additions & 5 deletions Documentation~/arkit-face-tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,60 @@ uid: arkit-face-tracking
---
# Face tracking

This page is a supplement to the AR Foundation [Face tracking](xref:arfoundation-face-tracking) manual. The following sections only contain information about APIs where ARKit exhibits unique platform-specific behavior.

[!include[](snippets/arf-docs-tip.md)]

> [!IMPORTANT]
> To use face tracking with ARKit, you must first enable face tracking in the XR Plug-in Management settings. Refer to [Enable the Face tracking subsystem](xref:arkit-project-config#enable-face-tracking) to understand how to enable face tracking for ARKit.
## Optional feature support

ARKit implements the following optional features of AR Foundation's [XRFaceSubsystem](xref:UnityEngine.XR.ARSubsystems.XRFaceSubsystem). The availability of features on specific devices depends on device hardware and software. Refer to [Requirements](#requirements) for more information.

| Feature | Descriptor Property | Supported |
| :------ | :------------------ | :-------: |
| **Face pose** | [supportsFacePose](xref:UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor.supportsFacePose) | Yes |
| **Face mesh vertices and indices** | [supportsFaceMeshVerticesAndIndices](xref:UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor.supportsFaceMeshVerticesAndIndices) | Yes |
| **Face mesh UVs** | [supportsFaceMeshUVs](xref:UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor.supportsFaceMeshUVs) | Yes |
| **Face mesh normals** | [supportsFaceMeshNormals](xref:UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor.supportsFaceMeshNormals) | |
| **Eye tracking** | [supportsEyeTracking](xref:UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor.supportsEyeTracking) | Yes |

> [!NOTE]
> Refer to AR Foundation [Face tracking platform support](xref:arfoundation-face-tracking-platform-support) for more information
> on the optional features of the face subsystem.
## Session configuration

Face tracking requires the use of the user-facing or "selfie" camera. It is the responsibility of your session's [XRSessionSubsystem.configurationChooser](xref:UnityEngine.XR.ARSubsystems.XRSessionSubsystem.configurationChooser) to choose the camera facing direction. You can override the configuration chooser to meet your app's needs. For more information on the [ConfigurationChooser](xref:UnityEngine.XR.ARSubsystems.ConfigurationChooser), refer to the [What’s new in Unity’s AR Foundation | Unite Now 2020](https://www.youtube.com/watch?v=jBRxY2KnrUs&t=677s) video (YouTube). You can access a sample that shows how to use the `ConfigurationChooser` to choose between the user-facing and world-facing camera on the [AR Foundation samples](https://github.com/Unity-Technologies/arfoundation-samples/tree/5.1/Assets/Scenes/Configurations) GitHub repository.

### Configuration chooser

iOS devices support different combinations of features in different camera facing directions. If your scene contains several manager components that require the world-facing camera, AR Foundation's default configuration chooser might decide to use the world-facing camera, even if the AR Face Manager component is also enabled in your scene. You can create your own [ConfigurationChooser](xref:UnityEngine.XR.ARSubsystems.ConfigurationChooser) to prioritize face tracking functionality over other features if you desire greater control over the camera's facing direction.

You can access an example of using a custom `ConfigurationChooser` in the `Rear Camera (ARKit)` sample on the [AR Foundations samples](https://github.com/Unity-Technologies/arfoundation-samples/blob/5.1/Assets/Scenes/FaceTracking/WorldCameraWithUserFacingFaceTracking.unity) GitHub. This example demonstrates how you can use the user-facing camera for face tracking, and the world-facing (rear) camera for passthrough video (iOS 13+).

## Blend shapes

ARKit provides a series of [blend shapes](https://developer.apple.com/documentation/arkit/arfaceanchor/2928251-blendshapes?language=objc) to describe different features of a face. Each blend shape is modulated from 0..1. For example, one blend shape defines how open the mouth is.

## Front facing camera
A blend shape represents action at a location on a face. Each blend shape is defined by an [ARKitBlendShapeLocation](xref:UnityEngine.XR.ARKit.ARKitBlendShapeLocation) to identify the location of the face action and a [ARKitBlendShapeCoefficient](xref:UnityEngine.XR.ARKit.ARKitBlendShapeCoefficient) to describe the amount of action at the location. The `ARKitBlendShapeCoefficient` is a value between `0.0` and `1.0`.

You can learn more about blend shapes with the `Blend shapes` sample on the [AR Foundation Samples](https://github.com/Unity-Technologies/arfoundation-samples/blob/5.1/Assets/Scripts/Runtime/ARKitBlendShapeVisualizer.cs) GitHub. This sample uses blend shapes to puppet a cartoon face which is displayed over the detected face.

## Face visualizer samples

Face tracking requires the use of the front-facing or "selfie" camera. When the front-facing camera is active, other tracking subsystems like plane tracking or image tracking may not be available. If the rear-facing camera is active, face tracking might not be available.
The [AR Foundation Samples](https://github.com/Unity-Technologies/arfoundation-samples/tree/5.1) GitHub repository contains ARKit-specific prefabs that you can use to visualize faces in your scene, as outlined in the following table. Refer to the AR Foundation [AR Face](xref:arfoundation-face-tracking-arface) manual for more information on how to use these prefabs.

Different iOS devices support different combinations of features. If you `Start` a subsystem that requires the rear-facing camera, the Apple ARKit package might decide to use the rear-facing camera instead. For more information, see [Camera and Tracking Mode Selection](https://docs.unity3d.com/Packages/[email protected]/manual/migration-guide-3.html#camera-and-tracking-mode-selection).
| Prefab | Description |
| :----- | :---------- |
| [AR Eye Pose Visualizer](https://github.com/Unity-Technologies/arfoundation-samples/blob/5.1/Assets/Prefabs/AR%20Eye%20Pose%20Visualizer.prefab) | Visualize the location and direction of the eyes of a detected face. |
| [Eye Laser Visualizer](https://github.com/Unity-Technologies/arfoundation-samples/blob/5.1/Assets/Prefabs/Eye%20Laser%20Prefab.prefab) | Use the eye pose to draw laser beams emitted from the detected face. |
| [Sloth Head](https://github.com/Unity-Technologies/arfoundation-samples/blob/5.1/Assets/Prefabs/SlothHead.prefab) | Use the face blend shapes provided by ARKit to animate a 3D character. |

## Technical details
<a id="requirements"></a>

### Requirements
## Requirements

Face tracking supports devices with Apple Neural Engine in iOS 14 and iPadOS 14 and requires a device with a TrueDepth camera on iOS 13 and iPadOS 13 and earlier. See Apple's [Tracking and Visualizing Faces](https://developer.apple.com/documentation/arkit/content_anchors/tracking_and_visualizing_faces?language=objc) documentation for more information.

Expand Down
22 changes: 22 additions & 0 deletions Documentation~/arkit-occlusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ uid: arkit-occlusion
---
# Occlusion

This page is a supplement to the AR Foundation [Occlusion](xref:arfoundation-occlusion) manual. The following sections only contain information about APIs where ARKit exhibits unique platform-specific behavior.

[!include[](snippets/arf-docs-tip.md)]

ARKit provides support for occlusion based on depth images it generates every frame.

There are three types of depth images that ARKit exposes through the provider's implementation of the [XROcclusionSubsystem](xref:UnityEngine.XR.ARSubsystems.XROcclusionSubsystem) implementation:
Expand All @@ -11,6 +15,22 @@ There are three types of depth images that ARKit exposes through the provider's
- **Human depth**: distance from the device to any part of a human recognized within the camera field of view.
- **Human stencil**: value that designates, for each pixel, whether that pixel is part of a recognized human.

## Optional feature support

ARKit implements the following optional features of AR Foundation's [XROcclusionSubsystem](xref:UnityEngine.XR.ARSubsystems.XROcclusionSubsystem). The availability of features depends on device hardware and software. Refer to [Requirements](#occlusion-requirements) for more information.

| Feature | Descriptor Property | Supported |
| :------ | :--------------- | :----------: |
| **Environment Depth Image** | [environmentDepthImageSupported](xref:UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor.environmentDepthImageSupported) | Yes |
| **Environment Depth Confidence Image** | [environmentDepthConfidenceImageSupported](xref:UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor.environmentDepthConfidenceImageSupported) | Yes |
| **Environment Depth Temporal Smoothing** | [environmentDepthImageSupported](xref:UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor.environmentDepthImageSupported) | Yes |
| **Human Segmentation Stencil Image** | [humanSegmentationStencilImageSupported](xref:UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor.humanSegmentationStencilImageSupported) | Yes |
| **Human Segmentation Depth Image** | [humanSegmentationDepthImageSupported](xref:UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor.humanSegmentationDepthImageSupported) | Yes |

> [!NOTE]
> Refer to AR Foundation [Occlusion platform support](xref:arfoundation-occlusion-platform-support) for more information
> on the optional features of the occlusion subsystem.
## Environment Depth

The occlusion subsystem provides access to two types of environment depth: [raw](xref:UnityEngine.XR.ARSubsystems.XROcclusionSubsystem.TryAcquireRawEnvironmentDepthCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage@)) and [smoothed](xref:UnityEngine.XR.ARSubsystems.XROcclusionSubsystem.TryAcquireSmoothedEnvironmentDepthCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage@)). These correspond to the following ARKit APIs:
Expand All @@ -21,6 +41,8 @@ The occlusion subsystem provides access to two types of environment depth: [raw]
> [!NOTE]
> You must enable smoothed depth by setting [environmentDepthTemporalSmoothingRequested](xref:UnityEngine.XR.ARSubsystems.XROcclusionSubsystem.environmentDepthTemporalSmoothingRequested) to `true`. Otherwise, [TryAcquireSmoothedEnvironmentDepthCpuImage](xref:UnityEngine.XR.ARSubsystems.XROcclusionSubsystem.TryAcquireSmoothedEnvironmentDepthCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage@)) will return `false`.
<a id="occlusion-requirements"></a>

## Requirements

Environment depth requires Xcode 12 or later, and it only works on iOS 14 devices with the LiDAR scanner, such as the new iPad Pro.
Expand Down
2 changes: 1 addition & 1 deletion Documentation~/snippets/apple-arkit-trademark.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

<hr>
\* *Apple and ARKit are trademarks of Apple Inc., registered in the U.S. and other countries and regions.*
<p><i>Apple and ARKit are trademarks of Apple Inc., registered in the U.S. and other countries and regions.</i></p>
2 changes: 2 additions & 0 deletions Documentation~/snippets/arf-docs-tip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> [!TIP]
> When developing an AR app, refer to both the AR Foundation documentation as well as the [required packages](xref:arfoundation-manual#required-packages) for each platform you support.
Binary file modified Runtime/FaceTracking/iOS/Xcode1500/libUnityARKitFaceTracking.a
Binary file not shown.
Binary file modified Runtime/iOS/Xcode1500/libUnityARKit.a
Binary file not shown.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.unity.xr.arkit",
"displayName": "Apple ARKit XR Plugin",
"version": "5.1.4",
"version": "5.1.5",
"unity": "2021.2",
"description": "Provides native Apple ARKit integration for use with Unity's multi-platform XR API.\nSupports the following features:\n-Efficient Background Rendering\n-Horizontal Planes\n-Depth Data\n-Anchors\n-Hit Testing\n-Face Tracking\n-Environment Probes\n-Meshing\n-Occlusion\n\n* Apple and ARKit are trademarks of Apple Inc., registered in the U.S. and other countries and regions.",
"keywords": [
Expand All @@ -13,20 +13,20 @@
],
"dependencies": {
"com.unity.editorcoroutines": "1.0.0",
"com.unity.xr.arfoundation": "5.1.4",
"com.unity.xr.arfoundation": "5.1.5",
"com.unity.xr.core-utils": "2.1.0",
"com.unity.xr.management": "4.0.1"
},
"_upm": {
"changelog": "### Changed\n\n- Changed the AR Foundation dependency version from 5.1.3 to 5.1.4\n\n### Fixed\n\n- Fixed an issue where the tvOS build target would have compile errors in `ARKit.InputLayoutLoader`."
"changelog": "### Changed\n\n- Rebuilt static libraries with Xcode version 15.4 (15F31d). You are now required to build iOS apps with Xcode 15.4 or newer.\n- Changed the AR Foundation dependency version from 5.1.4 to 5.1.5.\n\n### Fixed\n\n- Fixed issue [ARKB-58](https://issuetracker.unity3d.com/issues/arfoundation-application-crashes-when-arocclusionmanager-is-disabled-if-multithreaded-rendering-is-enabled-on-ios-devices-that-use-lidar) where iOS apps could intermittently crash when destroying the `AROcclusionManager` with multithreaded rendering enabled."
},
"upmCi": {
"footprint": "02444c21f06ea70f35a183ddf4dcf5d8e01e5f45"
"footprint": "dbc564c15f671b1311199382bc23b58640cf9ed3"
},
"documentationUrl": "https://docs.unity3d.com/Packages/[email protected]/manual/index.html",
"repository": {
"url": "https://github.cds.internal.unity3d.com/unity/arfoundation.git",
"type": "git",
"revision": "17e0eb6efa2c4360e6ea85191696374b4405f5f8"
"revision": "52ff43b68913047c2a4e0ddb5111a68a428287c0"
}
}

0 comments on commit a9e1db4

Please sign in to comment.