unity3d-jp / AnimeToolbox

398 stars 18 forks source link

ジンバルロック現象? #21

Closed fujihajime closed 1 year ago

fujihajime commented 1 year ago

この記事の要領で https://note.com/nyaa_toraneko/n/n493c6090c501?magazine_key=m8c2f91f09445#16d11fc1-67bb-4ff2-ae43-d75dcfe2039e 縦に移動する動きをさせると、回転の動きがないモーションにもかかわらず、humanoidアバター全体が回転しています。

識者曰く「ジンバルロック現象ではないか」との指摘がありました。 これを回避する方法などありましたら次期バージョンまたは解説記事に組み込んでいただけるとありがたいです

https://user-images.githubusercontent.com/127116829/223130500-bbb40422-904a-4829-9f12-2cb82ba2e0a0.mov

fujihajime commented 1 year ago

他の方に依頼されている報告事項を追記しておきます 使っているOS:Windows10 22H2 ビルド19045.2604 インストールするUnityのバージョン:2021.3.19f1 使っているUnity Hubのバージョン:3.4.1

その他要報告事項があればおっしゃってください

Nobuyuki-Kobayashi commented 1 year ago

こんにちは。 いただいた質問を拝見したところ、こちらの質問はアニメーション一般の実装に関しての質問ですので、本Issuesの目的であるAnime Toolboxのサポートの範囲ではございません。 ですので、本件に関してはこちらではサポート対象ではないことをご了承くださいませ。

その上で、わかる限りで多少のアドバイスをしますと、もし不都合を感じている部分が、ムービークリップ0:04あたりのフリップだとしたら、こちらはジンバルロック現象ではありませんので、身体の回転(方向)を記録しているジョイントのアニメーションカーブを確認して、オイラーフィルターをかけてみるとよいと思います。

アニメーションをDCCツールで作成している際に、クオータニオン回転で360度を超える回転をしている部分があると、それらをオイラー回転に置き換えた時に360度(0度)を挟む付近でしばしばフリップが発生します。このような時には、該当するアニメーションカーブに対して、DCCツール上でオイラーフィルターをかけてやると、この種のフリップは改善することが多いです。

以上は、あくまでもアドバイスですので、使っているDCCツールの使い方等は、それらのコミュニティで質問するようにしてください。

よろしくお願いします。


Hello. Please note that this question is about the implementation of animation in general, and is not within the scope of Anime Toolbox support, which is the purpose of this issue. Please understand that we do not support this issue.

By the way, if the part you are having trouble with is the flip at 0:04 of the movie clip, this is not a gimbal lock phenomenon, and you should check the animation curves of the joints that record the body rotation (direction) and try applying an Euler filter.

When creating animations with the DCC tool, if there are parts of the body that are rotated more than 360 degrees by quaternion rotation, flips often occur near the 360 degree (0 degree) mark when those parts are replaced by Eulerian rotation. In such cases, applying an Euler filter to the relevant animation curves in the DCC tool often improves this type of flip.

The above is just advice, so please ask questions about how to use the DCC tools you are using in those communities.

Best regards.

fujihajime commented 1 year ago

ご回答ありがとうございます。 またサポート対象外にも関わらず丁寧なアドバイスをいただき助かりました。 いただいたアドバイスを元に調査、勉強させていただきます。

fujihajime commented 1 year ago

最終的にDCCツールでどうこうするわけでもなく、モーションインポート設定で脚部IKのチェックを外すだけでフリップが治りました。以上、結果報告まで。 ありがとうございました。