From 411c1c3fd196e1ffe0af90ba61ca3c6eb5576003 Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Tue, 19 Mar 2024 15:43:22 +0100 Subject: [PATCH] integrate the virtual hand mesh from allbreaker --- CHANGELOG.md | 1 + .../Materials/M_SenseGlove_VirtualHand.uasset | 3 ++ .../PHYS_Allbreaker_VirtualHand_Left.uasset | 3 ++ .../PHYS_Allbreaker_VirtualHand_Right.uasset | 3 ++ .../SKEL_Allbreaker_VirtualHand_Left.uasset | 3 ++ .../SKEL_Allbreaker_VirtualHand_Right.uasset | 3 ++ .../SK_Allbreaker_VirtualHand_Left.uasset | 3 ++ .../SK_Allbreaker_VirtualHand_Right.uasset | 3 ++ LICENSE-THIRD-PARTY.md | 13 +++++++ .../Components/SGVirtualHandComponent.cpp | 38 ++++++------------- 10 files changed, 46 insertions(+), 27 deletions(-) create mode 100644 Content/Materials/M_SenseGlove_VirtualHand.uasset create mode 100644 Content/Meshes/Allbreaker/PHYS_Allbreaker_VirtualHand_Left.uasset create mode 100644 Content/Meshes/Allbreaker/PHYS_Allbreaker_VirtualHand_Right.uasset create mode 100644 Content/Meshes/Allbreaker/SKEL_Allbreaker_VirtualHand_Left.uasset create mode 100644 Content/Meshes/Allbreaker/SKEL_Allbreaker_VirtualHand_Right.uasset create mode 100644 Content/Meshes/Allbreaker/SK_Allbreaker_VirtualHand_Left.uasset create mode 100644 Content/Meshes/Allbreaker/SK_Allbreaker_VirtualHand_Right.uasset diff --git a/CHANGELOG.md b/CHANGELOG.md index 958e3737..78fa5898 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ This is the second major release of the SenseGlove Unreal Engine Plugin adding s - Added support for the SenseGlove Nova 2 devices. - Various classes have been added to the API in order to implement the new functionalities and features from the latest upstream SenseGlove libraries. - Added initial support for the upcoming Unreal Engine 5.4 release. +- Added a pair of default production-ready virtual hand meshes for the left and right hands, courtesy of [Allbreaker LLC Columbia](https://www.allbreaker.co/). For usage and redistribution, please consult the [LICENSE-THIRD-PARTY.md](LICENSE-THIRD-PARTY.md) file. ### Fixed diff --git a/Content/Materials/M_SenseGlove_VirtualHand.uasset b/Content/Materials/M_SenseGlove_VirtualHand.uasset new file mode 100644 index 00000000..960a80ca --- /dev/null +++ b/Content/Materials/M_SenseGlove_VirtualHand.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffc5ec37eff81f3298922c7cc4807144181289129485e3e7bbd0cd10b1186c52 +size 9219 diff --git a/Content/Meshes/Allbreaker/PHYS_Allbreaker_VirtualHand_Left.uasset b/Content/Meshes/Allbreaker/PHYS_Allbreaker_VirtualHand_Left.uasset new file mode 100644 index 00000000..689fafd0 --- /dev/null +++ b/Content/Meshes/Allbreaker/PHYS_Allbreaker_VirtualHand_Left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b5d5538678c281b1f29840a44ccbd8c507f0f6e43c2841735da774413112f31 +size 8020 diff --git a/Content/Meshes/Allbreaker/PHYS_Allbreaker_VirtualHand_Right.uasset b/Content/Meshes/Allbreaker/PHYS_Allbreaker_VirtualHand_Right.uasset new file mode 100644 index 00000000..d5e03ebf --- /dev/null +++ b/Content/Meshes/Allbreaker/PHYS_Allbreaker_VirtualHand_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5ffab3ac5f895180d50cd2cb92a8a51c073ef0110d9fadf53f26f7577e313f8 +size 8147 diff --git a/Content/Meshes/Allbreaker/SKEL_Allbreaker_VirtualHand_Left.uasset b/Content/Meshes/Allbreaker/SKEL_Allbreaker_VirtualHand_Left.uasset new file mode 100644 index 00000000..b4803cdf --- /dev/null +++ b/Content/Meshes/Allbreaker/SKEL_Allbreaker_VirtualHand_Left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:990634d8828e0bfcd4255a899bc1286b2a9ef17f789d24bb35b85f927bc8010d +size 18730 diff --git a/Content/Meshes/Allbreaker/SKEL_Allbreaker_VirtualHand_Right.uasset b/Content/Meshes/Allbreaker/SKEL_Allbreaker_VirtualHand_Right.uasset new file mode 100644 index 00000000..8034ca36 --- /dev/null +++ b/Content/Meshes/Allbreaker/SKEL_Allbreaker_VirtualHand_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5edde6db380af6f12b8c93d030ae347fd1bc8646997bdf6ba9bf6e6bd038eb58 +size 18615 diff --git a/Content/Meshes/Allbreaker/SK_Allbreaker_VirtualHand_Left.uasset b/Content/Meshes/Allbreaker/SK_Allbreaker_VirtualHand_Left.uasset new file mode 100644 index 00000000..e5cd9e15 --- /dev/null +++ b/Content/Meshes/Allbreaker/SK_Allbreaker_VirtualHand_Left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3fa7771ea5a19bea15aadf92cd3a502e04aa2f77e8f1ba86bd560f974722b07 +size 684590 diff --git a/Content/Meshes/Allbreaker/SK_Allbreaker_VirtualHand_Right.uasset b/Content/Meshes/Allbreaker/SK_Allbreaker_VirtualHand_Right.uasset new file mode 100644 index 00000000..0c2c3b1a --- /dev/null +++ b/Content/Meshes/Allbreaker/SK_Allbreaker_VirtualHand_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c0d585a35f43b8fd4d515dff5a2b170e687fef8bd9ccdec8f0e06005f0d04bc +size 645668 diff --git a/LICENSE-THIRD-PARTY.md b/LICENSE-THIRD-PARTY.md index ac694f56..b21e0f4a 100644 --- a/LICENSE-THIRD-PARTY.md +++ b/LICENSE-THIRD-PARTY.md @@ -85,3 +85,16 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` + +## Allbreaker Virtual Hand Models + +``` +The virtual hand model mesh included in this plugin, situated within the +‘Contents/Meshes/Allbreaker’ folder, is graciously supplied by Allbreaker LLC +Colombia. This provision is made pursuant to an agreement between SenseGlove +B.V. and Allbreaker LLC. Users of this plugin are bound by the terms outlined in +the license agreement and are advised to review the terms and conditions +specified therein. +Please visit https://www.allbreaker.co/ to obtain information about the work of +Allbreaker. +``` diff --git a/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp b/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp index 6ce65730..625b869e 100644 --- a/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp +++ b/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp @@ -36,11 +36,8 @@ #include "SenseGlove/Components/SGVirtualHandComponent.h" #include "Animation/Skeleton.h" -#include "Components/SphereComponent.h" #include "Components/SkeletalMeshComponent.h" #include "Engine/SkeletalMesh.h" -#include "Kismet/GameplayStatics.h" -#include "Runtime/Launch/Resources/Version.h" #include "Templates/UnrealTypeTraits.h" #include "UObject/ConstructorHelpers.h" @@ -60,29 +57,29 @@ struct USGVirtualHandComponent::FImpl FORCEINLINE static const FString& GetDefaultLeftHandMeshPath() { - static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/" - "SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left'")}; + static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/Allbreaker/" + "SK_Allbreaker_VirtualHand_Left.SK_Allbreaker_VirtualHand_Left'")}; return Path; } FORCEINLINE static const FString& GetDefaultLeftHandMeshPathOnly() { - static const FString Path{TEXT("/SenseGlove/Meshes/" - "SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left")}; + static const FString Path{TEXT("/SenseGlove/Meshes/Allbreaker/" + "SK_Allbreaker_VirtualHand_Left.SK_Allbreaker_VirtualHand_Left")}; return Path; } FORCEINLINE static const FString& GetDefaultRightHandMeshPath() { - static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/" - "SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right'")}; + static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/Allbreaker/" + "SK_Allbreaker_VirtualHand_Right.SK_Allbreaker_VirtualHand_Right'")}; return Path; } FORCEINLINE static const FString& GetDefaultRightHandMeshPathOnly() { - static const FString Path{TEXT("/SenseGlove/Meshes/" - "SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right")}; + static const FString Path{TEXT("/SenseGlove/Meshes/Allbreaker/" + "SK_Allbreaker_VirtualHand_Right.SK_Allbreaker_VirtualHand_Right")}; return Path; } @@ -214,7 +211,7 @@ USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& Objec bAutoStopAllHapticsOnEndPlay = true; - GrabSocketName = FName{TEXT("GrabPoint")}; + GrabSocketName = FName{TEXT("GenericGrabPoint")}; DefaultFingertipsGrabColliderSize = FVector{0.08f, 0.08f, 0.08f}; @@ -568,25 +565,12 @@ USkeletalMesh* USGVirtualHandComponent::FImpl::LoadDefaultMesh() const void USGVirtualHandComponent::FImpl::SetDefaultMesh() const { - // FIXME - // Since we dont ship a default virtual hand mesh at the moment, calling SetDefaultMesh causes the following failed - // assertion due the fact that the engine won't be able to find the asset at the default location: - // Assertion failed: IsInGameThread() - // Unable to load /SenseGlove/Meshes/SK_SenseGlove_VirtualHand_*. Objects and Packages can only be loaded from the - // One workaround would be disabling the async loading or as an alternative simply disabling this portion of the - // code should be a good-enough fix until we address this issue in it's own time. - //Owner->SetSkeletalMesh(LoadDefaultMesh(), true); + Owner->SetSkeletalMesh(LoadDefaultMesh(), true); } USkeletalMesh* USGVirtualHandComponent::FImpl::GetMesh() const { - return Owner-> -#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1 - GetSkeletalMeshAsset() -#else /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */ - SkeletalMesh -#endif /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */ - ; + return Owner->GetSkeletalMeshAsset(); } USkeleton* USGVirtualHandComponent::FImpl::GetSkeleton() const