bdunderscore / modular-avatar

Other
443 stars 53 forks source link

fix: add heuristic bone mapping pattern #875

Open Sayamame-beans opened 1 month ago

Sayamame-beans commented 1 month ago

"びしょぬれのしずくさん"のボーン名が辞書に入っていないため、Setup Outfit等が正常に動作しない問題の修正を試みます。 fix: #874

現状の懸念点

bdunderscore commented 1 month ago

Armature自体の名前は参照されないので大丈夫なはずです。Prefixについてはここに登録するといいかも? https://github.com/bdunderscore/modular-avatar/pull/875/files#diff-4597ba1e63e829f80213083537afb62f49972e8f689367b41bb1f8a6b9e3f4cdR235-R241

Sayamame-beans commented 1 month ago

もしかして、アバター側のボーン名って辞書に入ってなくても問題ない(Humanoid参照な)感じでしたっけ? だとしたら私の勘違いかもですね…(ただ、衣装側でprefix(bone_)が自動検知されてくれてなかった気が…?)

bdunderscore commented 1 month ago

もしかして、アバター側のボーン名って辞書に入ってなくても問題ない(Humanoid参照な)感じでしたっけ?

Setup OutfitはArmatureの子オブジェクトをはじめに名前合わせを行っています。

https://github.com/bdunderscore/modular-avatar/blob/719c39da6ecb1e2387a2fcff6942c39b4c4922dc/Editor/EasySetupOutfit.cs#L140-L147 https://github.com/bdunderscore/modular-avatar/blob/719c39da6ecb1e2387a2fcff6942c39b4c4922dc/Editor/HeuristicBoneMapper.cs#L299-L303

なので、Armature自体の名前が不問です。そもそもArmatureの表記ゆれが大きすぎるので判断材料にならないための仕様ですね。

ただ、衣装側でprefix(bone_)が自動検知されてくれてなかった気が…?

素体側のprefixは確かに前例がないですね・・・ #429 を実装すれば対応できるかと思います。

Sayamame-beans commented 1 month ago

頭がこんがらかってきたので整理します… ソースコードまだ十分追えてないので抜けがあります

素体

衣装

bdunderscore commented 1 month ago

素体

衣装

Sayamame-beans commented 1 month ago

とすると… prefix "bone_"を

https://github.com/bdunderscore/modular-avatar/pull/875/files#diff-4597ba1e63e829f80213083537afb62f49972e8f689367b41bb1f8a6b9e3f4cdR235-R241

に入れちゃうと、素体とのボーン名不一致で困ることになりそうですかね? (素体側のボーン名を見る時もこの処理通ります?) 全ボーンを登録するしかないのかな

bdunderscore commented 4 weeks ago

うーん、どちらかというとアバター側はリグ情報を参照すべきかな・・・・

Sayamame-beans commented 3 weeks ago

で良いですかね?

Sayamame-beans commented 2 weeks ago

ready to reviewしました 動作未確認です