Repository navigation
カスタム補正: トラッキングキーに割り当てられないシェイプをCustom式で動かす - #54
Merged
Merged
Conversation
顔メッシュには、2つのキーが同時に立ったときだけ使う組み合わせ補正用のシェイプや、 1つのキーの値に応じて順に立てる段階用のシェイプが入っていることがある。 Blendshapes Setはキー1つにシェイプ1つを結ぶだけなので、こうしたシェイプはネイティブFTでは動かず、 口を開けたまま舌を出すと舌が下唇を突き抜ける、といった崩れになっていた。 コンポーネントにカスタム補正の一覧(シェイプ名、反映方法、Custom式)を足し、 組み込みの規則と同じParameter Behaviorとして生成する。 - ゲートは FT ∧ 式が読むキーの側のトグル。エミュレーション・制限・Eye Syncのトグルには従わない - 命令数の予算では組み込みの規則より前に並べ、上限を超えるときは組み込みから先に落とす - シェイプ名が空・式に誤りのある項目はW-23、対象のシェイプがFace Tracking Meshに無い項目はW-22で知らせる - インスペクタの一覧には、項目ごとに式の命令数か作られない理由を出す Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
顔メッシュには、トラッキングキーに1対1で割り当てられないシェイプが入っていることがある。2つのキーが同時に立ったときだけ使う組み合わせ補正用のシェイプや、1つのキーの値に応じて順に立てる段階用のシェイプである。
Blendshapes Setはキー1つにシェイプ1つを結ぶだけなので、こうしたシェイプはネイティブFTでは動かない。
実例として、OSC版のFTアドオンを入れたアバターをネイティブFTへ移したところ、口を開けたまま舌を出すと舌が下唇を突き抜けた。
このメッシュは
JawOpenが舌を顎と一緒に下げて奥へ引き、それを打ち消すシェイプTongueJawCorrectionを旧FXがJawOpenに比例させて立てる作りだった。ネイティブFTではこのシェイプがどのキーにも当たらず、常に0になっていた。形状データ上で舌と下唇の三角形の交差を数えると、
TongueOut=1 のとき補正なしではJawOpen0.25〜1 で46〜64組、補正をJawOpenと同じ値にすると0組だった。変更内容
コンポーネントにカスタム補正の一覧(シェイプ名、反映方法、Custom式)を足し、組み込みの規則と同じParameter Behaviorとして生成する。特定のアドオンやアバターの知識は本体に持たせていない。
Runtime/Settings/CustomCorrectionSettings.cs: 設定の型。一覧の初期化子は空で、保存済みのコンポーネントの挙動は変わらないEditor/Domain/CustomCorrection.cs: 一覧を規則へ変換する。無効な項目は外し、シェイプ名が空・式に誤りのある項目は規則にせず問題として返すEditor/Domain/CorrectionPlanner.cs: 規則の対象をシェイプ名でも指せるようにしたKxNFTM/Gate/Custom/...)。エミュレーション・制限・Eye Syncのトグルには従わないDocumentation~/settings(.en).mdとbuild(.en).mdに説明を足したビルド・テスト結果
RuntimeEditorTestsの3アセンブリをdotnetでコンパイルした。エラーなしCustomCorrectionTests12件を含む)LocalizationTestsなど)は手元では未実行。poのキーが日英で一致することだけスクリプトで確かめた。このPRのCIで確認する未確認の点
ApplyToBlendshapeがVRChat上で働くか。既存のEye SyncはSetに入っているシェイプへ書いており、Set外のシェイプへ書く例はこれが初めてになる。働かない場合はこの機能全体が成立しないので、マージ前に実機で確かめたいこのPRに含めないもの
式を書かずに済むテンプレート(組み合わせ補正・段階・応答カーブ)、どのキーにも割り当てられていないFT用シェイプの警告、エディタ内でのプレビュー、規則一式を共有する資産。シェイプ名は手入力で、候補から選ぶUIも無い。
🤖 Generated with Claude Code