From bea1f46a19aef63b927db954060bfe6fae1a3f26 Mon Sep 17 00:00:00 2001
From: korejan <64199710+korejan@users.noreply.github.com>
Date: Sun, 7 Jul 2024 13:07:02 +0100
Subject: [PATCH] Adds option for face tracking data sources
* Adds new local module option for setting which data sources to use (QPro) face tracking
* Changes the default face tracking data sources to visual only (audio causes conflicting expressions when talking on the mic)
* Updates libalxr to latest version (v0.43.0)
* Update vrcft project refs to latest version (5.2.3.0)
---
ALXRLocalModule.cs | 17 +++++++++++++++++
ALXRLocalModule.csproj | 9 ++++++---
ALXRLocalModule.json | 6 +++---
ALXRRemoteModule.csproj | 9 ++++++---
ALXRRemoteModule.json | 6 +++---
ModuleConfig.cs | 9 ++++++++-
README.md | 9 ++++++++-
libalxr-sharp | 2 +-
8 files changed, 52 insertions(+), 15 deletions(-)
diff --git a/ALXRLocalModule.cs b/ALXRLocalModule.cs
index abcc1b1..c7d8944 100644
--- a/ALXRLocalModule.cs
+++ b/ALXRLocalModule.cs
@@ -212,6 +212,7 @@ private ALXRClientCtx CreateALXRClientCtx(ref LibALXRConfig config, bool eyeAvai
decoderType = ALXRDecoderType.D311VA,
displayColorSpace = ALXRColorSpace.Default,
passthroughMode = ALXRPassthroughMode.None,
+ faceTrackingDataSources = GetFaceTrackingDataSourcesFlag(ref config),
facialTracking = GetFacialExpressionType(ref config, eyeAvailable),
eyeTracking = GetEyeTrackingType(ref config, expressionAvailable),
trackingServerPortNo = ALXRClientConfig.DefaultPortNo,
@@ -249,5 +250,21 @@ private ALXREyeTrackingType GetEyeTrackingType(ref LibALXRConfig config, bool ex
return ALXREyeTrackingType.None;
return config.EyeTrackingExt;
}
+
+ private static uint GetFaceTrackingDataSourcesFlag(ref LibALXRConfig config)
+ {
+ uint dataSources = 0;
+ if (config.FaceTrackingDataSources != null)
+ {
+ foreach (var source in config.FaceTrackingDataSources)
+ {
+ if (source == ALXRFaceTrackingDataSource.VisualSource)
+ dataSources |= (uint)ALXRFaceTrackingDataSourceFlags.VisualSource;
+ if (source == ALXRFaceTrackingDataSource.AudioSource)
+ dataSources |= (uint)ALXRFaceTrackingDataSourceFlags.AudioSource;
+ }
+ }
+ return dataSources;
+ }
}
}
diff --git a/ALXRLocalModule.csproj b/ALXRLocalModule.csproj
index a666de1..b2ae721 100644
--- a/ALXRLocalModule.csproj
+++ b/ALXRLocalModule.csproj
@@ -6,7 +6,7 @@
warnings
x64
True
- 1.2.0
+ 1.3.0
@@ -38,12 +38,15 @@
-
+
- ..\..\Program Files\WindowsApps\96ba052f-0948-44d8-86c4-a0212e4ae047_5.1.1.0_x64__d7rcq4vxghz0r\VRCFaceTracking.Core.dll
+ ..\..\Program Files\WindowsApps\96ba052f-0948-44d8-86c4-a0212e4ae047_5.2.3.0_x64__4s4k90pjvq32p\VRCFaceTracking.Core.dll
+
+
+ ..\..\Program Files\WindowsApps\96ba052f-0948-44d8-86c4-a0212e4ae047_5.2.3.0_x64__4s4k90pjvq32p\VRCFaceTracking.SDK.dll
diff --git a/ALXRLocalModule.json b/ALXRLocalModule.json
index ea214b2..da869ee 100644
--- a/ALXRLocalModule.json
+++ b/ALXRLocalModule.json
@@ -1,7 +1,7 @@
{
"ModuleId": "19ba52ba-ba20-4dd3-afa0-359f54b858af",
- "LastUpdated": "2023-12-14T01:08:01Z",
- "Version": "1.2.0",
+ "LastUpdated": "2024-07-07T13:00:00Z",
+ "Version": "1.3.0",
"Downloads": 0,
"Ratings": 0,
"Rating": 0,
@@ -9,7 +9,7 @@
"ModuleName": "ALXR Local Module",
"ModuleDescription": "The module provides eye and/or facial tracking for PC OpenXR runtimes only (e.g. Link/AirLink) via libalxr.",
"UsageInstructions": "Set the active OpenXR runtime to the desired runtime and enable any relevant settings, start the runtime then run VRCFT. Details on config options/setup can be found on docs.vrcft.io or github repo.",
- "DownloadUrl": "https://github.com/korejan/VRCFT-ALXR-Modules/releases/download/v1.2.0/ALXRLocalModule.zip",
+ "DownloadUrl": "https://github.com/korejan/VRCFT-ALXR-Modules/releases/download/v1.3.0/ALXRLocalModule.zip",
"ModulePageUrl": "https://github.com/korejan/VRCFT-ALXR-Modules",
"DllFileName": "ALXRLocalModule.dll"
}
diff --git a/ALXRRemoteModule.csproj b/ALXRRemoteModule.csproj
index c118a86..d69c0ed 100644
--- a/ALXRRemoteModule.csproj
+++ b/ALXRRemoteModule.csproj
@@ -6,7 +6,7 @@
warnings
x64
True
- 1.2.0
+ 1.3.0
@@ -36,12 +36,15 @@
-
+
- ..\..\Program Files\WindowsApps\96ba052f-0948-44d8-86c4-a0212e4ae047_5.1.1.0_x64__d7rcq4vxghz0r\VRCFaceTracking.Core.dll
+ ..\..\Program Files\WindowsApps\96ba052f-0948-44d8-86c4-a0212e4ae047_5.2.3.0_x64__4s4k90pjvq32p\VRCFaceTracking.Core.dll
+
+
+ ..\..\Program Files\WindowsApps\96ba052f-0948-44d8-86c4-a0212e4ae047_5.2.3.0_x64__4s4k90pjvq32p\VRCFaceTracking.SDK.dll
diff --git a/ALXRRemoteModule.json b/ALXRRemoteModule.json
index 9c1aca4..fca0aea 100644
--- a/ALXRRemoteModule.json
+++ b/ALXRRemoteModule.json
@@ -1,7 +1,7 @@
{
"ModuleId": "cb54e4bd-969c-47cd-934d-eb3293575b6e",
- "LastUpdated": "2023-12-14T01:08:01Z",
- "Version": "1.2.0",
+ "LastUpdated": "2024-07-07T13:00:00Z",
+ "Version": "1.3.0",
"Downloads": 0,
"Ratings": 0,
"Rating": 0,
@@ -9,7 +9,7 @@
"ModuleName": "ALXR Remote Module",
"ModuleDescription": "The module provides OpenXR eye and/or facial tracking for variety of standalone & wired headsets via remote ALXR clients.",
"UsageInstructions": "Run VRCFT once and exit, add the client IP address to the generated ALXRModuleConfig.json desktop shortcut and run VRCFT. Details on other config options/setup can be found on docs.vrcft.io or github repo.",
- "DownloadUrl": "https://github.com/korejan/VRCFT-ALXR-Modules/releases/download/v1.2.0/ALXRRemoteModule.zip",
+ "DownloadUrl": "https://github.com/korejan/VRCFT-ALXR-Modules/releases/download/v1.3.0/ALXRRemoteModule.zip",
"ModulePageUrl": "https://github.com/korejan/VRCFT-ALXR-Modules",
"DllFileName": "ALXRRemoteModule.dll"
}
diff --git a/ModuleConfig.cs b/ModuleConfig.cs
index 9454122..3cc274f 100644
--- a/ModuleConfig.cs
+++ b/ModuleConfig.cs
@@ -48,6 +48,8 @@ public struct LibALXRConfig
public ALXREyeTrackingType EyeTrackingExt;
[JsonInclude]
public ALXRFacialExpressionType FacialTrackingExt;
+ [JsonInclude]
+ public List FaceTrackingDataSources;
public static LibALXRConfig Default
{
@@ -59,7 +61,11 @@ public static LibALXRConfig Default
SimulateHeadless = true,
GraphicsApi = ALXRGraphicsApi.Auto,
EyeTrackingExt = ALXREyeTrackingType.Auto,
- FacialTrackingExt = ALXRFacialExpressionType.Auto
+ FacialTrackingExt = ALXRFacialExpressionType.Auto,
+ FaceTrackingDataSources = new List()
+ {
+ ALXRFaceTrackingDataSource.VisualSource,
+ },
};
}
}
@@ -183,6 +189,7 @@ private static void AddJsonConverters(JsonSerializerOptions jsonOptions)
jsonOptions.Converters.Add(new EnumStringConverter());
jsonOptions.Converters.Add(new EnumStringConverter());
jsonOptions.Converters.Add(new EnumStringConverter());
+ jsonOptions.Converters.Add(new EnumStringConverter());
jsonOptions.Converters.Add(new EnumStringConverter());
}
diff --git a/README.md b/README.md
index 41814b8..9817de7 100644
--- a/README.md
+++ b/README.md
@@ -121,7 +121,10 @@ The following entries in `ALXRModuleConfig.json` are specifically for configurin
"SimulateHeadless": true,
"GraphicsApi": "Auto",
"EyeTrackingExt": "Auto",
- "FacialTrackingExt": "Auto"
+ "FacialTrackingExt": "Auto",
+ "FaceTrackingDataSources": [
+ "VisualSource"
+ ]
}
```
@@ -152,3 +155,7 @@ The following entries in `ALXRModuleConfig.json` are specifically for configurin
* [`"FB"`](https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#XR_FB_face_tracking) - Typically Quest Pro
* [`"HTC"`](https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#XR_HTC_facial_tracking) - Typically vive facial tracker (requires "Vive console for SteamVR") or Focus 3 facial tracker add-on
* `"Auto"` - default, auto selects any available in the above order.
+
+`FaceTrackingDataSources` - Sets one or more data sources for face tracking. The following options are:
+* `"VisualSource"` - default, enable visual data source for face tracking.
+* `"AudioSource"` - enable audio data source for face tracking (not recommended).
diff --git a/libalxr-sharp b/libalxr-sharp
index 19f67b1..6d5b530 160000
--- a/libalxr-sharp
+++ b/libalxr-sharp
@@ -1 +1 @@
-Subproject commit 19f67b1fc9e1a4e522cfef4bec81dd90f78d11df
+Subproject commit 6d5b530356d1b245f76896e94d129bb723d13e35