Announcement

Collapse
No announcement yet.

VR IK Body - Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by MariuszWaclawek View Post
    From Docs: "All transforms are in World Space or relative to Player Pawn origin if both VRInputFromComponents and FollowPawnTransform flags are false."
    Do you mean: All transforms can be calculated either in World Space or Relative Space to Player Pawn origin.
    If VRInputFromComponents and FollowPawnTransform are false then transforms are calculated in World Space and if both are true then it is calculated in Relative Space.
    Am I correct on that?
    Transforms are calculated in World Space if InputFromComponents is true or FollowPawnTransform is true.

    Also could you explain a little how the new character height is calculated, our main character transforms into a HULK after calibration. For some reason it is not scaled uniformly, instead it looks like he gets less scaled upwards and more in other directions, it looks wider than it should be.
    it simply takes a vertical distance from hmd to the ground and adds some fixed static offset. I'm planning to take out scale coefficient to the component's settings, so you'll be able to adjust it as you want.

    Leave a comment:


  • replied
    Originally posted by Yummy-Vegetables View Post
    I added the suggested workaround. It had the effect of the legs spreading out more so they are more horizontal to the ground. I can send you my character mesh if you feel it would be easier to test?
    Yes, your mesh would help me (ykasczc@gmail.com).

    But this workaround should work anyway. Can you also make a screenshot of the vr preview window? Are you sure you changed Effector's location space in TwoBoneIK node settings to world space? If feet are too high even after TwoBodyIK nodes, it could be caused by something else then i expected - most likely, ground detection error. By default, pawn's Z coordinate is considered as a ground level. Try to change to this setup: https://pp.userapi.com/c841430/v8414...EpnD5zRESM.jpg
    Last edited by YuriNK; 01-10-2018, 03:56 PM.

    Leave a comment:


  • replied
    From Docs: "All transforms are in World Space or relative to Player Pawn origin if both VRInputFromComponents and FollowPawnTransform flags are false."
    Do you mean: All transforms can be calculated either in World Space or Relative Space to Player Pawn origin.
    If VRInputFromComponents and FollowPawnTransform are false then transforms are calculated in World Space and if both are true then it is calculated in Relative Space.
    Am I correct on that?

    Also could you explain a little how the new character height is calculated, our main character transforms into a HULK after calibration. For some reason it is not scaled uniformly, instead it looks like he gets less scaled upwards and more in other directions, it looks wider than it should be.
    Last edited by MariuszWaclawek; 01-10-2018, 02:09 PM.

    Leave a comment:


  • replied
    I added the suggested workaround. It had the effect of the legs spreading out more so they are more horizontal to the ground. I can send you my character mesh if you feel it would be easier to test?

    Leave a comment:


  • replied
    Originally posted by YuriNK View Post

    Option 1. Direct VR Input. You need to call ActivateInput() in BeginPlay. No need to add motion controller components to player blueprpint. The plugin will receive data from VR API functions.

    Option 2. Input from Components. Player Pawn must contain Camera component and two Motion Controller components. Call Initialize(Camera, Right Hand Comp, Left handComp) in BeginPlay. Actually, you can use any other scene components and animate them as you want. In runtime the plugin will consider positions of this components as head and hands positions.

    Option 3. Input from Variables. Call ActivateInput() in BeginPlay. Then call VRIKBody::UpdateInputTransforms(Head Transform, Right Hand Transform, Left Hand Transform) in Tick before ComputeFrame(). (Transforms are in world space, this method doesn't work with replication).

    if you need both leap motion and replication, I'd recommend to use 'Input from Components'. Add simple Scene Components to you pawn blueprint to simulate hands and update their location and rotation in Tick().
    Thanks for the prompt reply and clarification, I was actually trying Input from Components but I wasn't sure I was doing it correctly, simple Scene Components won't work I had to use an abstraction of it like Sphere Collision.

    Leave a comment:


  • replied
    Originally posted by MariuszWaclawek View Post
    It seems like it's possible to use something other than motion controllers for hands position and rotation but I am not sure how to set this up. VRIKBody has "VRInput Option" which can be set to Direct VR Input, Input From Components and Input From Variables. How does each mode work and how do we configure for each of them?
    Docs mention that if we don't want to use motion controller components then we should use the ActivateInput() instead of Initialize and VRInputFromComponents has to be false.
    ActivateInput node says on the other hand that this function activates the recording of HMD and motion controllers and if we want to use components then we should use Initialize.

    I guess all this means is that we can either feed the motion controller components to the plugin or the plugin will grab the motion controller data automatically.

    What about using variables? How does one set it up? How and where do we feed the hands positions for the IK solver. We are using leap motion to drive hands instead of the motion controllers therefore it would be really good if we could just feed the leap hands transforms to the VRIKBody.
    Option 1. Direct VR Input. You need to call ActivateInput() in BeginPlay. No need to add motion controller components to player blueprpint. The plugin will receive data from VR API functions.

    Option 2. Input from Components. Player Pawn must contain Camera component and two Motion Controller components. Call Initialize(Camera, Right Hand Comp, Left handComp) in BeginPlay. Actually, you can use any other scene components and animate them as you want. In runtime the plugin will consider positions of this components as head and hands positions.

    Option 3. Input from Variables. Call ActivateInput() in BeginPlay. Then call VRIKBody::UpdateInputTransforms(Head Transform, Right Hand Transform, Left Hand Transform) in Tick before ComputeFrame(). (Transforms are in world space, this method doesn't work with replication).

    if you need both leap motion and replication, I'd recommend to use 'Input from Components'. Add simple Scene Components to you pawn blueprint to simulate hands and update their location and rotation in Tick().
    Last edited by YuriNK; 01-10-2018, 08:12 AM.

    Leave a comment:


  • replied
    It seems like it's possible to use something other than motion controllers for hands position and rotation but I am not sure how to set this up. VRIKBody has "VRInput Option" which can be set to Direct VR Input, Input From Components and Input From Variables. How does each mode work and how do we configure for each of them?
    Docs mention that if we don't want to use motion controller components then we should use the ActivateInput() instead of Initialize and VRInputFromComponents has to be false.
    ActivateInput node says on the other hand that this function activates the recording of HMD and motion controllers and if we want to use components then we should use Initialize.

    I guess all this means is that we can either feed the motion controller components to the plugin or the plugin will grab the motion controller data automatically.

    What about using variables? How does one set it up? How and where do we feed the hands positions for the IK solver. We are using leap motion to drive hands instead of the motion controllers therefore it would be really good if we could just feed the leap hands transforms to the VRIKBody.

    Leave a comment:


  • replied
    Thanks for replying, I'll try out the workaround in a bit. Heres the screen prints requested:

    Attached Files

    Leave a comment:


  • replied
    Originally posted by Major Mints
    Would it be possible to have the pawn respond to uneven terrain and have a gravity component. if so what is a good way to go about this?
    The plugin can detect the ground beneath, see https://youtu.be/Vmyi0jQinh4?t=2m7s after 2:00. You can simply use default CharacterMovement component with gravity enabled. The plugin will detect when ground is too far (i.e. player is falling/jumping).

    Settings:

    Leave a comment:


  • replied
    Originally posted by Yummy-Vegetables View Post
    Ok so now I have the arms and body moving but the legs are distorted and angled up into the body. The translation of bones is correct. Suggestions?

    Another thing Iam finding the arms don't straighten out they are always bent no matter how far I extend the hands away from the body in the T pose
    I think I know what cause the problem, but I need to make some changes in the plugin's code to fix it. Just for a case can you send a screenshot with bones orientation (like here, but for your skeletal mesh: https://pp.userapi.com/c840620/v8406...y6YGq4NEWw.jpg).

    For now you can use this temporary solution:
    Anim blueprint event graph: https://pp.userapi.com/c840620/v8406..._m0ZC4ukuU.jpg
    Anim blueprint anim graph: https://pp.userapi.com/c840620/v8406...VWi2hAlcQo.jpg

    Hands are always bent, yes. I can't predict ribcage and shoulders rotation accurate enough without additional tracking devices. At the other hand, plugin must keep hand palms exactly in a position of motion controllers. So I slightly overscale hands to make sure palms always can reach controller's location despite some error in ribcage position and rotation. This screenshot from an early version of the plugin demonstrates it well: https://pp.userapi.com/c840335/v8403...6ANdWEqNg8.jpg

    Leave a comment:


  • replied
    I redid the configuration from the start as I think there's an editor bug as the anim BP was not being run (breakpoints and print to screens were not run) even though it was specified in the Viewport.

    Ok so now I have the arms and body moving but the legs are distorted and angled up into the body. The translation of bones is correct. Suggestions?

    Another thing Iam finding the arms don't straighten out they are always bent no matter how far I extend the hands away from the body in the T pose
    Attached Files
    Last edited by Yummy-Vegetables; 01-09-2018, 11:12 AM.

    Leave a comment:


  • replied
    Originally posted by Yummy-Vegetables View Post
    Was hoping you might be able to help, when I import the player mesh (without head) and use that in the motioncontroller, the arms and body are not detected, just the body rotates as I turn but it is 90 degrees turned to the side. If I rotate it in the viewport it still aligns incorrectly as well.

    I've adjusted the bones in the translator setup to use the bone names of the headless mesh and followed through the video tutorial a couple of times so am pretty sure I've set it up correctly.

    Any ideas? See log errors below
    Hi,

    Make sure that body's skeletal mesh component in the player object located at the scene (not just in the blueprint) has proper anim blueprint.

    And can you also make a screenshots of player pawn blueprint (viewport, components hierarchy, VRIKBody and VRIKTranslator settings) and bones hierarchy in the skeletal mesh?

    Leave a comment:


  • replied
    Was hoping you might be able to help, when I import the player mesh (without head) and use that in the motioncontroller, the arms and body are not detected, just the body rotates as I turn but it is 90 degrees turned to the side. If I rotate it in the viewport it still aligns incorrectly as well.

    I've adjusted the bones in the translator setup to use the bone names of the headless mesh and followed through the video tutorial a couple of times so am pretty sure I've set it up correctly.

    Any ideas? See log errors below

    Thanks.


    xampleMap_C' with ClassGeneratedBy '/Game/ThirdPersonBP/Maps/ThirdPersonExampleMap.ThirdPersonExampleMap:PersistentLevel.ThirdPersonExampleMap'
    LogVRIKSkeletalMeshTranslator: Error: [GetLastPose]: Component isn't ready.
    LogSkinnedMeshComp: Warning: GetBoneTransform : ParentBoneIndex(0) out of range of MasterPoseComponent->SpaceBases for SM_Head
    LogSkinnedMeshComp: Warning: GetBoneTransform : ParentBoneIndex(0) out of range of MasterPoseComponent->SpaceBases for SM_Head
    LogScript: Warning: Accessed None trying to read property IKTranslator
    man1Head_Skeleton_AnimBlueprint_C /Engine/Transient.World_4:PersistentLevel.MotionControllerPawn_C_0.SM_Body.man1Head_Skeleton_AnimBlueprint_C_3
    Function /Game/football/playerMan/man1Head_Skeleton_AnimBlueprint.man1Head_Skeleton_AnimBlueprint_C:ExecuteUbergraph_man1Head_Skeleton_AnimBlueprint:018F
    LogVRIKSkeletalMeshTranslator: Error: [GetLastPose]: Component isn't ready.
    LogSkinnedMeshComp: Warning: GetBoneTransform : ParentBoneIndex(0) out of range of MasterPoseComponent->SpaceBases for SM_Head
    LogSkinnedMeshComp: Warning: GetBoneTransform : ParentBoneIndex(0) out of range of MasterPoseComponent->SpaceBases for SM_Head
    LogSkinnedMeshComp: Warning: GetBoneTransform : ParentBoneIndex(0) out of range of MasterPoseComponent->SpaceBases for SM_Head
    LogSkinnedMeshComp: Warning: GetBoneTransform : ParentBoneIndex(0) out of range of MasterPoseComponent->SpaceBases for SM_Head
    LogVRIKSkeletalMeshTranslator: Error: [GetLastPose]: Component isn't ready.
    LogVRIKSkeletalMeshTranslator: Error: [GetLastPose]: Component isn't ready.
    LogVRIKSkeletalMeshTranslator: Error: [GetLastPose]: Component isn't ready.
    LogVRIKSkeletalMeshTranslator: Error: [GetLastPose]: Component isn't ready.
    LogVRIKSkeletalMeshTranslator: Error: [GetLastPose]: Comp
    Last edited by Yummy-Vegetables; 01-09-2018, 07:05 AM.

    Leave a comment:


  • replied
    Originally posted by YuriNK View Post
    Oh, it's really werid. Are you sure yo changed anim blueprint watching from Preview object to active player pawn after launch?
    Idea No 1: have you tried to import your skeletal mesh to my demo project and use it instead of Mannequin?
    Idea No 2: upload your test project to dropbox or google drive and send me (ykasczc@gmail.com) a link for in-place debugging
    I tried with your demo project and it works fine. Now i will send you an email with a link to the project so you can debug it. And thanks for all the attention you are giving, we really apreciate it.

    Leave a comment:


  • replied
    Originally posted by Xperiencia View Post
    For what i've seen the isValid node with "Try get pawn owner" in the anim blueprint is going invalid all the time
    Oh, it's really werid. Are you sure yo changed anim blueprint watching from Preview object to active player pawn after launch?
    Idea No 1: have you tried to import your skeletal mesh to my demo project and use it instead of Mannequin?
    Idea No 2: upload your test project to dropbox or google drive and send me (ykasczc@gmail.com) a link for in-place debugging

    Leave a comment:

Working...
X