ValveSoftware / steamvr_unreal_plugin

SteamVR Input Unreal Plugin - Documentation at: https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki Sample project (UE4.15-4.23): https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki/sample/SteamVRInputPlugin.zip Sample Project (UE.424+): https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki/sample/SteamVRInputPlugin_UEIntegrated.7z

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use with UE mannequin left hand?

BreakMaker opened this issue · comments

Hi Rune,
I wonder what would be the best approach to use the Knuckles / Steam VR anim nodes with the left hand of the standard mannequin. I could not find an example implementation in the example project and the video tutorial is focused on the moondust and robo recall hands, the latter having a custom left hand already created.
However, the UE4 VR template just uses the right hand, and inverts the left hand in scale. This way it can be ensured that all functions in the hand class work irrespecitve of which hand it is.

But somehow this does not work with the Steam VR animation nodes in the animation blueprint. Even if I invert the mesh in the actor blueprint, the left hand looks like a right hand. Finger tracking works correctly when using the "mirror" input in the "SteamVR Skeletal Anim Pose" node; this is not the problem.

  1. I tried using the "transform / modify bone" node to apply a negative scale to the left hand again; but this flips the normals on the mesh and also creates all sorts of complications downstream when I am using IK for various stuff.

  2. I considered just exporting the mesh to Blender and mirroring it but then I guess the animations that are for the right hand would not work correctly, making it necessary to mirror all baked hand animations one by one.

I am pretty sure there is an easier way to do this. Have you thought about this perhaps?
Thanks!

Hi @BreakMaker - We do have a sample where we show how to use the Animation Nodes for the standard UE Mannequin hand, including how set it up for the Left Hand.

If you open the UEHands_SampleMap, you should be able to try it out.

UEHand_AnimBP will have these core nodes that handles the left hand (scaled right hand mesh):

image

Hello @1runeberg ,
yes, this is exactly what I had done.

I inverted the hand in the hand actor bp (y world scale -1.0), and used the SteamVR Skeletal Anim Pose to apply mirroring if it is the left hand (see screenshots below)
Screen2020-11-03 22 46 20

I have figured out a solution, though I do not understand why this is the solution :D : I had to include a delay node before "Set world scale", as if there was some sort of race condition. I double checked, and I am not setting the scale anywhere else (except the fact that transform must be set when spawning from the class but this should occur before even begin play in the spawned actor, so this cannot be it)

Screen2020-11-03 22 45 04

Anyway, it works now and I could not reproduce the issue in your example project (the only thing to watch out for in the exmaple project is to set the property "socket needs flipping", otherwise the left hand will not be inverted!

Not sure why you would need a delay there @BreakMaker, not sure if that's a localized version of the engine but the commas in place of the period in your float values seem a bit odd.

Not clear on why a custom socket would impact flipping a mesh scale, I don't think we have this in our sample project and inverts just fine, but glad you got it all working! 👍

I did not notice it, but you are right: I have commata instead of periods everywhere . Maybe the engine reads the region settings from the OS (I am based in Germany whe have comma instead of period) (see the image below for an example)
Screen2020-11-03 23 04 03

Regarding the pawn: But you do have it: The screenshot below is from the sample project "BP motion controller".
image
There is a branch node leading up to set world scale based on NeedsFlip.
And Needs flip is exposed on spawn when you make the spawn in "MotionControllerPawn", reading the value of SocketNeedsFlip.
image

But the default value of "socket needs flip" is false. So failing to set it to true before running the smaple project in VR, effectively produces the same problem because set scale never fires. Maybe worth to check it out : )