Expressions/zh-hant: Difference between revisions

From VRChat Wiki
雨可韓韓 Yucohanhan (talk | contribs)
No edit summary
雨可韓韓 Yucohanhan (talk | contribs)
No edit summary
Line 82: Line 82:
VRChat 也提供內建的 Animator 參數。這些參數不需要額外加入 Expression Parameters 資產中,且不會計入自訂參數的預算限制。
VRChat 也提供內建的 Animator 參數。這些參數不需要額外加入 Expression Parameters 資產中,且不會計入自訂參數的預算限制。


內建參數處於唯讀模式,無法由用戶任意修改。要觸發內建參數,只需在 Playable Layer 的 Animator Controller 中使用對應名稱建立參數,VRChat 便會在執行期間自動更新其數值。這些參數不會被設定到子 Animator(Sub-Animator)上,而只會設定於 Playable Layer 的 Animator。
內建參數處於唯讀模式,無法由用戶任意修改。要觸發內建參數,只需在 '''Playable Layer''' 的 Animator Controller 中使用對應名稱建立參數,VRChat 便會在執行期間自動更新其數值。這些參數不會被設定到'''子 Animator'''('''Sub-Animator''')上,而只會設定於 Playable Layer 的 Animator。


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">

Revision as of 06:30, 4 June 2026

查看 · 編輯這是與 VRChat 官方資訊有關的頁面!
它已經由 VRCWiki 團隊審核並批准。透過閱讀貢獻指南,以瞭解如何為此頁面貢獻。
動作選單中的表情選單範例。

表情」(Expressions),是在 VRChat 中的角色(Avatar)功能之一,其由用戶自訂的選單所組成,可讓用戶在角色上啟用各種動作或切換功能,旨在以靈活且方便的方式快速存取角色的獨特功能。

更多資訊請參閱關於角色的創作者文件

表情選單

遊戲內的表情選單,可透過動作選單(Action Menu)存取,也可透過快速選單(Quick Menu)主選單(Main Menu)中的表情標籤頁存取。這種操作方式適用於所有平台的 VRChat。角色表情的變化會同步給同一平台上的其他用戶,並可設定跨平臺同步

SDK 中的表情

表情功能可透過 VRChat SDK 中的各種參數進行編輯。

基礎表情

當未設定任何表情功能時,系統會自動為角色加入包含基礎動畫的預設表情選單,其中包含以下動畫:

  • 揮手(Wave)
  • 鼓掌(Clap)
  • 指向(Point)
  • 歡呼(Cheer)
  • 跳舞(Dance)
  • 後空翻(Backflip)
  • 死亡(Die)
  • 悲傷(Sadness)

自訂表情

若要新增自訂表情,請先在 Unity 中建立 Expression Menu表情選單)資產與 Expression Parameters表情參數)資產,然後在 VRChat Avatar Descriptor 的 Expressions 區段中指派這些資產。Expression Menu 用於定義哪些控制項會顯示於遊戲內選單,而 Expression Parameters 則用於定義這些控制項所變更之數值的名稱、類型、預設值,以及同步行為。

每個自訂參數都可以設定是否 Saved儲存)及 Synced同步)。已同步的自訂參數會計入角色的 256 位元同步預算,而單一角色最多可定義 8192 個自訂參數。此資產中的參數也可以由 Contact ReceiverParameter DriverPhysBone 以及 OSC 進行變更。

SDK 也提供了一個 Default Parameters預設參數)按鈕。按鈕會還原 VRChat 預設 AV3 控制器所使用的三個別名參數:VRCEmoteVRCFaceBlendHVRCFaceBlendV

控制

每個頁面最多可建立 8 個控制項。建立控制項時,可選擇以下類型:

  • Button按鈕):按下時瞬間設定指定數值,並在 VRChat 傳送變更後立即自動重設。
  • Toggle切換):啟用時設定指定數值,停用時則重設該數值。
  • Sub Menu子選單):下設另一個表情選單,並可選擇在該子選單開啟期間設定特定參數。
  • Two Axis Puppet雙軸控制):透過水平與垂直輸入控制兩個浮點數參數,通常範圍為 -1.01.0
  • Four Axis Puppet四軸控制):控制四個浮點數參數,分別對應四個方向,通常範圍為 0.01.0
  • Radial Puppet環形控制):以環狀滑塊控制一個浮點數參數,範圍為 0.01.0

控制選單範例
動作選單與臉部鏡子的使用範例。(動畫 GIF)

當你向不同方向移動搖桿、觸控板或滑鼠時,將會改變其動畫參數,以此來表現不同表情,或在不同表情之間進行混合(例如「開心」與「驚訝」)。任何參數都可以透過此選單進行控制。

你可以在任一隻手上開啟一個選單(或同時在兩隻手上開啟)。預設情況下,可透過快速撥動來選擇選項;你也可以在動作選單設定中改為使用扳機鍵進行選擇。若要返回表情選單的上一層,請按下扳機鍵。

當屬於控制類型的控制項被開啟時,VRChat 會使用較快速的 IK 同步模式即時同步其數值。控制項關閉後,當前數值會維持不變,直到再次被修改為止。

表情參數

表情參數Expression Parameters)可透過表情選單、Contact ReceiverOSCParameter DriverPhysBone 元件來控制角色功能。這些參數接著會對應至角色 FX、手勢(Gesture)或動作控制器中的 Animator Controller 參數。

設定

