Okay I think I figured out what I did wrong. The first time I posted I did not copy the Binaries file to my directory, which I didn’t know I needed to do, since I didn’t need to do that for the previous version. The second time I posted I think I forgot to add the hydra interface to my blueprint. I started a fresh project in the 3rd person template and followed the steps again and got the project to print a string for me when the hydra was moved. And the best part, no crash! Yay!
@, I think I figured out why I was having issues with my blueprint when I was following your examples before. Because I was following your blueprints so closely, I never set up the input mappings to receive any input from the hydra, so there was nothing in my character blueprint to tell the character to do anything when I was waving my hydras around. At least that’s my theory.
I need your help again. I was able to set up the input axes relatively easily in the Project settings menu for Hydra Left Motion and Hydra Right Motion, but I’m having a LOT of trouble figuring out how to set them up in the character blueprint to make them work. My confusion lies primarily in what targets go where and how to transform what bone to where using what nodes. It seems like a lot of the functions reference a component called a poseable mesh, which through trial and error, I have come to the conclusion that is not what I am looking for. So far however, all of the nodes I have experimented with referencing a skeletal mesh are equally as confusing. On the bright side, I have a small semblance of a calibration happening in game, although not entire noticeable if you’re not looking for it.
[=aialexander;166337]
I need your help again. I was able to set up the input axes relatively easily in the Project settings menu for Hydra Left Motion and Hydra Right Motion, but I’m having a LOT of trouble figuring out how to set them up in the character blueprint to make them work. My confusion lies primarily in what targets go where and how to transform what bone to where using what nodes. It seems like a lot of the functions reference a component called a poseable mesh, which through trial and error, I have come to the conclusion that is not what I am looking for. So far however, all of the nodes I have experimented with referencing a skeletal mesh are equally as confusing. On the bright side, I have a small semblance of a calibration happening in game, although not entire noticeable if you’re not looking for it.
[/]
I do not recommend using the input mapping system for skeletal animation, these are meant for normalized input akin to joystick movement. is because the input mapping system have all their values normalized (to a range of 0-1.0), what you want to use instead are the raw values converted into UE space (giving that 1:1 feeling) which are emitted by the HydraInterface events and available in for polling from the HydraComponent. For reason you should use the On Controlled Moved or polling (get latest data) to forward your controller positions (after calibrating to component space) to the IK targets in your animation graph. See earlier in the thread for concrete examples of how was done.
So I’m going to need more time to get some examples out, but I just recently got it to a point where it’s working very nicely and I can touch my head and have it map basically 1:1. Unfortunately I’m using a lot of feel good variables to get it mapped to my height and reach.
Some improvements I want to make:
- Rotate the fingers a bit instead of the wrist for very small initial rotations away from the neutral pose (to emulate rotating the Hydra with the player’s fingers, and prevent over-rotation of the wrist).
- Rotate the fore and upper arm as a percentage of the Hydra rotation, again to prevent over-rotation of the wrist and also allow for better skinning results.
- Create a real (no feel-good variables) mapping of player height/arm length to character height/arm length. One thing that’s needed there is being able to get the Oculus profile height, though it could be faked during the Hydra calibration by just taking the Z value and adding some for the head height.
- Generally clean everything up and get it working in a nice fashion, and ported into the VR Game Template.
In the mean time, if you want to use FABRIK nodes (which I find give nicer results), just do a Make Transform and hook the Hydra position into it. The tip node will be the hand, the base node will be the upper arm (or whatever bone is above the forearm on your skeleton).
[=;166496]
I do not recommend using the input mapping system for skeletal animation, these are meant for normalized input akin to joystick movement. is because the input mapping system have all their values normalized (to a range of 0-1.0), what you want to use instead are the raw values converted into UE space (giving that 1:1 feeling) which are emitted by the HydraInterface events and available in for polling from the HydraComponent. For reason you should use the On Controlled Moved or polling (get latest data) to forward your controller positions (after calibrating to component space) to the IK targets in your animation graph. See earlier in the thread for concrete examples of how was done.
[/]
Okay I think I know what you’re saying here. However, the other thing I’m having trouble figuring out is how to call the variables I have stored in my Animation Blueprint for the location/rotation of the left and right hands. If I try to get variables, either nothing happens or the variable I get only has a pin on the right side and I need it to be on the left. Here’s what I have so far.
is my Character Blueprint setup that I have so far for the Hydra
And is my Animation Event Graph (Detail of the Hydra setup)
I’ve also been researching what the difference is between Transforms in Bone Space and Transforms in World Space and so far, I have not been able to find any examples of what that difference is. There is plenty of documentation on this, but it’s all written using the same type of vocabulary, and without seeing an example of what these terms are refering to, I’m afraid I don’t quite understand which of these transform nodes I need. Do I need to Transform the bones FROM Bone space or TO bone space? Or do I do neither? I only grabbed these nodes because transforming bones seemed like a useful function for what I’ve been trying to do.
@anonymous_user_2f683c8e - You don’t need to transform to bone space (or world space).
Your anim blueprint looks okay, assuming that the Shoulder Midpoint is being set during the calibration step (e.g., have it so the user presses start, then it calculates it - you’ll want the user to be in a t-pose during this).
Yes, the calibration has been set to activate when the start button is pressed. So then how do I go about telling the character to move his hands if not by using a transform bone function?
[=aialexander;166825]
Yes, the calibration has been set to activate when the start button is pressed. So then how do I go about telling the character to move his hands if not by using a transform bone function?
[/]
You’re setting the hand positions and rotation’s in your Anim Blueprint Event Graph - you use those variables in the Animation Graph with animation node (Two-Bone IK or FABRIK node). When you have the Anim Blueprint open, you’ll see “Anim Graph” in the list of variables/functions, click it and it will open a new tab with the Anim Graph. That’s where you modify the skeleton. The Transform To nodes just transform something into a different coordinate space (e.g., World coordinate space to bone coordinate space, meaning the positions are relative to the world’s 0, 0, 0 origin or the skeleton, respectively).
Go back through the thread or my tutorial and find the graph that’s labelled “Beggar Anim Graph” at the top (or whatever the other anim graphs shown were labelled). Anything with the Two-Bone IK node is going to be in the Anim Graph.
I’ve actually been referencing your screenshots that you posted earlier in the quite a lot. That’s the only reason I was able to set up the Anim Graph to get to point. I’m not sure if there was another tutorial of yours that you wanted me to look at but I did look at those images quite a bit. I understand that I was setting the position variables in the Anim Graph of the Animation Blueprint. What I was confused about was about how to reference those variables or get them from the Animation Blueprint to the Character Blueprint for the character that I would like to use. Are you saying that since I already have the Anim Graph set up way that I don’t need to call these position variables in the Character Blueprint? Would I call them in the Hydra controller instead?
The reason I am asking about the character Blueprint is because I noticed that there are always nodes present giving instructions to the character based on the input received from certain devices. I figured since the Hydra was an input device, that it only made sense that the character blueprint would need to set up some kind of instructions for the Hydra just like you would for the keyboard or a gamepad. If the Anim Graph is also a function that I can use in another graph, how do I call it? I’ve tried calling it both in the character blueprint and in the Hydra controller and have had no luck.
There are two graphs in the animation blueprint - the Event Graph, and the Anim Graph. The first is the one you gave screenshots of and where you’re setting the variables. The second, the Anim Graph, is where you want to use the Two-Bone IK node or the FABRIK nodes to use those positions to transform the positions of the hands.
You don’t need to mess around with the character blueprint - while input is often put there, for the Hydra, it’s in the Player Controller and it’s already getting into the Anim Blueprint’s Event Graph from there. You just need to use the variables in the Anim Graph.
Okay, cool! So that means that the problem I’m having is being caused by something else. I also have been getting error whenever I play the game in the editor to test if the hydra is working.
Has anyone else gotten error? I’ve tried disconnecting the Set “Is in Air?” node and just skipping right to setting speed, but I’ll get a similar editor regarding the hydra component. Any idea what I’ve done wrong here?
Your “Hydra” variable in the animation blueprint Event Graph is None/null - you probably need to set it in the controller. Personally I set the position/rotation variables in the controller and then use that in the animation blueprint, rather than trying to access the Hydra from there.
[=;167220]
Your “Hydra” variable in the animation blueprint Event Graph is None/null - you probably need to set it in the controller. Personally I set the position/rotation variables in the controller and then use that in the animation blueprint, rather than trying to access the Hydra from there.
[/]
I second approach, it gives a better input indirection meaning more abstraction from input source. When you have decently abstracted input, your gameplay mechanics are less affected by the specific input e.g. hardware and your game logic is more adaptable to new types of input of the same class.
IT WORKS!!! (Commence spaz)! Thank you!
Now there’s just the problem of the hand positions being underscaled for some reason. The rotation seems to be working alright, but the location is hardly moving at all.
Is there any plans to put together a full tutorial on how to attach the hydra positions to a characters hands? I’ve tried following thread using both IK and FABRIK but I keep getting stuck with arms that don’t bend at the elbows and hands that don’t really seem to move in the Z direction and don’t rotate. I’m thinking I’m missing something in the IK/FABRIK setup which seems to lack documentation on the UE4 side. Any help would be very much appreciated!
[=chadyo;167702]
Is there any plans to put together a full tutorial on how to attach the hydra positions to a characters hands? I’ve tried following thread using both IK and FABRIK but I keep getting stuck with arms that don’t bend at the elbows and hands that don’t really seem to move in the Z direction and don’t rotate. I’m thinking I’m missing something in the IK/FABRIK setup which seems to lack documentation on the UE4 side. Any help would be very much appreciated!
[/]
I do plan on doing a full tutorial, but it’s going to take a bit of time as I need to port it out of my game and into the UE4 blueguy.
[=;167889]
I do plan on doing a full tutorial, but it’s going to take a bit of time as I need to port it out of my game and into the UE4 blueguy.
[/]
Great, looking forward to it!
By the way, earlier in the thread when you guys mentioned you were using “feel good” variables, what did you mean by that?