x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Set bone rotations for Poseable mesh in local space

Greetings to everyone. : )

I'm implementing a VR experience on UE4 that detects the movement of the VR experience user, updating the user or representation of the user inside the virtual world.

For doing so, I've implemented this behavior with C++ based on what 'Michael Noland' says in this topic: https://forums.unrealengine.com/showthread.php?25264-Pose-a-skeletal-mesh-in-runtime

That is, I have an USkeletalMeshComponent (whose Skeletal mesh is the one seen on screen), and an UPoseableMeshComponent (being set as the "master pose component" for the USkeletalMeshComponent), that receives the rotation data as quaternions from each tracking sensor.

One hand, the mesh for the UPoseableMeshComponent will be set to the mesh of the USkeletalMeshComponet. The other hand, the bones of the poseable mesh are updated with the corresponding rotation data coming from the tracking sensors for each bone, which makes automatically the skeletal mesh to be updated accordingly due to the UPoseableMeshComponent was set as "master pose component" for the USkeletalMeshComponent.

This works pefectly when working with all the body parts that are not finger phalanxes, because rotations are set on those body parts in world space, in this way:

 m_pPoseableMeshComp->SetBoneRotationByName(strBoneName, qBoneRotation.Rotator(), EBoneSpaces::WorldSpace);

However, for technical reasons, it is mandatory to set the bone rotations for each finger phalanx in LOCAL space, but poseable meshes seems to work only on world space and component space; checking out 'SkinnedMeshComponent.h' there is a 'LocalSpace' enum value on EBoneSpaces::Type... but it's commented!.

 /** Values for specifying bone space. */
 UENUM()
 namespace EBoneSpaces
 {
     enum Type
     {
         /** Set absolute position of bone in world space. */
         WorldSpace        UMETA(DisplayName = "World Space"),
         /** Set position of bone in components reference frame. */
         ComponentSpace    UMETA(DisplayName = "Component Space"),
         /** Set position of bone relative to parent bone. */
         //LocalSpace        UMETA( DisplayName = "Parent Bone Space" ),
     };
 }

I cannot understand the phrase 'Set position of bone in components reference frame'. It doesn't seem to work as the "replacement" for local space (with this option it behaves as if the bone were rotating around the avatar's pivot point). Is there any other way to set rotations in local space for a poseable mesh?.

Thanks in advance. : )

Product Version: UE 4.14
Tags:
more ▼

asked Apr 19 '17 at 07:43 AM in C++ Programming

avatar image

JAG Neurod
6 1 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question