Component:HandPoser: Difference between revisions

From Resonite Wiki
m 989onan moved page HandPoser (Component) to Component:HandPoser: Misspelled title
Semi-automatic update
Line 24: Line 24:
|HandUp|Float3| A unit vector pointing from the back of the hand outwards (alternatively phrased, this is pointing into the palm)
|HandUp|Float3| A unit vector pointing from the back of the hand outwards (alternatively phrased, this is pointing into the palm)
|HandRight|Float3| A unit vector pointing to the right of the hand, if the hand is facing down. This is roughly the direction of the thumb on the left hand, and the other side of the hand from the thumb on the right hand.
|HandRight|Float3| A unit vector pointing to the right of the hand, if the hand is facing down. This is roughly the direction of the thumb on the left hand, and the other side of the hand from the thumb on the right hand.
|CoordinateCompensation|FloatQ|  
|Thumb|{{RootFieldType|(nested)|[[#Finger|Finger]]}}|TypeAdv7=true|
|Root|Slot| The slot representing the thumb metacarpal bone.
|Index|{{RootFieldType|(nested)|[[#Finger|Finger]]}}|TypeAdv8=true|
|OriginalRotation|FloatQ|  
|Middle|{{RootFieldType|(nested)|[[#Finger|Finger]]}}|TypeAdv9=true|
|RotationDrive|FloatQ|
|Ring|{{RootFieldType|(nested)|[[#Finger|Finger]]}}|TypeAdv10=true|
|CoordinateCompensation|FloatQ|  
|Pinky|{{RootFieldType|(nested)|[[#Finger|Finger]]}}|TypeAdv11=true|
|Root|Slot| The slot representing the thumb proximal bone.
|DebugFingers|Bool|
|OriginalRotation|FloatQ|  
}}
|RotationDrive|FloatQ|
{| class="wikitable mw-collapsible"
|CoordinateCompensation|FloatQ|  
|+ Methods
|Root|Slot| The slot representing the thumb intermediate bone. In a human hand this bone does not exist, and this field in general will always be null.
|-
|OriginalRotation|FloatQ|  
! Name
|RotationDrive|FloatQ|  
! Description
|CoordinateCompensation|FloatQ|  
|-
|Root|Slot| The slot representing the thumb distal bone.
| <code>AssignFromRig</code>
|OriginalRotation|FloatQ|  
| This initializes the driver based on the rig details.
|RotationDrive|FloatQ|  
|-
|CoordinateCompensation|FloatQ|
| <code>InitializeHand</code>
|Root|Slot|
| This populates every numeric field and drive field in the component based on the populated Root slots. This should not be pressed when someone is inside the avatar or the hands may crumple.
|OriginalRotation|FloatQ|
|}
|RotationDrive|FloatQ|
 
|CoordinateCompensation|FloatQ|
== Finger ==
|Root|Slot|
{{Table TypeFields
|OriginalRotation|FloatQ|
|Metacarpal|{{RootFieldType|(nested)|[[#FingerSegment|FingerSegment]]}}|TypeAdv0=true|
|RotationDrive|FloatQ|
|Proximal|{{RootFieldType|(nested)|[[#FingerSegment|FingerSegment]]}}|TypeAdv1=true|
|CoordinateCompensation|FloatQ|
|Intermediate|{{RootFieldType|(nested)|[[#FingerSegment|FingerSegment]]}}|TypeAdv2=true|
|Root|Slot|
|Distal|{{RootFieldType|(nested)|[[#FingerSegment|FingerSegment]]}}|TypeAdv3=true|
|OriginalRotation|FloatQ|
}}
|RotationDrive|FloatQ|
 
|CoordinateCompensation|FloatQ|
== FingerSegment ==
|Root|Slot|
{{Table TypeFields
|OriginalRotation|FloatQ|
|CoordinateCompensation|FloatQ|
|RotationDrive|FloatQ|
|Root|Slot|The slot representing this bone. Note that a human hand has no thumb intermediate bone, so this field will in general always be null.
|CoordinateCompensation|FloatQ|
|OriginalRotation|FloatQ|
|Root|Slot|
|RotationDrive|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv3=true|
|OriginalRotation|FloatQ|  
|RotationDrive|FloatQ|  
|CoordinateCompensation|FloatQ|  
|Root|Slot|
|OriginalRotation|FloatQ|  
|RotationDrive|FloatQ|  
|CoordinateCompensation|FloatQ|
|Root|Slot|  
|OriginalRotation|FloatQ|  
|RotationDrive|FloatQ|  
|CoordinateCompensation|FloatQ|  
|Root|Slot|  
|OriginalRotation|FloatQ|
|RotationDrive|FloatQ|
|CoordinateCompensation|FloatQ|
|Root|Slot|
|OriginalRotation|FloatQ|
|RotationDrive|FloatQ|
|CoordinateCompensation|FloatQ|
|Root|Slot|
|OriginalRotation|FloatQ|
|RotationDrive|FloatQ|
|CoordinateCompensation|FloatQ|
|Root|Slot|
|OriginalRotation|FloatQ|
|RotationDrive|FloatQ|
|CoordinateCompensation|FloatQ|
|Root|Slot|
|OriginalRotation|FloatQ|
|RotationDrive|FloatQ|
|CoordinateCompensation|FloatQ|  
|Root|Slot|  
|OriginalRotation|FloatQ|  
|RotationDrive|FloatQ|
|CoordinateCompensation|FloatQ|
|Root|Slot|
|OriginalRotation|FloatQ|
|RotationDrive|FloatQ|
|CoordinateCompensation|FloatQ|
|Root|Slot|
|OriginalRotation|FloatQ|
|RotationDrive|FloatQ|
|CoordinateCompensation|FloatQ|
|Root|Slot|
|OriginalRotation|FloatQ|
|RotationDrive|FloatQ|  
|DebugFingers|Bool|
|AssignFromRig|Action|This initializes the driver based on the rig details.
|InitializeHand|Action|This populates every numeric field and drive field in the component based on the populated Root slots. This should not be pressed when someone is inside the avatar or the hands may crumple.
}}
}}


Line 159: Line 110:


[[Category:ComponentStubs]]
[[Category:ComponentStubs]]
[[Category:Components]]
[[Category:Components:Users:Common Avatar System:Fingers{{#translation:}}|Hand Poser]]
[[Category:Components:Users:Common_Avatar_System:Fingers|Component:HandPoser]]
[[Category:Components{{#translation:}}|Hand Poser]]
[[Category:Components With Nested Types{{#translation:}}|Hand Poser]]

Revision as of 23:21, 3 March 2024

This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Component image 
Hand Poser component as seen in the Scene Inspector


Introduction

This component modifies the rotation of the fingers of an avatar's hand based on a pose source. The HandPoser works with whatever data is avilable, either precise finger tracking like a LeapMotion, or course grained like a vive wand, where grip and trigger affect the main finger positions.

The HandPoser is made of five duplicate finger objects, each of which contains four duplicate bone objects. Each bone object contains a Coordinate Compensation, Root, OrigionalRotation, and RotationDrive. The below chart is difficult to read for this reason, but read it as: the same four fields, duplicated four times (one for each bone), duplicated five times (one for each finger).

Due to this pattern, the intermediate bone of the thumb should never be bound as a human thumb does not have an intermediate bone.

Usage

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
PoseSource IFingerPoseSource What the finger transform data is derived from.
Side Chirality Which hand this poser is representing
PoseMetacarpals Bool If metacarpals should be posed (this should normally be left as True)
HandRoot Slot The root of the hand (if null the slot the component is attached to is used)
HandForward Float3 A unit vector pointing forward from the wrist to the fingers.
HandUp Float3 A unit vector pointing from the back of the hand outwards (alternatively phrased, this is pointing into the palm)
HandRight Float3 A unit vector pointing to the right of the hand, if the hand is facing down. This is roughly the direction of the thumb on the left hand, and the other side of the hand from the thumb on the right hand.
Thumb direct Finger
Index direct Finger
Middle direct Finger
Ring direct Finger
Pinky direct Finger
DebugFingers Bool
Methods
Name Description
AssignFromRig This initializes the driver based on the rig details.
InitializeHand This populates every numeric field and drive field in the component based on the populated Root slots. This should not be pressed when someone is inside the avatar or the hands may crumple.

Finger

Fields
Name Type Description
Metacarpal direct FingerSegment
Proximal direct FingerSegment
Intermediate direct FingerSegment
Distal direct FingerSegment


FingerSegment

Fields
Name Type Description
CoordinateCompensation FloatQ
Root Slot The slot representing this bone. Note that a human hand has no thumb intermediate bone, so this field will in general always be null.
OriginalRotation FloatQ
RotationDrive field drive of FloatQ


Behavior

This component forcibly assigns the rotation of each bound finger to a particular bone relative to the palm. As an example of this, if you only assign a Distal bone, that bone will spin 270 degrees starting pointing forwards, curling to point out the direction of the palm, back towards the wrist, then pointing out the back of the hand.

It is often easiest to make changes to this component following this procedure:

  1. Have the avatar be unequipped
  2. Clear every RotationDrive field
  3. Assign the Root field of each bone in the hand to be driven, this list will not be complete and some roots will be null.
  4. Press InitializeHand at the bottom of the component (Note: This button only works once, to reset the button select another slot, then select the slot with the component again).
  5. Re-Equip the avatar and see if the hands initialized successfully.
  6. If a bone did not bind correctly, repeat.

Examples

A few common problems can occur with an avatar's hands, here are common solutions.

Fingertips Through the Palm

Some avatars have very long fingertips (distal bones), but the human hand is structured to have very short fingertips. For these avatars if the hand is fully closed the fingertips (or clawtips) may poke through the back of the avatars hands. To resolve this

One known fix for this is to follow the steps outlined in Behavior, but assign every Distal bone to the Intermediate slot (leaving the Indermediate unbound). This will result in the distal bones curling down to lay flat against the palm, instead of curling all theway through the hand.

Hook Index Finger

This is where the rest of the hand bones accept the index finger bend at the base of the palm, instead of the knuckle. The index finger metacarpal doesn't bend at all though, leading to a 'hooked' appearance when the hand is closed.

There are two main fixes here, if the avatar isn't fully imported then re-import with the thumb parented to the palm bone instead of the index metacarpal. Otherwise do the following:

  1. Reparent the thumb metacarpal to the palm in the inspector (This may not be needed, investigation is needed).
  2. Reassign the root fields for the entire hand following the procedure outlined in Behavior, the bindings will be incorrect.

Extra Finger Spread

Some avatars may end up with much more splayed fingers when inhabited by a user, the current proposed solution is to not bind the metacarpal bones (More investigation is needed into this solution).

Hand curls to look like cat claws

The first digit of the finger isn't curling when the hand is closed, making the hand look like a cat claw.

This is caused by the avatar's hand having more bones than Resonite expects, and the first bone in the hand is bound to the metacarpal, it needs to be bound to proximal instead, moving each corresponding bone one position down the finger. The thumb is likely not affected by this.

Related Components

Component:AvatarHandDataAssigner