名前は、人が虎へと姿を変える中島敦の短編「山月記」に由来します。
元の姿と1つの変身先(別のベースアバターも可)を、1つのアバターの中で切り替えられるようにする NDMF ビルド拡張です(VRChat 用)。 Expression Menu の「変身」から、演出つきで衣装・髪・アクセサリーを入れ替えます。アップロード後のアバターに独自スクリプトは残りません。
読み込み直後は同期された姿を受け取るため、元の姿を最大約0.5秒表示してから切り替えを確定します。
上下方向の切り替えでは、移動する演出がアバター上端の境界まで到達します。
Armature 内に安全な取り込み単位を作れない Renderer や、切替境界をまたぐ AAO Merge Skinned Mesh、表情パラメーターの型競合は解析時にエラーになります。同じ種類のコンポーネントの2つ目以降の enabled は切り替えられず、警告して A の値を維持します。
Tools > TenteEEEE > Sangetsu > Add to Selected Avatar(または Add Component > TenteEEEE > Sangetsu)で追加します。差分モードでは A と B の Humanoid の骨格・ボーン名・休止姿勢・顔・ViewPosition が一致している必要があります。衣装・髪・アクセサリー・マテリアル・BlendShape の値などは異なっていても構いません。一致しない場合は全身切替モードを使います。
Inspector の「変身先」見出し右側で「日本語 / English / 両方」を切り替えられます。解析やビルドのメッセージもこれに従います。 上部には変身先・一行のモード概要・状態があり、エラーと修正できる警告は常に表示されます。Streaming Mip Maps の警告は修正ボタンを使えます。別のアバターの場合は「視点」と「大きさ」を選べます。「演出」は種類・色・切り替え方・長さ・プレビューを表示し、その他の設定は「演出の詳細」にあります。「メニュー」は表示名とアイコンを表示し、追加先や「初期状態を変身先にする」などは「メニューの詳細」にあります。「最適化(N 項目変更)」は折りたたまれています。「診断」には警告・演出の統計・差分一覧・容量・再解析/レポートのコピーがあり、最後に「詳細設定」があります。折りたたんだ見出しには、隠れた値が既定値と異なると「(N 項目変更)」と表示されます。解析結果は最初の 8 件を表示し、「すべて表示」で残りも確認できます。
差分モードで安全に切り替えられない差はエラーとして表示し、ビルドを止めます。
A と B の Humanoid 骨格、休止姿勢、顔メッシュ、リップシンク設定、ViewPosition を比較し、一致すれば差分モード、違いがあれば全身切替モードを自動で選びます。Inspector には一行の概要だけを表示し、判定理由は「診断結果をコピー」でコピーできます。両方とも Humanoid が必要です。
「視点」で A または B を選ぶと、そのアバターの視点とトラッキング用骨格を両方の姿で使います。「大きさ」は副アバターの目の高さを主アバターに合わせる(前後位置も補正)か、元のサイズを保つかを選びます。A を主にして高さを合わせると B を調整し、元のサイズでは B をそのまま表示します。B を主にした場合は同様に A を調整するか、そのまま表示します。元のサイズでは副の姿の視点がずれます。
各アバターで設定されている場合、リップシンク、まばたき、視線と姿ごとの表情レイヤーを扱います。副のまばたきは BlendShape 方式、視線は両方に視線用ボーンがある場合に対応します。
Inspector の「演出をプレビュー」で、このアバターだけをメモリ上でビルドして演出を確認できます(アバターの規模により数十秒。Play でシーン全体をビルドするより短く済みます)。設定変更は「再ビルド」で反映します。音は再生されません。プレビューは NDMF プラグインのみを実行するため、VRCFury など他ツールのギミックの確認には引き続き Play モードが必要です。
「演出」で、変身の見せ方を次の9種類・自作 Prefab・なしから選べます。
| 演出 | 内容 |
|---|---|
| 花弁・羽根(GPU) | 花弁と羽根が舞い上がり、衣装へ集まる |
| 結晶化・破砕(GPU) | 衣装が結晶化して砕け、再び組み上がる |
| 衣装再織(GPU) | 衣装が光の糸にほどけ、両手側から織り直される |
| 魔法少女(GPU) | 魔法陣・光のリボン・光の衣・星のフィナーレ |
| 魔法少女 | 粒子による魔法少女風の演出 |
| きらめき螺旋 | 星の粒が螺旋を描いて包む(既定) |
| 光の柱 | 足元から光の柱が立つ |
| 花びら | 花びらが舞う |
| 煙 | 煙に包まれて入れ替わる |
(GPU)と付いた演出は PC 専用です。Android/iOS 向けビルドでは GPU 部分を外し、軽い粒子だけを残します。
GPU 演出は VRChat 内でのアバター身長変更に追従しません。
主な設定:
| 項目 | 内容 |
|---|---|
演出の長さ(transitionSeconds) | 演出全体の秒数。GPU 演出は3〜5秒が目安 |
入れ替わるタイミング(switchPoint) | 演出全体のどの時点で見た目を入れ替えるか(割合) |
切り替え方(switchStyle) | 一斉/上から下/下から上。上下は境界がアバターを通過しながら入れ替わります |
境界の通過秒数(sweepSeconds) | 上下に切り替えるときの通過時間 |
色(effectColor)・大きさ(effectScale) | 演出の色と大きさ。演出はアバターの身長に合わせて拡大縮小します |
効果音の音量(effectVolume) | 0では演出の音声をビルドから除外。Android/iOS でも音を外します |
髪を途切れさせない(keepHairContinuous) | 演出中も髪や帽子が消えないよう、頭頂から毛先へ一続きに入れ替えます(既定オン) |
素体を膜で隠す(gpuBodyVeil) | 衣装再織・結晶化・花弁/羽根で、衣装が消えている間の素体を覆います(既定オン) |
膜の見た目(gpuBodyVeilStyle) | 衣装の消失・再生に沿って境界が動く暗幕(既定)、または半透明のすりガラス |
ぼかしの強さ(gpuBodyVeilBlur) | 肌に沿う薄い膜のまま、すりガラスのぼかしの強さを調整(既定 0.7) |
暗幕と半透明のすりガラスは、胴体付近で衣装が消えた場所を覆い、衣装の再生に合わせて同じ境界が移動・消失します。すりガラス越しの素体はぼけて、うっすら見えることがあります。境界は柔らかく光り、細い光の模様と走査光が現れます。
すりガラスは素体の Probe Anchor・ライトプローブ・リフレクションプローブ設定を引き継ぎ、環境光とぼけた反射になじみます。
膜は自動選択された共有素体1個が対象です。別メッシュの追加部位、共有素体に含まれない部位、深度判定を無視する特殊なシェーダーまで覆うものではありません。これらがある場合は、その部位を別途非表示にするか衣装で覆ってください。
PCの通常の上下スイープとGPU表面演出(衣装再織・結晶化/破砕・花弁/羽根)は lilToon と Poiyomi Toon 10.x(10.0.29 で動作確認)に対応します。Poiyomi は任意の依存パッケージです。GPU表面演出ではUV8を使用するため、衣装MeshでUV8が空いている必要があります。対応シェーダーの互換Shaderはプロジェクト内キャッシュへ自動生成し、元のPoiyomi Shaderは変更しません。Poiyomi 10.x の別バージョンで再織Shaderを生成できない場合は、診断に理由を出して部品ごとの切替に戻ります。9.x 以前は非対応です。同じRendererのスロットにPoiyomiとlilToonが混在する場合や、形態間で異なる対応シェーダーを使う場合は部品ごとの切替に戻ります。既存アニメーションがMaterialを操作する場合や、Poiyomiのディゾルブが既に有効な場合も同様です。最適化ロック(Lock In)済みのPoiyomi Materialは、ロック前の設定から演出用コピーを作ります(元のMaterialは変更せず、コピーはアップロード時にThryが再ロックします)。Renderer有効状態のアニメーションも競合する場合は重なりとして警告します。 アバターのルートにスケールが設定されている場合も、上下の切替位置と演出の基準身長はルートの座標系で計算します。
Inspector の「演出の詳細」に、演出が追加する粒子・三角形・Skinned Mesh などと、VRChat のアバター全体の性能ランクと、演出による変化を表示します。 非表示の演出も VRChat の性能ランクに数えられます。 特に GPU 演出は三角形数が多く、PC でも性能ランクが下がりやすいので、表示を確認してから選んでください。
標準演出を選んで「この演出を複製して自作Prefabにする」を押すと、Assets/SangetsuEffects/ に複製され、自作 Prefab として設定されます。
マテリアルは Prefab の隣にコピーされ、テクスチャは標準演出と共有します。
子オブジェクトに TransformationEffectPart を付けると、出す段階(溜め・切替・余韻・全体)や、一斉/上下のどちらで出すかを指定できます。
自作 Prefab に使えるのは Transform、ParticleSystem、AudioSource、MeshFilter、MeshRenderer、SkinnedMeshRenderer、TrailRenderer、LineRenderer、Light、Constraint、TransformationEffectPart、TransformationGpuParticles です。スクリプトや PhysBone などを含むと解析エラーになります。
一部の演出は、切替の瞬間に音の山が来るよう、ビルド時に元の音を切り詰めた WAV を Assets/SangetsuCache/Audio に作ります。
演出の長さなどを変えるたびにファイルが増えます。Tools > TenteEEEE > Sangetsu > Clear Audio Cache で消せます(次のビルドで必要な分だけ作り直されます)。
| 項目 | 内容 |
|---|---|
| メニューの表示名・アイコン・追加先 | 既定では既存メニューのルートに「変身」トグルを追加します |
初期状態(defaultToTarget) | 最初にどの姿で始めるか |
状態を保存(saveState) | 次回起動時も最後の姿を保ちます |
パラメーター名(parameterName) | 空なら内部名。指定すると他の Animator や OSC から操作できます |
既存アニメーションを反映(mirrorExistingAnimations) | A の既存トグルを取り込んだ衣装にも反映します(既定オン) |
表情レイヤーを形態ごとに切替(switchExpressionLayers) | 既定オン |
BlendShape の自動切替(autoBlendShapes)・除外(excludedBlendShapeNames)・明示指定(blendShapeNames) | 素体の基準値の差を自動で切り替えるか、どれを外すか |
ボーンの Scale 差分を反映(applyBoneScaleDifferences) | Humanoid 以外の共通ボーンの Scale の差を切り替えます |
除外パス(excludedPaths) | 指定した階層を A/B 両方で比較・切替から外します |
アニメーションの競合を許可(allowAnimationConflicts) | 既存アニメーションとの競合をエラーでなく警告にします(自動では解決しません) |
既定では、両形態で一致する部品を共有し、元の姿だけの Renderer は変身先で隠します。差がある部品は枝ごと切り替えます。「演出用材質を常用」は対応 GPU 演出や自作演出で AAO のメッシュ統合を促しますが、不透明材質がカットアウトになり見た目が変わる場合があります。「変身先テクスチャ上限」は変身先だけが使うテクスチャを縮小するため画質が変わります。この二つは既定でオフです。縮小したテクスチャは Assets/SangetsuCache/Textures にキャッシュされ、Tools > TenteEEEE > Sangetsu > Clear Texture Cache で削除できます。
「元の姿テクスチャ上限」も既定でオフで、普段の見た目の画質が変わり、両形態で共有するテクスチャにも適用されます。
このパッケージに購入アバターやそのデータは含まれません。
MIT License(LICENSE)。同梱する一部の効果音の生成に使ったツールのライセンスは THIRD-PARTY-NOTICES.md を参照してください。
Sangetsu is an NDMF build extension for VRChat. It lets one avatar switch between the base avatar and one target, including a different base avatar through an Expression Menu toggle, with a transformation effect. No custom scripts remain on the uploaded avatar.
Requirements: Unity 2022.3, VRChat SDK Avatars 3.10.5+, NDMF 1.14.8+, Modular Avatar 1.18.7+. Avatar Optimizer is optional.
Usage
Tools > TenteEEEE > Sangetsu > Add to Selected Avatar.Sangetsu compares the humanoid skeleton, rest pose, face mesh, lip-sync configuration and ViewPosition. It automatically selects diff mode when they match and whole-avatar swap when they differ; the Inspector shows a one-line summary, and reasons are included in the copied report. Both avatars must be humanoid.
Choose A or B as Viewpoint: its viewpoint and tracking skeleton are used in both forms. For Size, match the secondary avatar’s eye height to the primary (also correcting the forward offset), or keep its original size. With A primary, matching adjusts B and keeping size leaves B at its original size. With B primary, matching adjusts A and keeping size leaves A at its original size. Keeping size means the viewpoint is offset in the secondary form.
Lip sync, blink, eye look and per-form expression layers work when configured on the respective avatars. Secondary blink requires BlendShape eyelids; eye look requires eye bones on both avatars.
By default, identical parts are shared between forms and base-only Renderers are hidden in the target form; differing branches are switched as a whole. The optional “Use effect materials at rest” helps AAO merge meshes for compatible GPU and custom effects, but opaque materials become cutout and may look different. The optional target texture size limit reduces textures used only by the target, changing image quality. Both options are off by default. Resized textures are cached in Assets/SangetsuCache/Textures and can be removed with Tools > TenteEEEE > Sangetsu > Clear Texture Cache.
The base texture size limit is also off by default; it changes the everyday look and applies to textures shared by both forms.
The language popup is on the right of the Target header. The top shows the target, a one-line mode summary and status; errors and actionable warnings are always visible and the Streaming Mip Maps warning has a fix button. For a different avatar, Viewpoint and Size are shown. Effect shows type, color, switch style, length and Preview; other settings are under Effect details. Menu shows the toggle name and icon; Menu details contains the install target, Start in target form and other settings. Optimization is a collapsed “Optimization (N changed)” foldout. Diagnostics contains warnings, effect statistics, differences, capacity, reanalysis and report copying, followed by Advanced settings. Collapsed headers show “(N changed)” when hidden values differ from their defaults.
If the target is active in Play mode, exit Play mode and reanalyze. If the install target menu warning appears, choose a menu reachable from Avatar A’s menu.
If AAO mesh removal differences are reported, match the settings on both avatars. If component differences on shared objects are reported, match the settings on both avatars. If root scales differ, all forms use A’s scale. Shared Renderers using the same mesh retain A’s probe anchor, bounds, shadow and light/reflection probe settings; match the settings if the appearance differs.
If Material animation on a separate Renderer is reported, check behavior after building. If MA Material Setter on a separate Renderer is reported, check behavior after building. If target components not copied to a separate Renderer are reported, check the required settings. If a selected BlendShape on separate Renderers is reported, use the same Mesh on both avatars. If a target-only branch without a Renderer or gimmick is needed, include it in an imported part. Transform-only branches and bones referenced by kept or imported renderers do not produce this warning; unreferenced components still do. If VRCFury is reported, check its generated animations after building. If an internal target was skipped, check the hierarchy and analyze again.
In diff mode, A and B must share the humanoid skeleton, bone names, rest pose, face and ViewPosition. Outfits, hair, accessories, materials and BlendShape values may differ. Differences that cannot be switched safely are reported as analyzer errors and stop the build.
Effects: nine built-in effects (four GPU effects for PC only), a custom prefab, or none. GPU effects add many triangles, and hidden effects
still count toward VRChat’s performance rank; effect additions and the resulting rank are under Diagnostics. Effect audio is removed on
Android/iOS. Some effects bake timing-adjusted WAV files into Assets/SangetsuCache/Audio; clear them with
Tools > TenteEEEE > Sangetsu > Clear Audio Cache (they are recreated when needed).
Ordinary timed vertical sweeps and GPU surface effects (Reweave, Crystal Shatter, and Petal/Feather) support lilToon and Poiyomi Toon 10.x on PC (verified on 10.0.29). Poiyomi is optional. GPU surface effects use UV8, so the clothing mesh must leave UV8 available. A compatible shader variant is generated automatically in a project cache; the original Poiyomi shader is not modified. If the Reweave shader cannot be generated from another Poiyomi 10.x version, the diagnostics show why and those parts fall back to part switching. Poiyomi 9.x and earlier are not supported. A Renderer with both Poiyomi and lilToon slots, or one that uses different supported shaders across forms, falls back to part switching. The same fallback applies when a Material is animated or Poiyomi dissolve is already enabled. For an optimizer-locked (Locked In) Poiyomi Material, the effect copies are made from its pre-lock settings; the original Material is not modified, and Thry locks the copies again on upload. A conflicting animation of the Renderer enabled state is reported as overlap.
Use Preview effect in the Inspector to build only this avatar in memory and view the effect (tens of seconds depending on the avatar; shorter than building the whole scene in Play mode). Use Rebuild to apply settings changes. Audio is not played. The preview runs only NDMF plugins, so Play mode is still needed to check gimmicks from other tools such as VRCFury.
The dark and translucent frosted body veils follow the same moving clothing boundary. Frosted glass blurs the body, which may be vaguely visible, and has a softly glowing edge. It follows the body renderer’s probe lighting and reflections.
Limitations: diff mode requires matching skeletons, bone names, rest poses, face meshes and ViewPosition, and matches objects by path; per-form mesh deletion hides geometry instead of removing it; hidden outfits and effects still count toward size and performance rank; no material conversion for Quest/Android outfits. In whole-avatar swap, B’s non-FX playable layers are not imported and its VRCFury gimmicks are not verified.
Imported units support MA Convert Constraints, Platform Filter, World Scale Object, World Fixed Object, Visible Head Accessory and Remove Vertex Color. A Scale Adjuster’s legacy reference must be unset or inside the same unit. Move Independently, Global Collider, Replace Object, AAO components other than Merge Skinned Mesh, Rigidbody and Joint cannot be imported.
License: MIT (LICENSE). See THIRD-PARTY-NOTICES.md for the tools used to generate some bundled sounds.
com.tentee.vrc-sangetsu
Undefined
0.2.1 (Changelog)
2022.3 or later
No dependencies
No legacy packages