Mirrors/zh-hant: Difference between revisions

From VRChat Wiki
雨可韓韓 Yucohanhan (talk | contribs)
Created page with "== 效能問題 =="
雨可韓韓 Yucohanhan (talk | contribs)
Created page with "鏡子中所反射到的每個物件,都會必須再額外重新渲染一次,並獨立於用戶在世界中實際看到的畫面之外。若鏡子反射了整個世界,則世界的渲染效能成本幾乎會往上再增加一倍。另外,遮擋剔除(Occlusion Culling)在鏡面反射中不會生效,因此即使鏡子正對著牆壁,它仍然會嘗試渲染牆壁後方的所有內容。"
Line 51: Line 51:
== 效能問題 ==
== 效能問題 ==


<div lang="en" dir="ltr" class="mw-content-ltr">
鏡子中所反射到的每個物件,都會必須再額外重新渲染一次,並獨立於用戶在世界中實際看到的畫面之外。若鏡子反射了整個世界,則世界的渲染效能成本幾乎會往上再增加一倍。另外,遮擋剔除(Occlusion Culling)在鏡面反射中不會生效,因此即使鏡子正對著牆壁,它仍然會嘗試渲染牆壁後方的所有內容。
Every object reflected in a mirror has to be rendered again, separately from what the user sees in the playable world. A mirror reflecting the whole world will double the performance cost of rendering the world. Occlusion culling does not work in mirror reflections, so a mirror facing a wall will still try to render everything behind the wall too.
</div>


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

Revision as of 21:58, 18 May 2026

查看 · 編輯這是與 VRChat 官方資訊有關的頁面!
它已經由 VRCWiki 團隊審核並批准。透過閱讀貢獻指南,以瞭解如何為此頁面貢獻。
一群人在鏡子前進行社交互動。

鏡子」(Mirrors),是可反射場景的面板,其允許 VRChat 用戶查看自己角色的鏡像畫面。鏡子經過設定後也能同時看見其他用戶或所在世界的環境樣貌。很多世界都設有供用戶在前方進行社交活動所用的鏡子。

鏡子類型

一張在動作選單中,顯示「個人鏡子」與「臉部鏡子」切換按鈕的示意圖。

個人鏡子

個人鏡子Personal Mirror)是一種可由用戶自行召喚並手持移動的鏡子,並且僅有召喚鏡子的用戶自己能看見。

這項功能可以從動作選單(Action Menu)主選單(Main Menu)中的設定(Settings)標籤頁啟用與設定。

臉部鏡子

在動作選單中,個人鏡子的設定欄示意圖。
在動作選單中,臉部鏡子的設定欄示意圖。

臉部鏡子Face Mirror)是一種會在用戶的 HUD 上特寫顯示角色臉部的鏡子。臉部鏡子的設計目的是協助用戶隨時掌握自己角色的表情變化,特別是在表情由手勢控制的情況下。與傳統鏡子不同,臉部鏡子不會呈現出景深效果。在 PC 模式下,臉部鏡子的解析度會依據顯示尺寸進行縮放,最高可達 2048 × 2048 像素。當透過 Spout 輸出功能進行串流時,則會持續以最高解析度進行渲染。

這項功能可以從動作選單主選單中的設定標籤頁啟用與設定。

校正鏡子

校正鏡子Calibration Mirror)是在用戶按下「FBT 校正」(Calibrate FBT)時會自動啟用的鏡子。其僅有正在進行全身追蹤(FBT)校正的用戶可見,並會在校正完成後自動關閉。校正鏡子只會顯示用戶的角色、控制器以及 FBT 追蹤器模型,而該模型可於主選單中的「設定」標籤頁設定。若在「追蹤與 IK」(Tracking and IK)中啟用了「顯示 FBT 校正範圍」(Display Calibration Visuals),那麼校正鏡子也會一併顯示,用以展示校正完成後各追蹤器所對應的追蹤點。

這項功能可以從動作選單主選單中的設定標籤頁設定啟用,但校正鏡子沒有任何可進一步調整的設定選項。

常見配置

鏡子預製組件(Mirror Prefab)允許創作者選擇哪些圖層會顯示於反射之中。因此,許多世界通常會設置多種不同的鏡子供使用者切換。一般常見會分為三種類型:高畫質鏡子、低畫質鏡子以及透明鏡子。有些世界甚至還會提供比這些更進階或更專業化的配置。

高畫質

高畫質鏡子會如同現實中的鏡子一般,從鏡子的視角完整反射周圍的世界與角色。

低畫質

低畫質鏡子通常會以較低解析度反射周圍的角色,並以 Skybox 取代,阻止反射其世界環境樣貌。

透明

透明鏡子通常會反射周圍的角色,同時像窗戶般顯示著鏡子後方的景象,並帶有些微從鏡子視角所呈現的世界反射效果。這需要特殊的設定方式,而社群上也提供了可直接使用的透明鏡子預製組件。

效能問題

鏡子中所反射到的每個物件,都會必須再額外重新渲染一次,並獨立於用戶在世界中實際看到的畫面之外。若鏡子反射了整個世界,則世界的渲染效能成本幾乎會往上再增加一倍。另外,遮擋剔除(Occlusion Culling)在鏡面反射中不會生效,因此即使鏡子正對著牆壁,它仍然會嘗試渲染牆壁後方的所有內容。

Creators can reduce the performance cost for mirrors in many ways, such as:

  • Disabling all mirrors by default. Only enable a mirror when the user pushes a button, or physically approaches them.
  • Disabling mirrors when a user leaves the area. This will remove the rendering cost of a mirror when a player isn't using it. Users will often not do this themselves, so use a script to do it for them.
  • Considering the placement of mirrors. A mirror facing away from the center of the world will have to render less than one facing inward.
  • Changing the Layers a mirror reflects. A mirror only renders objects on the defined layers. For example, if you have a large outdoor world with a house in the middle, you could set the outdoor environment objects to the environment layer, and then disable the environment layer on the mirrors inside the house. This will stop the mirrors from trying to render the environment that they can't see.

When interacting with a Mirror in a world, users will be able to enable or toggle different options to save on performance, such as:

  • Using only one mirror at a time.
  • Choosing a lower quality option for a mirror, if available.
  • Alternatively, substituting a world's mirror for your Personal Mirror.
  • Adjust your mirror resolution under Graphics Settings.

SDK

World prefab

The VRChat SDK contains a prefab for a ready-to-use mirror that can be dragged into a scene. This prefab is found at the following path:


Packages\com.vrchat.worlds\Samples\UdonExampleScene\Prefabs\VRCMirror.prefab

Technical details

Mirrors render during Camera.onPreCull. World creators using scripts that depend on mirror render timing should account for this.

Resources

VRChat Creator Documentation - VRC Mirror Reflection