-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 882af37
Showing
140 changed files
with
1,146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+26.3 KB
.vs/VDFaceTracking/FileContentIndex/16282f74-266e-407c-b708-640182b6e3a6.vsidx
Binary file not shown.
Binary file added
BIN
+8.98 KB
.vs/VDFaceTracking/FileContentIndex/1e849b46-b270-4d9d-9341-4aeb8b262cc4.vsidx
Binary file not shown.
Binary file added
BIN
+8 KB
.vs/VDFaceTracking/FileContentIndex/5a1b52c8-3473-4be9-bf20-ffcd8004e3b6.vsidx
Binary file not shown.
Binary file added
BIN
+8.23 KB
.vs/VDFaceTracking/FileContentIndex/7b07dfe8-a976-46da-ab34-56b38c649981.vsidx
Binary file not shown.
Binary file added
BIN
+6.14 KB
.vs/VDFaceTracking/FileContentIndex/b96e449a-4d55-4774-9eda-a32250822c0b.vsidx
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
namespace VDFaceTracking | ||
{ | ||
public static class FBExpression | ||
{ | ||
public const int Brow_Lowerer_L = 0; | ||
public const int Brow_Lowerer_R = 1; | ||
public const int Cheek_Puff_L = 2; | ||
public const int Cheek_Puff_R = 3; | ||
public const int Cheek_Raiser_L = 4; | ||
public const int Cheek_Raiser_R = 5; | ||
public const int Cheek_Suck_L = 6; | ||
public const int Cheek_Suck_R = 7; | ||
public const int Chin_Raiser_B = 8; | ||
public const int Chin_Raiser_T = 9; | ||
public const int Dimpler_L = 10; | ||
public const int Dimpler_R = 11; | ||
public const int Eyes_Closed_L = 12; | ||
public const int Eyes_Closed_R = 13; | ||
public const int Eyes_Look_Down_L = 14; | ||
public const int Eyes_Look_Down_R = 15; | ||
public const int Eyes_Look_Left_L = 16; | ||
public const int Eyes_Look_Left_R = 17; | ||
public const int Eyes_Look_Right_L = 18; | ||
public const int Eyes_Look_Right_R = 19; | ||
public const int Eyes_Look_Up_L = 20; | ||
public const int Eyes_Look_Up_R = 21; | ||
public const int Inner_Brow_Raiser_L = 22; | ||
public const int Inner_Brow_Raiser_R = 23; | ||
public const int Jaw_Drop = 24; | ||
public const int Jaw_Sideways_Left = 25; | ||
public const int Jaw_Sideways_Right = 26; | ||
public const int Jaw_Thrust = 27; | ||
public const int Lid_Tightener_L = 28; | ||
public const int Lid_Tightener_R = 29; | ||
public const int Lip_Corner_Depressor_L = 30; | ||
public const int Lip_Corner_Depressor_R = 31; | ||
public const int Lip_Corner_Puller_L = 32; | ||
public const int Lip_Corner_Puller_R = 33; | ||
public const int Lip_Funneler_LB = 34; | ||
public const int Lip_Funneler_LT = 35; | ||
public const int Lip_Funneler_RB = 36; | ||
public const int Lip_Funneler_RT = 37; | ||
public const int Lip_Pressor_L = 38; | ||
public const int Lip_Pressor_R = 39; | ||
public const int Lip_Pucker_L = 40; | ||
public const int Lip_Pucker_R = 41; | ||
public const int Lip_Stretcher_L = 42; | ||
public const int Lip_Stretcher_R = 43; | ||
public const int Lip_Suck_LB = 44; | ||
public const int Lip_Suck_LT = 45; | ||
public const int Lip_Suck_RB = 46; | ||
public const int Lip_Suck_RT = 47; | ||
public const int Lip_Tightener_L = 48; | ||
public const int Lip_Tightener_R = 49; | ||
public const int Lips_Toward = 50; | ||
public const int Lower_Lip_Depressor_L = 51; | ||
public const int Lower_Lip_Depressor_R = 52; | ||
public const int Mouth_Left = 53; | ||
public const int Mouth_Right = 54; | ||
public const int Nose_Wrinkler_L = 55; | ||
public const int Nose_Wrinkler_R = 56; | ||
public const int Outer_Brow_Raiser_L = 57; | ||
public const int Outer_Brow_Raiser_R = 58; | ||
public const int Upper_Lid_Raiser_L = 59; | ||
public const int Upper_Lid_Raiser_R = 60; | ||
public const int Upper_Lip_Raiser_L = 61; | ||
public const int Upper_Lip_Raiser_R = 62; | ||
public const int Max = 63; | ||
|
||
// Above are the natural expressions tracked by the Quest Pro | ||
// Below is the eye tracking information | ||
public const int LeftRot_x = 64; | ||
public const int LeftRot_y = 65; | ||
public const int LeftRot_z = 66; | ||
public const int LeftRot_w = 67; | ||
public const int LeftPos_x = 68; | ||
public const int LeftPos_y = 70; // Flipped, need to convert RHS to LHS | ||
public const int LeftPos_z = 69; | ||
// public const int 71 is unused | ||
public const int RightRot_x = 72; | ||
public const int RightRot_y = 73; | ||
public const int RightRot_z = 74; | ||
public const int RightRot_w = 75; | ||
public const int RightPos_x = 76; | ||
public const int RightPos_y = 78; // Flipped, need to convert RHS to LHS | ||
public const int RightPos_z = 77; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
[assembly: AssemblyTitle("VDFaceTracking")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("VDFaceTracking")] | ||
[assembly: AssemblyCopyright("Copyright © 2023")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: ComVisible(false)] | ||
[assembly: Guid("39d944a3-538c-4a2d-8e53-8db606c64233")] | ||
[assembly: AssemblyFileVersion("1.12.6")] | ||
[assembly: AssemblyVersion("1.12.6.0")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# VDFaceTracking | ||
|
||
This is a Resonite mod, which lets the game read facial expressions and eye gaze directly from VirtualDesktop (v1.29 or newer). | ||
|
||
This was patched together from [dfgHiatus' QuestPro4Neos mod](https://github.com/dfgHiatus/QuestPro4Neos) and [VirtualDesktop](https://www.vrdesktop.net/) VRCFT module. | ||
|
||
To install this mod go grab the release [over here](https://github.com/Zeitheron/VDFaceTracking/releases/latest) and put it into `Resonite\rml_mods\` folder. | ||
|
||
You are going to need [Resonite Mod Loader](https://github.com/resonite-modding-group/ResoniteModLoader), read how to install it there. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
using FrooxEngine; | ||
using HarmonyLib; | ||
using ResoniteModLoader; | ||
using System; | ||
using System.Threading; | ||
|
||
namespace VDFaceTracking | ||
{ | ||
public class VDFaceTracking : ResoniteMod | ||
{ | ||
[AutoRegisterConfigKey] | ||
private static readonly ModConfigurationKey<float> EyeOpennessExponent = | ||
new("quest_pro_eye_open_exponent", | ||
"Exponent to apply to eye openness. Can be updated at runtime. Useful for applying different curves for how open your eyes are.", | ||
() => 1.0f); | ||
|
||
[AutoRegisterConfigKey] | ||
private static readonly ModConfigurationKey<float> EyeWideMultiplier = | ||
new("quest_pro_eye_wide_multiplier", | ||
"Multiplier to apply to eye wideness. Can be updated at runtime. Useful for multiplying the amount your eyes can widen by.", | ||
() => 1.0f); | ||
|
||
[AutoRegisterConfigKey] | ||
private static readonly ModConfigurationKey<float> EyeMovementMultiplier = | ||
new("quest_pro_eye_movement_multiplier", | ||
"Multiplier to adjust the movement range of the user's eyes. Can be updated at runtime.", () => 1.0f); | ||
|
||
[AutoRegisterConfigKey] | ||
private static readonly ModConfigurationKey<float> EyeExpressionMultiplier = | ||
new("quest_pro_eye_expression_multiplier", | ||
"Multiplier to adjust the range of the user's eye expressions. Can be updated at runtime.", () => 1.0f); | ||
|
||
|
||
private static ModConfiguration _config; | ||
|
||
public override string Name => "VDFaceTracking"; | ||
|
||
public override string Author => "Zeith & dfgHiatus & Geenz & Earthmark"; | ||
|
||
public override string Version => "1.0.0"; | ||
|
||
public static VDProxy proxy; | ||
|
||
public static float EyeOpenExponent = 1.0f; | ||
public static float EyeWideMult = 1.0f; | ||
public static float EyeMoveMult = 1.0f; | ||
public static float EyeExpressionMult = 1.0f; | ||
|
||
public override void OnEngineInit() | ||
{ | ||
_config = GetConfiguration(); | ||
_config.OnThisConfigurationChanged += OnConfigurationChanged; | ||
|
||
new Harmony("org.zeith.VDFaceTracking").PatchAll(); | ||
} | ||
|
||
private void OnConfigurationChanged(ConfigurationChangedEvent @event) | ||
{ | ||
if (@event.Key == EyeOpennessExponent) | ||
{ | ||
if (@event.Config.TryGetValue(EyeOpennessExponent, out var openExp)) | ||
{ | ||
EyeOpenExponent = openExp; | ||
} | ||
} | ||
|
||
if (@event.Key == EyeWideMultiplier) | ||
{ | ||
if (@event.Config.TryGetValue(EyeWideMultiplier, out var wideMulti)) | ||
{ | ||
EyeWideMult = wideMulti; | ||
} | ||
} | ||
|
||
if (@event.Key == EyeMovementMultiplier) | ||
{ | ||
if (@event.Config.TryGetValue(EyeMovementMultiplier, out var moveMulti)) | ||
{ | ||
EyeMoveMult = moveMulti; | ||
} | ||
} | ||
|
||
if (@event.Key == EyeExpressionMultiplier) | ||
{ | ||
if (@event.Config.TryGetValue(EyeExpressionMultiplier, out var eyeExpressionMulti)) | ||
{ | ||
EyeExpressionMult = eyeExpressionMulti; | ||
} | ||
} | ||
} | ||
|
||
[HarmonyPatch(typeof(InputInterface), MethodType.Constructor)] | ||
[HarmonyPatch(new Type[] { typeof(Engine) })] | ||
public class InputInterfaceCtorPatch | ||
{ | ||
public static void Postfix(InputInterface __instance) | ||
{ | ||
proxy = new VDProxy(); | ||
|
||
if (!proxy.Initialize()) return; | ||
|
||
__instance.RegisterInputDriver(proxy); | ||
|
||
Engine.Current.OnShutdown += () => proxy.Teardown(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>VDFaceTracking</RootNamespace> | ||
<AssemblyName>VDFaceTracking</AssemblyName> | ||
<LangVersion>latest</LangVersion> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
<TargetFrameworkProfile /> | ||
<ProjectGuid>{39D944A3-538C-4A2D-8E53-8DB606C64233}</ProjectGuid> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="FBExpression.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="VDFaceTracking.cs" /> | ||
<Compile Include="VDProxy.cs" /> | ||
<Compile Include="VirtualDesktop\FaceTracking\Expressions.cs" /> | ||
<Compile Include="VirtualDesktop\FaceTracking\FaceState.cs" /> | ||
<Compile Include="VirtualDesktop\FaceTracking\Pose.cs" /> | ||
<Compile Include="VirtualDesktop\FaceTracking\Quaternion.cs" /> | ||
<Compile Include="VirtualDesktop\FaceTracking\Vector3.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Reference Include="0Harmony"> | ||
<HintPath>F:\SteamLibrary\steamapps\common\Resonite\rml_libs\0Harmony.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Elements.Core"> | ||
<HintPath>F:\SteamLibrary\steamapps\common\Resonite\Resonite_Data\Managed\Elements.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="FrooxEngine"> | ||
<HintPath>F:\SteamLibrary\steamapps\common\Resonite\Resonite_Data\Managed\FrooxEngine.dll</HintPath> | ||
</Reference> | ||
<Reference Include="ResoniteModLoader"> | ||
<HintPath>F:\SteamLibrary\steamapps\common\Resonite\Libraries\ResoniteModLoader.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<PropertyGroup> | ||
<PostBuildEvent>copy "$(TargetDir)\$(TargetFileName)" "F:\SteamLibrary\steamapps\common\Resonite\rml_mods\"</PostBuildEvent> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.2.32526.322 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VDFaceTracking", "VDFaceTracking.csproj", "{39d944a3-538c-4a2d-8e53-8db606c64233}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{39d944a3-538c-4a2d-8e53-8db606c64233}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{39d944a3-538c-4a2d-8e53-8db606c64233}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{39d944a3-538c-4a2d-8e53-8db606c64233}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{39d944a3-538c-4a2d-8e53-8db606c64233}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {0322B2EF-7452-479D-BAE2-FCAB75033337} | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.