three-vrm icon indicating copy to clipboard operation
three-vrm copied to clipboard

Humanoid rig

Open 0b5vr opened this issue 3 years ago • 2 comments

The second shot of #877

Description

  • Implemented a class called VRMHumanoidRig
    • It works as a proxy of humanoid bones, make us able to control humanoid bones without care of local transforms.
  • Add VRMHumanoidHelper
    • Visualizes axes of each humanoid bones
    • image

Context

https://github.com/vrm-c/vrm-specification/issues/337

In VRM1.0, humanoid bones will no longer be reset to uniform transform. The main purpose of this change is to make application developers able to control humanoid models with ease.

Points need review

  • [ ] I have 0% confidence about the API and naming
    • I still have no idea how I should call this instead of HumanoidRig ...
  • [ ] TBD

TODOs

  • [ ] HumanoidRig probably should have missing intermediate bones

0b5vr avatar Jan 12 '22 13:01 0b5vr

なるほど、mixamoのexampleはthree-vrm・three-vrm-core双方に用意してくれたのですね。良さそうです

0b5vr avatar Aug 03 '22 08:08 0b5vr

口頭:

今回このMRでは「正規化されたHumanBonesを操作するためのインタフェース」を実装します。

以下の方針で実装を行います。

  • HumanoidRig / ModelRig / VRMRigはprivateとして隠蔽して、getBone類だけを公開します。

    • 内部だけで管理し、外部に公開しないシグネチャ命名の重要性を下げるためです。
  • Humanoidに対しアクセサの追加・名前変更を行います.

    • get/set
      • getRawBoneNode()
      • getNormalizedBone()
    • .normalizedHumanBones
      • .nomalizedHumanBones.humanBones
  • Humnoid.getBone()等は削除します

    • 返すボーンが正規化されているか自明でないためです。
    • getBoneで正規化したボーンを返し、従来の0.xの挙動を再現することも検討しましたが、今回は採用しません。

HumanoidRig / ModelRig / VRMRig という命名は最適ではないため、名称の変更を検討していますが、 それは内部的な変更にとどまるようにします。

ke456-png avatar Aug 04 '22 07:08 ke456-png

@ke456-png warningが出るdeprecated compatを追加してみました。良さそうですかね? https://github.com/pixiv/three-vrm/pull/889/commits/5ea3c0de01549482d667c7efe146cc0b8daafce4

0b5vr avatar Aug 22 '22 08:08 0b5vr

https://github.com/pixiv/three-vrm/pull/889/commits/3e365fff1baed78d9bdd3831b07b18458e40c5cb : 確かに、これは見落としてました!ありがとうございます。

0b5vr avatar Aug 26 '22 04:08 0b5vr

normalized human bonesのルートは VRMHumanoid からアクセスできたほうが良いかもな。 VRMHumanoid.normalizedHumanBoneRoot とかですか

および、これはVRMのSceneに追加しちゃっても良い気がします。Expressionsと同じノリで

0b5vr avatar Aug 26 '22 08:08 0b5vr

mixamoのモーションの仕様変更がここ数日?に入ったらしく、モデルがうまくアニメーションしなくなっちゃった。が、とりあえずこのブランチはこのままマージします。

image

0b5vr avatar Aug 30 '22 09:08 0b5vr