Search Unity

SteamVR Custom hand rig for Index Controllers broken

Discussion in 'AR/VR (XR) Discussion' started by jlee-lee, May 7, 2020.

  1. jlee-lee

    jlee-lee

    Joined:
    Dec 26, 2014
    Posts:
    4
    Hello VR community,

    I wanted to know if anyone had successfully skinned a new set of hand meshes using the provided rig with SteamVR to work with the Index Controllers. I imported the set of hand bones in Maya, skinned with a new mesh, and got the result below. Not exactly sure what's going on but I am sure I implemented it correctly in engine, but perhaps Maya exported the .FBX in a strange way, giving the strange result.


    Cheers, thefk.png View attachment 616246
     
    RedLogicP likes this.
  2. seanothe3rd

    seanothe3rd

    Joined:
    Jul 16, 2020
    Posts:
    1
    I'd also love to know how to do this properly.
     
  3. StCost

    StCost

    Joined:
    Mar 1, 2017
    Posts:
    30
    G'day. I think you have problems with exporting. I struggled 12 hours before a managed to do this. Maybe Blender (D on't know how to work in Maya) is not the best with editing .fbx files, but that's how I made it to work. So that's a story, how I made custom Hand Model, based on default prefab

    1) I imported in Blender default SteamVR hand `SteamVR\Models\vr_glove-model.fbx`
    2) Imported model, that I want to use instead of default one
    2.1) Tweak size and position of your model
    3) ctrl+click on my model, ctrl+click on Armature (select both of them, i mean). In this Armature thing default hand mesh is located
    4) On top left corner Object > Parent > With Automatic Wieghts
    5) Now click any bone (Long pyramid) and press ctrl+tab. That's the pose editing mode
    6) Click again on any bone. Press R to rotate. Look if every bone behaves like you wish
    If you are lucky that would be enough and every bone if rotating fine. But if some vertex is stuck in place or rotating wrong do:
    1) Click on you model
    2) Go to Modeling tab
    3) Click on ONE broken vertex
    4) Go to Verex Weights and remove vertex groups with "_aux" in the name. Normalize
    5) Repeat with every broken vertex
    That will fix not moving or moving too much vertexes. Now you can delete original hand mesh

    That's all I did to make the model working. But then I had problems in Unity. Exported model was distorted.
    I had to install this plugin: https://github.com/EdyJ/blender-to-unity-fbx-exporter/blob/master/blender-to-unity-fbx-exporter.py

    After that you import your .fbx file in unity. You only need your mesh, Root, and everything inside of Root. Any other thing is redundant.
    Also note, that for some reason items are sorted in alphabetical order. So you have to sort them back manually. Thumb, index, middle, etc. Fingers are on the wrong places

    Probably, if you are good with blender - you'll be able to make some things better or faster. But that's how I made my custom hand model.

    I found a lot of simillar dead topics with no solution, so I'm gonna post this message to every one I'll find. I hope it will help someone
     
  4. JasonB

    JasonB

    Joined:
    Dec 29, 2010
    Posts:
    103
    This may not be the most palatable opinion, but I highly recommend using SteamVR SDK only as a base for your code and creating/rigging your own hand meshes from scratch as well as writing your own interaction systems from scratch.

    The included prefabs/systems, especially the grab pose system are buggy and broken and I wouldn't trust any of them to hold up in a completed game (I managed to break it even using their provided hand models and nothing custom). What I ended up doing was not worrying about exact placement/rotation of my hands in Blender, modeling/rigging my own hand from scratch, then in Unity using the SteamVR SDK's Index controller model attached to a poser, attach the hand model to that for figuring out proper translation/rotation offsets in Unity to match the hand to the controller (which will in turn match the hand to your IRL hand). I also wrote my own finger system from scratch by getting finger curl data from SteamVR, and will be writing my own grab/grab pose scripts.

    This way you can also build the rig how you want it, using only bones that you need, and you know where they are and what they do, how they bend, etc. So I get the curl values for each finger from the SteamVR skeleton input and use that as a way to lerp between open and closed poses, which you can do in just a handful of lines of code.
     
    Syrsly likes this.