CRYENGINE has a huge list of different built-in debugging and profiling tools. Some of them are very specific to a certain subsystem and only useful for experts. Others however, are very useful for most engine users in their regular workflow.
This document lists the profiling console variables and commands that each programmer, artist and level designer working with CRYENGINE should know. A more complete list including less common profiling/debugging CVars can be found in Debugging and Profiling Tools.
One of the most useful commands here is "r_displayinfo 0/1/2/", and an explanation of the information displayed can be seen below.
As of CRYENGINE 5.6, turning "r_displayinfo" on/off can be achieved in three different ways:
(via Menu/Button interaction) (via Console)
(via Editor.cfg)
Shows basic performance stats like the current frame rate, the number of visible triangles, visible light sources and the number of drawcalls.
Symbol/Text | Description |
---|---|
CamPos | Camera position |
Angl | Camera orientation |
ZN | Near-Z distance |
ZF | Far-Z distance |
FC | Fog culling distance |
VS | Viewport scaling factor |
Zoom | Camera zoom factor |
Speed | Average camera speed |
Possible values | |
---|---|
Active renderer |
|
Build configuration |
|
Platform |
|
sys_spec |
|
Flags |
|
Levelname | |
Engine version |
Symbol/Text | Description |
---|---|
DP | Number of drawcalls (previous frame in parentheses) |
ShadowGen | Number of shadow generation drawcalls (previous frame in parentheses) |
Total | Total number of drawcalls (DP + ShadowGen) |
Instanced | Number of instanced drawcalls |
Symbol/Text | Description |
---|---|
Polys | Number of polygons (average in parentheses) |
Shadow | Number of polygons used for shadow generation (average in parentheses) |
Symbol/Text | Description |
---|---|
ShaderCache | Number of shader cache misses |
Async Reqs | Number of async shader compilation requests |
Compile | Shader compilation status (on/off) |
Symbol/Text | Description |
---|---|
ACT | Average completion time of Streaming IO requests |
Job | Number of open Streaming IO requests |
Symbol/Text | Description |
---|---|
Vid | Video memory used |
Mem | Memory used |
Peak | Maximum amount of memory used |
DLights | Number of light sources |
An enhanced version of r_DisplayInfo 1, giving more detailed information.
Symbol/Text | Description |
---|---|
CamPos | Camera position |
Angl | Camera orientation |
ZN | Near-Z distance |
ZF | Far-Z distance |
FC | Fog culling distance |
VS | Viewport scaling factor |
Zoom | Camera zoom factor |
Speed | Average camera speed |
Possible values | |
---|---|
Active renderer |
|
Build configuration |
|
Platform |
|
sys_spec |
|
Flags |
|
Levelname | |
Engine version |
Symbol/Text | Description |
---|---|
DP | Number of drawcalls (previous frame in parentheses) |
ShadowGen | Number of shadow generation drawcalls (previous frame in parentheses) |
Total | Total number of drawcalls (DP + ShadowGen) |
Instanced | Number of instanced drawcalls |
Symbol/Text | Description |
---|---|
Polys | Number of polygons (average in parentheses) |
Shadow | Number of polygons used for shadow generation (average in parentheses) |
Symbol/Text | Description |
---|---|
ShaderCache | Number of shader cache misses |
Async Reqs | Number of async shader compilation requests |
Compile | Shader compilation status (on/off) |
Symbol/Text | Description |
---|---|
Loaded | Number of finished CGF streaming requests |
InProg | Number of CGF streaming requests that are in progress |
All | Total number of CGF streaming requests |
Act | Number of active CGF streaming requests |
MemUsed | Amount of memory allocated for CGF streaming |
MemReq | Amount of memory required for CGF streaming |
Pool | Size of the CGF streaming pool |
Symbol/Text | Description |
---|---|
TexRend | Number of textures accessed during the last frame |
NumTex | Number of streamed textures |
Req | Amount of memory allocated for texture streaming |
Mem(strm/stat/tot) | Amount of memory required for streamed/static/all textures (percentage of streamed and static in parentheses) |
PoolSize | Size of the texture streaming pool |
PoolFrag | Fragmentation level of the texture streaming pool |
Symbol/Text | Description |
---|---|
ACT | Average completion time of Streaming IO requests |
Job | Number of open Streaming IO requests |
Total | Total number of streaming requests |
Symbol/Text | Description |
---|---|
BW | Hard drive bandwidth [Current|Session] |
Eff | Effective hard drive bandwidth [Actual|Average] |
Seek | Average seek offset |
Active | Average active time |
Possible values | |
---|---|
Load state |
|
Number of checkpoint loads |
Symbol/Text | Description |
---|---|
Vid | Video memory used |
Mem | Memory used |
Peak | Maximum amount of memory used |
DLights | Number of light sources |
Simplified version displaying only FPS (Frames Per Second) and Frame Time in milliseconds.
Displays the budget monitor which gives a visual indication on how much of the fixed budget for memory, drawcalls, triangle count, etc. is consumed by the current camera view.
Creates and XML report with statistics for the currently loaded level. The report includes all assets that are loaded, their size, dependencies and the number of instances in the scene. The report can be viewed with Excel.
Displays individual memory statistics for each module of CRYENGINE.
Shows memory statistics for all modules, including sub-module specific information. The value 2000 specifies that the data is updated every two seconds.
Shows a list of the most expensive function that are executed. This tool is mainly for programmers but it can also give some clues to artists.
If for example a function with the name "vegetation" or "particle" is at the top of the list, chances are high that the vegetation or particle usage is too heavy.
You can pause the information flow to highlight a particular function in the list by pressing Scroll Lock.
(Jump in game if you are in the editor) to allow you to use the up / down arrow keys to cycle through the list. Press Scroll Lock again to un-pause the debug stream.
Displays information on the worker thread utilization.
Shows the time in milliseconds and percentage of the overall frame time that each subsystem consumes.
This is the most artist / designer friendly profile mode.
This only shows the header.
Shows timings for functions in all threads (only those in the main thread are shown by default). Functions not in the main thread are postfixed with " @threadname".
Sets the averaging info for profile stats. Set to a longer interval to get smoother results, or perform long-term timing.
Limits the function profiling information to a specified subsystem/module. Valid subsystem names are Renderer, 3DEngine, Particle, Animation, AI, Entity, Physics, Sound, System, Game, Editor, Script and Network.
This is a new profiling tool (with CRYENGINE 5.6) that allows users to track the number of entity events being sent each frame, as well as the cost in milliseconds.
This is exposed by allowing designers to set es_profileComponentUpdates=3, enabling on-screen profiling of all entity events. For example:
Profiling data is now tracked in the entity system, with a generic implementation for CEntity::SendEvent. Performance critical events that are handled by the entity system itself instead of individual entity instances additionally add to the same structure. This is then drawn to screen once per frame, with the most expensive entity for each event being highlighted.
A new profiling tool for Artists & Designers to have an overview of the scene budget. (Replaces the previous tools r_ArtProfile, r_stats 15, 16 & r_ShowMT)
The Overview section details the time spent on the Main, Render, GPU & also the time the CPU is waiting for the GPU.
The GPU time section is broken down into the major categories, Ocean Reflections, Scene, Shadows, Lighting & VFX. The sections gives you the time spent in ms as well as a percentage of the total scene cost.
You can specify a target FPS (r_profilerTargetFPS 30), to align the tool to measure against. Default is 30.
This tool is the same as the r_stats 17. To unify the profiling tools into one place we have moved it into the r_Profiler for consistency (& removed the r_stats variation). This tool is more specifically targeted towards programmers, where we give the full scene breakdown costs.
Visualizes the 4 render targets. Top Left - ZTarget, Top Right - SceneNormalMap, Bottom left - SceneDiffuseAcc, Bottom Right - SceneSpecularAcc.
Visualizes the light overdraw. Debug deferred lighting fillrate. Brighter colors mean that the lighting calculations are more expensive for the specific area.
Enables the debug gun which shows various rendering related information for the scene object that is currently in focus.
Lists all post-processing effects that are currently active.
Visualizes the overdraw and indicates how expensive the rendering on the screen is.
Pixel shader
Pass count
Vertex shader
Enable this to investigate the screen coverage of the particles.
In the picture below, the same pfx is displayed, but due to the distance from the camera, the screen coverage is a lot less.
So the distant pfx is shaded blue in this debug view.
Enable version 2 to display particle overdraw.
Displays particle counts at the top of the screen (only if r_DisplayInfo = 1).
If you are interested in particle performance at all, add this command to your system.cfg or user.cfg file!
You can additionally add in extra debug information at run-time but adding in specific flags (see below). To set these extra flags use "+" or to remove flags use the "-".
Draws bounding boxes and labels for all particle emitters.
Disable clipping against water and vis area bounds
d = force dynamic bounds and update for all emitters
Displays memory usage
Display reiteration, rejection, and collision statistics
Freeze the particle system
Prints count and memory usage for loaded effects and active emitters to the console.
Disables particle generation, and most emitter processing. Some emitter updating overhead is still active, however.
Displays statistics of the particle system in the top left of the viewport. (must have e_ParticlesDebug 1 enabled to get the full statistics)
This debug view list information on...
At the bottom, it also list the top 5 offenders in the Vertex/Index pool. To easily help track down problematic pfx.
Details information in a table format about the current active particles in the scene.
Gives a basic overview of all AI agents that are on the map.
Displays the nav mesh for the MNM system.
Blue is classed as navigable area where it is valid for the AI to move. Red areas are cut off from the main mesh to show that it is not reachable.
Other variations of the Cvar - 0 - off, 1 - triangles and contour, 2 - triangles, mesh and contours, 3 - triangles, mesh contours and external links.
Displays information on the number of active AI agents, full AI updates per frame and the number of TPS queries that are processed each frame.
This is the main CVar the will turn on / off the rendering of the vegetation. 1 = on, 0 = off.
This view provides statistics about the Global memory consumption of the vegetation objects placed in the level. Attached below the r_displayinfo
This view breaks down the vegetation into the “cells” that form the merged meshes.
They are colour coded over distance, and what you want to be seeing is the red boxes should only be around the player, (the 1 cell you are standing in, and then the surround 8) Beyond this they should all be green.
Floating above each cell contains the information about the current LOD step & current memory consumption about the cell ( will update as you move closer / further away).