1. Welcome to VRCat! Please note that this message board is not related to VRChat in any official manner. It is run entirely by the community, and moderated by the community. Any content present has not been reviewed by VRChat moderators or staff. Your use of these forums implies understanding of this message. Thanks!
    Dismiss Notice

Avatars Comprehensive Full Body Tracking Rig Setup Tutorial

Discussion in 'Tutorials and Tools' started by ProfessorSnep, Mar 23, 2018.

  1. ProfessorSnep

    ProfessorSnep Member

    Joined:
    Nov 17, 2017
    Messages:
    24
    Likes Received:
    37
    VRChat:
    ProfessorSnep
    EDIT: As of 2018/04/02, Cat's Blender Plugin now includes this process automatically with version 0.7.0. Go check it out!

    Heyo~

    So I've been using a method for getting full body tracking set up in my avatar rigs that works quite well for everyone I've told it to, and doesn't break desktop or normal VR rigs like some solutions do. Current issues with a lot of rigs I see after going through Cat's blender plugin include being constantly crouching (eye height much higher than it looks, knees bent, etc.) and hips being wildly rotated.

    Small note: This will not fix the "stilts" issue most MMD models have- that is simply due to the fact the legs are way too long. You can fix this by changing your model's body proportions to match your own, but that's for a whole other tutorial.

    I'll assume you know how to run Cat's blender plugin, so I'll start from a point right after clicking "fix model", where the hip issues arise.

    [​IMG]
    Your rig will probably look something like this. There are a few issues with how Cat's plugin sets up its armature:

    1. The Hip bone is pointing up (the narrow part is facing the end of the bone). Normally this will not be an issue, but with full body tracking what tends to happen is the waist tracker will shift up to the top of the bone.
    2. The Hip bone and Spine bone are not connected to each other. This causes the weird hip rotation issue.

    To fix the armature, we will flip the hip upside down, add bones to make sure the hips and legs are 180 degrees apart, and connect the spine to the hips.

    To flip the hip bone, select it in Edit mode by right-clicking, press S for scale, then type "-1" and hit enter. That will scale it inside out which ends up flipping it perfectly around.
    [​IMG]

    Now, we need to create two new bones on the legs. To do this, select the little orb at the top of one leg bone, then press E, Z, and type 0.5 (or a smaller number if the resulting bone is too big). Press enter to confirm.
    [​IMG]

    Then do the same with the other leg.

    Next, we want to re-parent the new bones to be parents of the corresponding leg bones.
    Right-click a leg bone to select it, then navigate to the Bone Properties on the right side of the screen (bone icon), and set the Parent to the name of the new bone. (Should be something like "Left Leg.001")
    [​IMG]

    Again, do the same thing to the other leg.

    The last step in Blender is to attach the Spine bone to the Hip bone. The easiest way I've found is to select the Hip bone, go to the same Bone Properties tab as the last step, and copy each X, Y, Z coordinate from the Head (bottom) section of the Hip bone, and paste into the Head (not tail) section of the Spine bone. You may only need to copy the Y coordinate, as sometimes Cat's plugin aligns them in the X and Z plane automatically.
    [​IMG] [​IMG]

    That should be all you have to do in Blender, continue setting up your avatar as normal.

    There is ONE LAST STEP to make this all work.

    When you configure your Humanoid Rig in Unity, make sure to set the Left Upper Leg and Right Upper Leg bone slots to be the newly created bones. This will ensure the selected Hip and selected Leg bones are 180 degrees apart. To check to see if this works, make sure there is no warning in the VRChat SDK saying the hips and legs are 0 degrees apart. There will probably be a warning saying you might encounter leg twist issues, you can most likely ignore that.
    [​IMG]


    And that should be it! It's not too hard to do and makes things work perfectly in full body from what I can see while using it. (And I've spent hundreds and hundreds of hours using full body)

    If you have any other questions, feel free to ask. Hope this helped ^^
     
    #1 ProfessorSnep, Mar 23, 2018
    Last edited: Apr 12, 2018
    Neitri, Hotox, Schneitz and 4 others like this.
  2. Tupper

    Tupper The Strongest
    Forum Staff

    Joined:
    Nov 14, 2017
    Messages:
    111
    Likes Received:
    107
    VRChat:
    Tupper
    You're a goddamn hero
     
    Katsumi likes this.
  3. Landwhale

    Landwhale New Member

    Joined:
    Nov 17, 2017
    Messages:
    1
    Likes Received:
    0
    VRChat:
    Landwhale
  4. Who?

    Who? New Member

    Joined:
    Mar 23, 2018
    Messages:
    1
    Likes Received:
    0
    VRChat:
    Who?
    *insert whoa meme*
     
  5. Tierson

    Tierson New Member

    Joined:
    Jan 10, 2018
    Messages:
    3
    Likes Received:
    0
    VRChat:
    Tierson
    Thanks a ton!
     
  6. Schneitz

    Schneitz New Member

    Joined:
    Jan 14, 2018
    Messages:
    7
    Likes Received:
    5
    I wonder if this is the reason why the right leg looks weird and stretched in some models. However, my left leg looks fine, is that normal?

    I also wanted to ask, in order to speed up the process for people who do most of the work on other software, any idea if this could be automated in Cat's Blender plugin? I know it doesn't look like a very complicated set of steps, but imagine when you have to redo it over and over when testing things for each model that is created outside of Blender.
     
  7. ProfessorSnep

    ProfessorSnep Member

    Joined:
    Nov 17, 2017
    Messages:
    24
    Likes Received:
    37
    VRChat:
    ProfessorSnep
    I've never heard of that leg issue you've mentioned. Maybe it's some sort of configuration issue (whether that be tracking or bone setup)?

    Also, for automating this in Cat's plugin, I'd talk to that team ^^ it would not be hard to put that in, as most of the steps are pretty straightforward.
     
  8. Bem

    Bem New Member

    Joined:
    Apr 5, 2018
    Messages:
    1
    Likes Received:
    0
    VRChat:
    Bem
    I found a pretty significant issue with this method. If the avatar is too far away from the origin of a map the hips begin trying right themselves, and the avatar twitches pretty violently. Either I did something wrong or this might not be the best idea.
     
  9. pcenginefx

    pcenginefx New Member

    Joined:
    Feb 24, 2018
    Messages:
    3
    Likes Received:
    0
    Heya ProfessorSnep - first off, THANK YOU for the tutorial! I had followed this for one of my models which had the knee bending & hip/leg twist issue. After I followed your steps, upon bringing the avatar over to VRC I saw that:
    1. My avatar now stands straight up (no knee bending) - yay!
    2. My upper legs are still twisted outwards - noo!

    I'd think this method would have fixed both issues? If not, anything you can think of that I may be missing? Thanks!!
     
  10. GunstarX

    GunstarX New Member

    Joined:
    Apr 7, 2018
    Messages:
    2
    Likes Received:
    0
    VRChat:
    GunstarX
    I did this and it indeed fixed the stupid knee bending issue. But now my hands are slightly twisted. Normally I'd hold my hands straight out, palms down and the avatar's hands would also be facing palms down. But now if I do that, the avatar's are slanted a bit, and I have to slant my hands a bit to get the avatar's palms to face down. Know what's up with this and how to fix this?
     
  11. ProfessorSnep

    ProfessorSnep Member

    Joined:
    Nov 17, 2017
    Messages:
    24
    Likes Received:
    37
    VRChat:
    ProfessorSnep
    I also have the leg twist issue and it seems to be a problem with the Full Body IK system, not with the avatar. When I leave full body the legs are normal, but as soon as I switch to the full body IK my legs twist outwards 45 degrees. I'm not sure of a solution if any exists but it's not a super major issue for most avatars.

    I haven't actually seen this happen at all for me, but this could be due to a misconfiguration of the avatar's rig? Does it happen with other avatars? Another thing to check would be the Roll value in Blender, as that can have some odd effects when porting things into Unity. If you click the hand/wrist bone in Blender in Edit Mode, check to see if the Roll is anything but 0. If it is, try setting it to 0 and see if that fixes it.

    Other than that, I have no clue. Could just be general issues with the model.
     
  12. Hotox

    Hotox Member

    Joined:
    Nov 19, 2017
    Messages:
    106
    Likes Received:
    45
    VRChat:
    Hotox
    Heyho awesome tutorial, thank you!

    I'm currently working on implementing this into Cats and have a few questions:

    After parenting the old leg bones to the newly created ones I tried parenting the knees to the new bones as well. It still worked for me that way and skipped the step you have to take in Unity to assign the new bones and also got rid of the leg twist warning. For me as a desktop user it made no difference but I can't say that for full body tracking. Can you try this and tell me if this creates issues?

    For me as a desktop user the view position I chose in Unity made a difference if my knees bend or not. If I set the view position too high they began to bend again. So I had to set the Y value to 0.03 lower and they were straight again. Does this have to do with the proportions and does the view position play a role for full body users as well?
     
  13. pcenginefx

    pcenginefx New Member

    Joined:
    Feb 24, 2018
    Messages:
    3
    Likes Received:
    0
    @Hotox! Super awesome you're working on implementing it into Cats. I'll have to try it again with my avatar once it is released as I really want to fix the leg twist issue.

    @ProfessorSnep I have other avatars which do not exhibit the leg twist problem.....just my beautiful succubus avatars :( I still need to a compare or something to see what the hell is wrong....
     
  14. ProfessorSnep

    ProfessorSnep Member

    Joined:
    Nov 17, 2017
    Messages:
    24
    Likes Received:
    37
    VRChat:
    ProfessorSnep
    Heya!

    So while I'm not currently able to test the parenting thing in-game, I wouldn't imagine it would work as the reason I created those bones in the first place was to have the hips and legs be 180 degrees apart, as required by the IK. Not assigning those upside down bones to the leg positions would mean that the hip and (assigned) legs would be in the same direction, unless I'm misunderstanding your method. I'll go ahead and test it tomorrow to make sure.

    As for the view position, it definitely matters a lot with full body IK, as moving the view ball slightly up or down can be the difference in having your body not match up, to your head moving too far forward when you lay down. I'm unsure of the desktop issue, and I haven't really seen anything like that when I go into desktop with my fixed up avatars, but I'd imagine that would be either due to jankiness in the desktop IK or just proportions.
     
  15. Ainrehtea Dal'Nalirtu

    Joined:
    Apr 9, 2018
    Messages:
    2
    Likes Received:
    0
    VRChat:
    Ainrehtea
    Okay, i just want to say that Snep saved me time with vp/bent knee issues and constantly having to change my IRL height from 6'3 all the time to adjust.
    However, i don't use the extra bones that have been placed. i just flip the hip bone and make sure that the legs and hips are perfectly centered in my mesh.

    For the longest time though, my upper thighs have suffered from 45 degree twists either the same direction or otherwise. This isn't a bone rotation issues but a issue that only appears in FBT where if you see your legs deform or bend backwards. I've finally figured out how to fix this.

    Depending on many things. Leg errors in fbt occur due to where the two bones meet. I learn most of my deformities in the legs were due to the upper and lower leg bones meeting together more to the back of the knee area of my mesh.
    Moving it forward to at least half-way to mid or in mid, fixes the messed up leg issues with upper or lower leg problems.

    So, if anyone else is experiencing that, hopefully it helps.
    Side note: moving those bones forwards will give you more of a semi-bent knee while using the upside down hip method but shouldn't look too bad.
    I'm still experimenting with bone placements to see for better solutions to twisting issues in limbs. 20180406221639_1[1].jpg unknown[1].png
    (second image the joining point was touching the very back of the mesh and cause a lot of weird leg issues in fbt.)
    Images are from a FBT commission i ended up trouble shooting and fixing.
    I also think by moving the knee/lower leg bones connection point forward i got the "hip is not match with legs" warning in unity but it was a value of 2.2 and i see no performance issues with the hip area while in-game.

    If this helps anyone, let me know!
     
  16. GunstarX

    GunstarX New Member

    Joined:
    Apr 7, 2018
    Messages:
    2
    Likes Received:
    0
    VRChat:
    GunstarX
    Forgot to reply here forever ago. Yeah, setting to Roll to zero on all the arm and finger bones fixed the weird finger breaking problems I was having. Huzzah!
     
  17. Hotox

    Hotox Member

    Joined:
    Nov 19, 2017
    Messages:
    106
    Likes Received:
    45
    VRChat:
    Hotox
    Oooh this fixed my finger problems as well! It will be implemented in the next cats version as this should fix a lot of finger issues in Unity.
     
  18. WanderingYouth

    Joined:
    Jan 29, 2018
    Messages:
    78
    Likes Received:
    9
    VRChat:
    Mizurahi
    I just got my Vive trackers today and messed with full body tracking. I got most of it working except for one minor issue I'm not happy with and I'm looking for a solution. Whenever I extend my RL arms forward to it's max, my avatar's upper torso will be tugged forward a little. It visual looks really weird because my whole torso will just jerk back and forth every time I extend or retract my arms in VR Chat.

    Does any have anyone theories as to why this is happening?

    I also have a question about the new auto Full Body Tracking rigging feature for CATs. I used it and was able to upload my avatar to VR Chat and everything works. However inside Unity during the humanoid rigging window I noticed something odd. The upper left and right legs are not set to Leg.Left.0001 and vice versa for the right leg. When I tried to assign the new leg bones to their respective slots it gives me an error saying the knee bones are not the child of the new Leg Left and Right 0001. Is this normal or am I missing something?
     
    #18 WanderingYouth, May 2, 2018
    Last edited: May 2, 2018
  19. Jakhaxz

    Jakhaxz Member

    Joined:
    Jan 5, 2018
    Messages:
    14
    Likes Received:
    2
    VRChat:
    Jakhaxz
    It's mostly because anime models aren't correct human proportions. The legs are normally way too long.
    I'm guessing you're adjusting your play space to get the trackers on the feet. Also lowering the player height about a foot.
    Adjusting the player height in FBT scales the whole model, so when you do this to correct for the long legs it makes the arms shorter too. Causing the pull when you extend past you model's arms.

    Not sure what the easiest fix is for this. I've attempted to shorten the legs, using a unity package, and have managed to get one avatar setup so It kinda works well but it still requires play space adjustment.
    You could maybe try adjusting the legs in blender, but it's going to be trial and error.
     
  20. Hackspanner

    Hackspanner New Member
    VRChat Team

    Joined:
    Nov 20, 2017
    Messages:
    8
    Likes Received:
    9
    VRChat:
    Hackspanner
    Hey there, just seeing this for the first time. If this is working for you, then fine, you can ignore anything below. However, as the principal engineer on the avatar system, I'd like to make a few points.

    The hip bone facing up and the leg bones facing down is the expected rig configuration, setting this up in reverse as shown above may have some unknown side effects.

    The best way to check your rig: Load up the TPoseController on your avatar's Animator and hit Play in the editor. Take a look at what this does to the bones in your avatar. If the hips are rotated incorrectly or the knees bend outward or inward more than forward, or the hands are not parallel to the ground with palms down, your rig will have problems. This TPose was made from the default XBot/YBot rig, and Unity (Mecanim) retargets your rig into the animation. If your avatar's proportions vary greatly from XBot/YBot, the TPose may come out incorrect. VRChat uses this TPose to measure the avatar and figure out certain base limb rotations used during IK. On the XBot/YBot, the elbows are slightly bent so they point backwards, the knees are slightly bent so they point forwards, the arms are at right angles to the body (shoulders and arms are at the same level), the legs and hip are almost level, and the palms face down. If you avatar diverges from this while the TPose is applied, you'll need to make adjustments in the Rig Configuration to try to match the above.

    As OP says, for best results with full-body tracking, your rig and your real proportions should be similar.

    PS.
    One thing about bones in Blender vs. Unity that many people do not know -- Unity is a joint based system, there is only one "point" for a bone. The "end" of a bone in Blender is basically gone when you import it into Unity. The endpoint is only used to figure out the rotation of the bone.