開発
開発
プラットフォームを選択

テストとパフォーマンス分析

更新日時: 2024/09/04
このガイドでは、Unreal EngineでMeta Questの開発をするための基本的なテストとパフォーマンス分析について説明します。
VRアプリのデバッグでは、アプリの構造と実行の過程を把握し、実際のパフォーマンスを評価するためのデータを収集し、予測と比較して評価することで、問題を入念に特定し排除します。
分析やデバッグをする際には、どんな変更を加えると望ましい結果になるかを把握できるように、管理された方法で実行することが重要です。まずはボトルネックに注目しましょう。比較するのはアプリのうち類似した面だけにし、一度に1つの要素だけを変更します(解像度、ハードウェア、品質、設定など)。
システムでは予想外のことがよく起きるので、常にプロファイリングを実施してください。最初はシンプルなコードにし、徐々に最適化していくことをおすすめします。最適化を急ぎ過ぎないようにしてください。
パフォーマンス最適化ツールに関するその他のガイダンスについては、モバイル最適化ツールをご覧ください。

Performance Targets

FPS on Meta Quest

Refer to Quest Performance VRC 1 for detailed FPS requirements.
  • Media applications can aim for 60 FPS.
  • Interactive applications must achieve a minimum of 72 FPS.

Draw Calls on Meta Quest

Various factors influence the number of draw calls you can execute per frame on the Meta Quest devices. These include:
  • Pipeline state changes: This involves changing shaders, textures, meshes, and such between draws.
    • Share meshes and instance meshes wherever possible.
    • Use global texture arrays if you can.
    • Use a minimal set of unified shaders that don’t generate variants.
  • Main and render thread capacity: Consider the available resources on the render thread and on the main thread which is preparing and supplying data to the render thread.
    • Processes such as animation, skinning, and networking, can delay the start of the render thread and reduce the number of draw calls that can be executed within the target FPS.
  • Graphics API and usage:
    • Vulkan vs. OpenGL ES.
    • Multi-threaded Rendering--low latency vs. frame-behind.
    • Usage of bindless textures and indirect draws.
For more information, read Draw Call Cost Analysis for Quest.
The following table provides example draw call ranges. Your results may vary based on the factors mentioned above.
PlatformDraw CallsDescription
Quest 1
50-150
Busy Simulation
Quest 1
150-250
Medium Simulation
Quest 1
200-400
Light Simulation
Quest 2, Quest Pro
80-200
Busy Simulation
Quest 2, Quest Pro
200-300
Medium Simulation
Quest 2, Quest Pro
400-600
Light Simulation
Quest 3, Quest 3S
200-300
Busy Simulation
Quest 3, Quest 3S
400-600
Medium Simulation
Quest 3, Quest 3S
700-1000
Light Simulation
  • Busy Simulation: Applications with extensive simulations, VoIP, networking, animation, and skinning from other players or many NPCs. For example, multi-player shooters and populated social apps.
  • Medium Simulation: Medium-sized worlds with fewer players or NPCs, such as single-player shooters and medium-populated social games. Most apps fall into this category.
  • Light Simulation: Applications with minimal pipeline state changes such as escape room games, puzzle games, and co-op games.

Triangle Counts on Meta Quest

Triangle budgets are similar to draw call budgets, as they fluctuate based on frame-to-frame factors. in that it’s hard to determine how many you can get away with. Triangle count budgets are even more fluid and depend on factors that can change from frame to frame (see How Tile-based Rendering Works for more information).
  • Triangles spanning multiple tiles: These cost more.
    • A triangle’s vertex shader runs three times (once per vertex) per tile it covers.
    • Larger triangles statistically cover more tiles, though predicting tile boundaries is challenging.
  • Memory access patterns of your vertex attributes: These affect vertex shader speeds.
    • Dedicate a vertex attribute array for position data, skinning weights, and anything else used to calculate output position. Place anything else into a separate interleaved vertex attribute array. This setup improves the speed of the binning phase that focuses on attributes affecting output position.
  • Vertex attributes: Monitor the number and precision of vertex attributes submitted to your vertex shader.
    • Remove unused channels such as NORMAL, TANGENT, or TEXCOORD*, or combined channels if possible, to boost performance.
    • Only the POSITION channel typically needs full-precision. Experiment with compressing other channels to half-precision and see if you can still maintain visual quality.
Below are some internally-recommended ranges, but results may vary depending on the factors listed above.
PlatformTriangle Count
Quest 1
350k-500k
Quest 2, Quest Pro
750k-1m
Quest 3, Quest 3S
1.3m-1.8m

General Performance on Meta Quest

