![]() Getting hand pose works for close interactions like grabbing objects or pressing buttons. If you need anything more complicated, such as drawing a hand mesh with a custom shader, you need to get the meshes as a tracked geometry. To manage the rendering process, you should use Render Motion Controller from XRVisualization: Then in the blueprint editor, you should use Set Use Hand Mesh function from the Microsoft OpenXR plugin with Enabled XRVisualization as a parameter: The recommended way to visualize hand mesh is to use Epic’s XRVisualization plugin together with the Microsoft OpenXR plugin. Overwrite On Add/Update/Remove Tracked Geometry with the following nodes in your Event Graph:.Go to the Details panel and expand the Events section.Add an ARTrackableNotify Component to a Blueprint actor.You can access mesh data through the UARTrackedGeometry::GetUnderlyingMesh: UMRMeshComponent* UARTrackedGeometry::GetUnderlyingMesh() Make sure your delegate handlers follow the function signature below: void UARHandMeshComponent::OnTrackableAdded(UARTrackedGeometry* Added) class FARSupportInterfaceĭECLARE_AR_SI_DELEGATE_FUNCS(OnTrackableAdded)ĭECLARE_AR_SI_DELEGATE_FUNCS(OnTrackableUpdated)ĭECLARE_AR_SI_DELEGATE_FUNCS(OnTrackableRemoved) The following delegates are called when the system detects any trackable object, including a hand mesh. enum class EARObjectClassification : uint8 Use EEARObjectClassification to find hand mesh values in all trackable objects. You can change them at any time in Blueprints or code for any mesh. These parameter values are used as the spatial mapping mesh and hand mesh defaults. Render Mesh Data in Wireframe – debug parameter that shows generated mesh.Select your ARSessionConfig asset, expand the AR Settings -> World Mapping settings, and check Generate Mesh Data from Tracked Geometry.Accessing Hand Mesh Dataīefore you can access hand mesh data, you'll need to: If you enable one, the other is automatically disabled. It’s not possible for both modes to be enabled at the same time. Animation can be retargeted using WindowsMixedRealityHandTrackingLiveLinkRemapAsset: The hand animation hierarchy is the same as in EWMRHandKeypoint. Select Source and enable Windows Mixed Reality Hand Tracking SourceĪfter you enable the source and open an animation asset, expand the Animation section in the Preview Scene tab too see additional options.Select Window > Live Link to open the Live Link editor window.If the Windows Mixed Reality and Live Link plugins are enabled: Hand poses are exposed to Animation using the Live Link plugin. **Return Value-true if the bone is tracked this frame, false if the bone isn't tracked.**Radius-radius of the base of the bone.You can request the base of the next bone to get the transform data for the end of a bone. Transform – coordinates and orientation of bone’s base.Hand – can be the users left or right hand.Here's a breakdown of GetHandJointTransform's function parameters: ![]() It's not recommended to have heavy logic in this function for performance reasons.Ĭ++: static bool UWindowsMixedRealityHandTrackingFunctionLibrary::GetHandJointTransform(EControllerHand Hand, EWMRHandKeypoint Keypoint, FTransform& OutTransform, float& OutRadius) The data updates every frame, but if you're inside a frame the returned values are cached. You can use GetHandJointTransform to return spatial data from the hand. static bool UWindowsMixedRealityHandTrackingFunctionLibrary::SupportsHandTracking() Include WindowsMixedRealityHandTrackingFunctionLibrary.h. This function returns true if hand tracking is supported on the device and false if hand tracking isn't available. You can use hand tracking in Blueprints by adding Supports Hand Tracking from Hand Tracking > Windows Mixed Reality: You can find the numerical values for each enum case in the table. The full C++ enum is listed below: enum class EWMRHandKeypoint : uint8 You can find each hand keypoint listed in your Blueprints: The EWMRHandKeypoint enum describes the Hand’s bone hierarchy. Otherwise, you may get undefined behavior in access to positions, rotations, and radii arrays. It's important to check if the structure is valid and that it's a hand. Below is a sample Blueprint script that parses the XRMotionControllerData structure to get hand joint locations and draws a debug coordinate system at each joint’s location. That function returns an XRMotionControllerData structure. You can get all this data from a user’s hands using the Get Motion Controller Data function. The hierarchy is described by EHandKeypoint enum: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |