I am in a research team trying to develop an full body motion virtual reality using a Phase Space + Oculust Rift setup.
We’ve been using Unity for the past year as our game engine and I’m trying to migrate to UE4. I already figured out all the piece I needs to achieve what I want : in simple words I have a SkeletalMesh with Sockets that I need to move around using IK Two Bone, FABRIK and Transform Bone in the Anim Graph to match my mocap data at run time.
The only thing that I can not find is how to expose to Blueprint the FAnimNode_ModifyBone::BoneToModify, FAnimNode_Fabrik::TipBone and FAnimNode_Fabrik::RootBone. I tried to mess around with their UPROPERTY tag with no luck, still not showing as a Pin in the graph and that’s what I need to accomplish my migration.
Can anyone explain/give me direction on how could I expose the Pin for these 3 FBoneReference in the Blueprint system?
Attached is a small screen of my debug mocap data that I’m trying to map to my SkeletalMesh in UE4.
The core of a BoneReference is really just the FName
USTRUCT()
struct FBoneReference
{
GENERATED_USTRUCT_BODY()
/** Name of bone to control. This is the main bone chain to modify from. **/
UPROPERTY(EditAnywhere, Category=BoneReference)
FName BoneName;
/** Cached bone index for run time - right now bone index of skeleton **/
int32 BoneIndex;
FBoneReference()
: BoneIndex(INDEX_NONE)
{
}
**//see AnimationAsset.h**
you can make a UPROPERTY FName that is easily exposed to the blueprint node.
Fortunately you can cache this created BoneReference and only create it once, inside of the FABRIK node .cpp when it is initializing.
//AnimNode_Fabrik.cpp, at the bottom
//use the required bones here to initialize your FName BoneReference!
void FAnimNode_Fabrik::InitializeBoneReferences(const FBoneContainer & **RequiredBones**)
{
TipBone.Initialize(RequiredBones);
RootBone.Initialize(RequiredBones);
EffectorTransformBone.Initialize(RequiredBones);
}
then you have the fully constructed bone reference, assignable via BP using FName
The Community Member and author of the FABRIK node might respond to you here, if he doesnt and you still can't figure it out let me know and I can post a more complete code sample
Rama
@Gern, sorry for the off topic request, but you wouldn’t happen to have a brief overview of how to use FABRIK, would you? I wasn’t able to really find any information about it.
I haven’t played with the FABRIK component for now, I only used the FAnimNode_ModifyBone “Transform (Modify) Bone” as of now. I’ll keep you posted when I get my hand on with UE4’s FABRIK component.
Can anyone please provide some more information about this, because I want to achieve the same thing, getting real-time mocap data from a phasespace impulse X2 system into UE4, but I don’t know where to start. Or is there some semi-plug&play solution already that someone could share with like step by step instructions?