🕶️
NRSDK(Old)
New DocumentationSDK DownloadAPI Reference
v2.2.1
v2.2.1
  • NRSDK Fundamentals
    • NRSDK Overview
    • XREAL Devices
      • XREAL Glasses
      • Controller
      • Compatibility
    • Getting Started with NRSDK
    • Sample Code
    • Tutorials
    • Release Note
      • NRSDK 2.2.1
      • NRSDK 2.2.0
      • NRSDK 2.1.1
      • NRSDK 2.1.0
      • NRSDK 1.10.2
      • NRSDK 1.9.5
      • NRSDK 1.9.3
      • NRSDK 1.9.1
      • NRSDK 1.8.0
      • NRSDK 1.7.0
      • NRSDK 1.6.0
  • Development
    • Input and Camera
      • NRInput
      • Interact with Unity UI (Tutorial)
      • Customize Controller UI
      • NRCameraRig
    • Hand Tracking
    • Image Tracking
      • XREAL Markers
    • Plane Detection (Tutorial)
      • Overview
      • Import the package
      • Detect planes in the real world
      • Perform a hit test against detected planes
      • Add a car
      • Add gems
      • Wrap up
    • Depth Mesh
      • Meshing Manager Overview
      • Use Meshes in the Editor
      • Tutorial: Mesh Collision
    • Spatial Anchor
      • Mapping Example Scene
      • Tutorial: Halloween Treasure Hunt
        • Handle the Situation of Failed Anchor Saving
      • Tutorial: Sharing Anchors
        • Setting Up Photon
        • Cloud Storage: Firebase (optional)
        • Cloud Storage: Aliyun OSS (optional)
        • Implementing Cloud Save and Load
        • Sharing Anchors with Photon
    • Tools
      • Single Pass Stereo Rendering
      • First Person View
      • Emulator
      • XR Streaming
      • Dual Screen Display
    • Miscellaneous
      • Access RGB Camera
      • NRSDK Coordinate Systems
      • MRTK2 Integration
      • MRTK3 Integration
      • Notification popup
      • Reset Camera
      • Render Metrics
      • Render MonoMode(Obsolete)
  • API Reference
  • Frequently Asked Questions
  • Design Guide
    • Design Guide Overview
    • Displaying
    • Interacting
    • Controlling
    • Navigating
Powered by GitBook
On this page
  • Setup
  • Log Examples

Was this helpful?

  1. Development
  2. Miscellaneous

Render Metrics

PreviousReset CameraNextRender MonoMode(Obsolete)

Was this helpful?

Setup

  1. Locate the NRCameraRig object in your Unity scene.

  2. Attach the NRMetrics script to NRCameraRig.

Log Examples

FrameMetrics: FPS=60, frNum=61, UpdPrd=39198222, prd=30078850, postPrd=28850795, sdkPrd=39802247, FPC=1.081967, EFC=0, early=0, drop=8 frNumA=753, UpdPrdA=41190049, prdA=32105576, postPrdA=30656161, sdkPrdA=41785068, FPCA=1.092961, EFCA=0.1288181, earlyA=70, dropA=76This log is recorded once every second. 

The log is divided into two parts. The first half,

FrameMetrics: FPS=60, frNum=61, UpdPrd=39198222, prd=30078850, postPrd=28850795, sdkPrd=39802247, FPC=1.081967, EFC=0, early=0, drop=8"represents the records within the past 1 second.

Meanwhile,

"frNumA=753, UpdPrdA=41190049, prdA=32105576, postPrdA=30656161, sdkPrdA=41785068, FPCA=1.092961, EFCA=0.1288181, earlyA=70, dropA=76

refers to the cumulative records from the start to the current time. Below are the meanings of each metric:

FPS: Actual frame rate

frNum/frNumA: Number of frames counted/Total accumulated number of frames counted.

Prediction time:Prediction time is the absolute time between when the app queries the pose before rendering, and the time the frame is displayed on the screen. This should almost always be a fixed number between 40 and 50 ms, depending on your engine and display refresh rate. i.e. GetPredictedDisplayTime - CurrentTime

Prd/PrdA (Prediction time during Unity's Prerender):Prediction time calculated during Unity's PreRender phase.

updPrd/updPrdA (Prediction time during Unity's Update):Prediction time calculated during Unity's Update phase

postPrd/postPrdA: Prediction time calculated during Unity's PostRender Phase

Timewarp:In Augmented Reality (AR) technology, the screen's display refresh rate is not directly tied to the frame rendering speed of the application. This is because there's an intermediate step known as "TimeWarp." The primary role of TimeWarp is to adjust the orientation of the last frame rendered by the application to match the user's head movement and then present it on the physical display. This ensures that even if the application hasn't rendered a new frame in real-time, the user still sees an image that aligns with their head movement.

drop/dropA: When TimeWarp expects to present the latest frame rendered by the application at a specific time, but that frame isn't ready yet, TimeWarp has to resort to the previous frame. Since this previous frame might be relatively outdated and no longer matches the current head movement of the user, this situation is referred to as "dropping a frame" or simply "drop."

early/earlyA: If the application renders frames at a very fast pace, it might complete the rendering of a frame before it's actually needed. Such frames are termed "early frames." Occasional early frames are acceptable, but if there's a consistent occurrence of a large number of early frames, it might indicate that the settings for the CPU or GPU are set higher than necessary, leading to potential resource wastage.

FPC: single frame display count

Number of times a single frame is displayed on the screen, i.e, Number of frames on the glasses/Number of frames rendered by Unity. This value is always greater than 1.