See the Performance Requirements in Quest Virtual Reality Check (VRC) Guidelines for any additional performance concerns.

Unreal Profiler Tool

Unrealエディターには、アプリのパフォーマンス指標を示すProfiler Toolが組み込まれています。
リアルタイムVR固有指標を提供するため、Profiler Toolに[System Metrics (システム指標)]セクションが追加されました。
次の指標を使えます。
  • App GPU Time (ms) (アプリGPUタイム(ms))
  • Compositor Dropped Frames (コンポジタードロップフレーム数)
  • Compositor GPU Time (ms) (コンポジターGPUタイム(ms))
  • System CPU Util Avg%(システムCPU使用率平均%)
  • System CPU Util Worst%(システムCPU使用率ワースト%)
  • System CPU Util Util%(システムCPU使用率使用率%)

CPUまたはGPUバウンドの分析

アプリのパフォーマンスを最適化する第一歩は、ボトルネックがCPUとGPUのどちらにあるのかを見極めることです。AndroidアプリではGPUのタイミングを取得するのが難しいため、この作業が難しくなることがあります。Profiler Toolでアプリを実行する場合、アプリとVRコンポジターの両方のGPUコストを確認することができます。合計GPU時間がフレーム時間に近いか等しい場合、アプリはGPUバウンドである可能性が高いと言えます。そうでない場合、CPUがボトルネックになっています。

マルチスレッドの分析

アプリは複数のコアを同時に使用することができます。Profiler Toolは、最も占有率の高いCPUコアのユーティリティ率と、すべてのCPUコアの平均のユーティリティ率を収集します。「System CPU Util Worst%(システムCPU使用率ワースト%)」がとても高いが、「System CPU Util Avg%(システムCPU使用率平均%)」が比較的低い場合、スレッド間の負荷をリバランスすることでアプリの最適化を図れる可能性があります。

OVR Metricsツール

OVR Metricsツールは、アプリのフレームレート、熱、GPUとCPUのスロットリング値、1秒あたりのティアとステイルフレームの数を報告します。これはダウンロードページからダウンロードできます。
OVRメトリックツールには2つの動作モードがあります。レポートモードでは、完了後にVRセッションに関するパフォーマンスレポートが表示されます。また、レポートデータをCSVファイルやPNGグラフとしてエクスポートすることもできます。
Report Mode in the OVR Metrics Tool
パフォーマンスHUDモードでは、OVRメトリックツールはパフォーマンスグラフを、実行中のHorizon OSアプリ上にVRオーバーレイとしてレンダリングします。
Performance HUD Mode in the OVR Metrics Tool
詳細については、OVRメトリックツールをご覧ください。

デバッグ

Unrealエンジンでは、Visual Studio用のAndroid Game Development Extension (AGDE)プラグインを使ったデバッグがサポートされています。このプラグインを利用すれば、環境をAndroid Studioに切り替えることなく、Visual Studioでコードのプロファイリングとデバッグを実施することが可能です。Windowsプラットフォームで開発している場合、UnrealエンジンのAndroidプロジェクト用デバッグ環境としてADGEをおすすめします。
AGDEの使い方について詳しくは、Unrealのドキュメントウェブサイトをご覧ください。
Metaでは、もう1つのデバッグツールndk-gdbを用意しています。これは、UnrealエンジンのMetaブランチにあります。このツールは、GNU GDBのラッパーとなる小さなシェルスクリプトであり、Android NDKに含まれています。
コマンドラインからndk-gdbを使用すると、コマンドラインインターフェイスによるブレークポイントの追加、コードのステップ実行、変数の調査などが可能になり、デバッグのワークフローに便利な機能が追加されます。
ndk-gdbをデバッグに使うには、次のようにします。
  1. adb forward tcp:$port tcp:$port により、ターゲットモバイルポートをPCポートにリンクするためのリモートポート転送を有効にします。
  2. デバイスセットアップの説明に従って、デバイスを開発者モードに設定します。
  3. デバッグ対象のアプリを起動します。
  4. Unrealコンソールコマンドgdbserver $portにより($portはポート番号)、モバイルデバッグ上でgdbserverを起動します。アプリがフリーズするはずです。これでデバッグの準備ができました。
  5. コンピューター上でコマンドラインからコマンドgdb.exeを実行し、ndk-gdbクライアントを起動します。起動時に、GDBコマンドラインでtarget remote :$portと入力することにより、モバイルデバイスをつなぎます。
GDBを使ったデバッグの方法については、GNU GDBのドキュメントをご覧ください。

その他のサードパーティツール

その他のリソース

Meta Questの開発について詳しくは、以下をご覧ください。
ナビゲーションロゴ
日本語
© 2026 Meta