three-vrm
three-vrm copied to clipboard
Humanoid rig
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
-
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
...
- I still have no idea how I should call this instead of
- [ ] TBD
TODOs
- [ ] HumanoidRig probably should have missing intermediate bones
なるほど、mixamoのexampleはthree-vrm・three-vrm-core双方に用意してくれたのですね。良さそうです
口頭:
今回このMRでは「正規化されたHumanBonesを操作するためのインタフェース」を実装します。
以下の方針で実装を行います。
-
HumanoidRig / ModelRig / VRMRigはprivateとして隠蔽して、getBone類だけを公開します。
- 内部だけで管理し、外部に公開しないシグネチャ命名の重要性を下げるためです。
-
Humanoidに対しアクセサの追加・名前変更を行います.
- get/set
-
getRawBoneNode()
-
getNormalizedBone()
- …
-
-
.normalizedHumanBones
-
.nomalizedHumanBones.humanBones
-
- get/set
-
Humnoid.getBone()等は削除します
- 返すボーンが正規化されているか自明でないためです。
- getBoneで正規化したボーンを返し、従来の0.xの挙動を再現することも検討しましたが、今回は採用しません。
HumanoidRig / ModelRig / VRMRig という命名は最適ではないため、名称の変更を検討していますが、 それは内部的な変更にとどまるようにします。
@ke456-png warningが出るdeprecated compatを追加してみました。良さそうですかね? https://github.com/pixiv/three-vrm/pull/889/commits/5ea3c0de01549482d667c7efe146cc0b8daafce4
https://github.com/pixiv/three-vrm/pull/889/commits/3e365fff1baed78d9bdd3831b07b18458e40c5cb : 確かに、これは見落としてました!ありがとうございます。
normalized human bonesのルートは VRMHumanoid
からアクセスできたほうが良いかもな。 VRMHumanoid.normalizedHumanBoneRoot
とかですか
および、これはVRMのSceneに追加しちゃっても良い気がします。Expressionsと同じノリで
mixamoのモーションの仕様変更がここ数日?に入ったらしく、モデルがうまくアニメーションしなくなっちゃった。が、とりあえずこのブランチはこのままマージします。