Expression Parameters 資產中的每個項目都會儲存以下資訊:

  • Name名稱):必須與 Animator 參數名稱完全一致。
  • Type類型):可為 BoolIntFloat
  • Default預設):當角色重設時的預設值。
  • Saved儲存):控制該數值是否會在不同工作階段之間保留。
  • Synced同步):控制該數值是否會傳送給其他用戶。

預設情況下,自訂參數會使用 VRChat 的 Playable 同步模式進行同步。當控制類型的控制項處於被開啟狀態時,則會暫時改用較快速的 IK 同步模式。

內建參數

VRChat 也提供內建的 Animator 參數。這些參數不需要額外加入 Expression Parameters 資產中,且不會計入自訂參數的預算限制。

內建參數處於唯讀模式,無法由用戶任意修改。要觸發內建參數,只需在 Playable Layer 的 Animator Controller 中使用對應名稱建立參數,VRChat 便會在執行期間自動更新其數值。這些參數不會被設定到子 AnimatorSub-Animator)上,而只會設定於 Playable Layer 的 Animator。

Additional built-in parameters include:

  • Viseme (Int) — Set by lip sync from 0 (silence) to 14 (the "u" vowel) when the Avatar Descriptor's Lip Sync is set to Viseme Blend Shape or Viseme Parameter Only.
  • Voice (Float) — Perceived microphone volume from 0.0 to 1.0, affected by distance and earmuff settings.
  • VelocityX, VelocityY, VelocityZ, VelocityMagnitude (Float) — Movement speed in m/s along each axis and total magnitude. Locally, playspace movement does not count; remotely, it does.
  • Upright (Float) — 0 when prone, 1 when standing.
  • Grounded (Bool) — Whether the user is touching the ground.
  • MuteSelf (Bool) — Whether the user's microphone is muted.
  • Earmuffs (Bool) — Whether the user has earmuffs enabled.
  • IsOnFriendsList (Bool) — Whether the viewer is friends with the avatar's wearer (shows False locally).
  • ScaleFactor, ScaleFactorInverse, EyeHeightAsMeters, EyeHeightAsPercent (Float) — Scaling-related parameters for avatar scaling. EyeHeightAsMeters is recommended for scale-aware systems because it is linear and does not depend on upload height.

Each built-in parameter has a sync type determining when it is sent to remote users: IK for tracking-derived values (gestures, velocity, grounded), Speech for voice-related values (viseme, voice), Playable for user-state values (mute, earmuffs, tracking type, scale), or None for local-only values (IsLocal, PreviewMode).

Network synchronization

Only synced expression parameters and certain built-in parameters are sent over the network. The full list of data sent for each avatar includes:

  • IK targets — Head, jaw, and hands for desktop and 3-point tracking; additionally hip and feet for full-body tracking. Index controller users also sync finger positions.
  • Synced expression parameters — Only parameters marked as Synced are transmitted. Values are quantized: Int values sync in the range 0–255, Float values sync as multiples of 1/127 between −1 and 1, and Bools sync as true or false.
  • Built-in VRC parameters — Including gestures, velocity, voice, and other runtime parameters.
  • PhysBones — Pose position data is sent to late joiners.

For reliable late-joiner support, a recommended pattern is to split animator logic using the IsLocal parameter: local-side layers handle contacts, parameter drivers, and all logic, then set synced parameters, while remote-side layers only read those synced parameters to play the correct visualization.

Gestures and facial expressions

The built-in GestureLeft and GestureRight parameters identify the user's hand gesture, while GestureLeftWeight and GestureRightWeight expose analog trigger pressure. On humanoid avatars, the Gesture playable layer is commonly used for hand poses, while facial expressions are often driven from the FX layer with blendshapes, material properties, or other non-humanoid animations.

On tracked controllers where finger tracking overrides animation by default, creators can use a Tracking Control state behavior to switch the relevant fingers from Tracking to Animation when needed.

Expression Parameter Mismatching

Expression Parameter Mismatching refers to the practice of using different parameter types between your Expression Parameters and your local Animator Controller parameters. While it is recommended to keep parameter types consistent, mismatching is supported and the system will convert values between types according to specific rules. This can be useful in certain advanced setups. The same conversion behavior can also be used with built-in VRChat Animator parameters.

Unity's Animator system uses floats on the backend for all parameter types, while VRChat stores synced custom parameters in compact network-friendly formats. The user interface in Unity and the VRCSDK lets creators choose parameter types for convenience, but under the hood, value conversion is possible. This means that parameters are not being cast in the C# sense, but rather mismatched across systems. This behavior is also supported by popular tools such as Av3Emulator and Gesture Manager.

Expression Parameter Bool

Animator Controller Parameter
Type Expression Bool = False Expression Bool = True
Bool → Bool Bool = False Bool = True
Bool → Int Int = 0 Int = 1
Bool → Float Float = 0.0 Float = 1.0

Expression Parameter Int

Animator Controller Parameter
Type Behaviour
Int → Bool Any Int value that isn't 0 sets bool to True
Int → Int Expected Behaviour
Int → Float Straight Conversion: e.g. Int = 2 → Float = 2.0

Expression Parameter Float

Animator Controller Parameter
Type Behaviour
Float → Bool Any Float value that isn't 0 sets bool to True
Float → Int Rounded Conversion: ≥0.5 → 1 ; <0.5 → 0
Float → Float Expected Behaviour

Resources

See also

References