Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

CRYENGINE has various built-in debugging and profiling tools that help to locate and fix problems as well as performance issues. This article outlines some of the most widely used tools.

Basic Logging Functionality

Include Page
CRYAUTOGEN:LOGINCLUDETIME
CRYAUTOGEN:LOGINCLUDETIME

Basic Asset Information

Error Report Window

The Error Report window displays error messages created by missing objects and broken assets. The console can also be accessed under Tools → Check Level for Errors.

Include Page
CRYAUTOGEN:SAVELEVELSTATS
CRYAUTOGEN:SAVELEVELSTATS

Stats for your level are saved within the level folder, with further information saved in the GameSDK/TestResults folder.

System

MemInfo

Displays current memory info. Useful for finding memory leaks.

Include Page
CRYAUTOGEN:MEMINFO
CRYAUTOGEN:MEMINFO

MemStats

Displays detailed information of each function currently being called, sorted by size. This view contains a lot of detailed information, although on some occasions the data may be slightly distorted.

Include Page
CRYAUTOGEN:MEMSTATS
CRYAUTOGEN:MEMSTATS

Profile

The profile console command contains various ways to access timing and memory consumption information within CRYENGINE. To access a list of profiling views, please use the profile command line.

CommandDescriptionImage
Profile 1

Self Value - Displays the number of executions per frame. Total value minus the totals of any subsections, e.g., if Function A takes 5ms in total to execute, but calls Function B(), which takes 2ms to execute, then the self time of Function A() would be 3ms.

Tip
You can use the Scroll Lock key to pause or continue the profiling recording and the Up and Down Arrow keys to navigate through the rows.


Profile 2

Total Value - Displays the total duration/allocations from start to finish.

Tip
You can use the Scroll Lock key to pause or continue the profiling recording and the Up and Down Arrow keys to navigate through the rows.


Profile 3

Counts - The number of executions per frame.

Tip
You can use the Scroll Lock key to pause or continue the profiling recording and the Up and Down Arrow keys to navigate through the rows.


Profile 4

 Peaks - Shows sections for which the self value in the last frame exceeded the average value by the margin specified in the CVar profile_peak_tolerance.


Profile 5

Subsystem Info - Shows the sum of self times and the corresponding percentage of the frame time per system.

Info
More than 100% is possible, as times are summed over all threads.


Profile 6

Thread Info - Shows the time each thread spends in active (working) and waiting sections and the corresponding percentages of the frame time.


Profile 7

Minimal View - This only shows the header.

Profile_smooth

This adjusts the "smoothing" of the numbers shown in the profile displays. Increasing this value will result in less erratic movement in the values shown.

Include Page
CRYAUTOGEN:PROFILESMOOTH
CRYAUTOGEN:PROFILESMOOTH

Profile_peak

This sets the lower limit for values shown in the latest peaks column. The lower the value is, the more the peaks are shown.

Include Page
CRYAUTOGEN:PROFILEPEAK
CRYAUTOGEN:PROFILEPEAK

sys_enable_budgetmonitoring

Displays memory budgeting information for your level, for video, frametime, sound channels, sound memory and draw calls. Individual budgets can be set up externally, using console commands beginning with sys_budget_ (type it in to the console and press tab for a list). When a bar reaches the far right, the associated text will flash as a warning that you are over budget. As the text shown states, please test this in pure game mode, as the editor version of the game can give false results.

Include Page
CRYAUTOGEN:SYSENABLEBUDGETMONITORING
CRYAUTOGEN:SYSENABLEBUDGETMONITORING

profile_allthreads

Include Page
CRYAUTOGEN:PROFILEALLTHREADS
CRYAUTOGEN:PROFILEALLTHREADS

3D Engine

e_DebugLights

Debug draw mode visualizing the number of dynamic lights affecting a piece of static geometry. This is important as the more lights affect an object, the more often it needs to be rendered, e.g. to generate shadow maps, perform lighting (when using non-deferred lights), etc. Using this information, you would ideally place your lights in a way to get the biggest bang for the buck. That means, use only as few lights as possible to realize a certain lighting condition or mood. This debug draw mode can help to detect surfaces which are affected by more lights. It also enables designers to easily check why some of the lights may flicker on certain surfaces.

It uses different colors for objects affected by different numbers of lights.

  • black: 0
  • blue: 1
  • green: 2
  • red: 3 or more
  • blinking yellow: more than the maximum enabled

Include Page
CRYAUTOGEN:EDEBUGLIGHTS
CRYAUTOGEN:EDEBUGLIGHTS

e_Lods

e_Lods controls the use of LOD, or Level Of Detail objects in your level. If you suspect geometry might be causing issues, simply turn off the use of LOD objects (the low detail versions of objects, which have less polygons) by typing in e_lods 0.

All objects will now use their highest detail LOD version.

In the picture below with e_lods turned off, the high detail object shows. With e_lods turned on, the appropriately calculated lower detail LOD shows:

Include Page
CRYAUTOGEN:ELODS
CRYAUTOGEN:ELODS

e_LodMin

Include Page
CRYAUTOGEN:ELODMIN
CRYAUTOGEN:ELODMIN

e_LodMax

Include Page
CRYAUTOGEN:ELODMAX
CRYAUTOGEN:ELODMAX

sys_ProfileLevelLoading

Include Page
CRYAUTOGEN:SYSPROFILELEVELLOADING
CRYAUTOGEN:SYSPROFILELEVELLOADING

Renderer

r_DisplayInfo

Displays various important information for debugging, such as camera position and angle, build number and name of level loaded.

Include Page
CRYAUTOGEN:RDISPLAYINFO
CRYAUTOGEN:RDISPLAYINFO

r_MeasureOverdraw

This option activates a special rendering mode that visualizes the rendering cost per pixel, by color. As you may notice, this command shows the accumulated instruction count per pixel, not just the overdraw.

Include Page
CRYAUTOGEN:RMEASUREOVERDRAW
CRYAUTOGEN:RMEASUREOVERDRAW
Gallery
includer_measureoverdraw0.jpg,r_measureoverdraw1.jpg

r_DebugLights

Include Page
CRYAUTOGEN:RDEBUGLIGHTS
CRYAUTOGEN:RDEBUGLIGHTS

r_ShowMT

Include Page
CRYAUTOGEN:RSHOWMT
CRYAUTOGEN:RSHOWMT

r_DebugRefraction

Include Page
CRYAUTOGEN:RDEBUGREFRACTION
CRYAUTOGEN:RDEBUGREFRACTION

r_PostProcessEffects

This CVar makes it possible to completely disable post-processing effects to find out if they cause a specific problem. It is also possible to display the currently active post-processing effects.

Include Page
CRYAUTOGEN:RPOSTPROCESSEFFECTS
CRYAUTOGEN:RPOSTPROCESSEFFECTS

r_TexelsPerMeter

Include Page
CRYAUTOGEN:RTEXELSPERMETER
CRYAUTOGEN:RTEXELSPERMETER

r_ProfileShaders

This option displays the profiling information for the currently rendered shaders.

Include Page
CRYAUTOGEN:RPROFILESHADERS
CRYAUTOGEN:RPROFILESHADERS

r_TexLog

This option dumps texture information to a text file in the root of the game folder.

Include Page
CRYAUTOGEN:RTEXLOG
CRYAUTOGEN:RTEXLOG

Physics

p_draw_helpers

P_draw_helpers is a command which allows access to various view mode for the physics of the objects in your level.

Include Page
CRYAUTOGEN:PDRAWHELPERS
CRYAUTOGEN:PDRAWHELPERS

p_debug_joints

When p_draw_helpers is enabled, this CVar will show any tension on physicalized joints within a breakable object.

Include Page
CRYAUTOGEN:PDEBUGJOINTS
CRYAUTOGEN:PDEBUGJOINTS

p_profile_entities

Include Page
CRYAUTOGEN:PPROFILEENTITIES
CRYAUTOGEN:PPROFILEENTITIES

p_profile_functions

Include Page
CRYAUTOGEN:PPROFILEFUNCTIONS
CRYAUTOGEN:PPROFILEFUNCTIONS

AI

ai_DebugDraw

When set, shows any AI debugging information currently active in your level.

Include Page
CRYAUTOGEN:AIDEBUGDRAW
CRYAUTOGEN:AIDEBUGDRAW

Supported CVar Values

ai_DebugDraw

Description

-1

Only warnings/errors and Interest System debug draw

0

No AI debug draw

1

Basic AI debug draw

71

Draw all forbidden areas (including auto-generated ones)

72

Draw graph errors (problematic areas are highlighted with circles)

74

Draw the whole navigation graph (can be very slow)

79

Draw the navigation graph close to the player (within 15 m from the camera; quicker than 74)

80

Draw tagged nodes (during A*)

81

Calculate (if necessary) then draw 3D (volume) hidespots

82

Draw 3D (volume) hidespots

85

Draw steep slopes (determined by ai_steep_slope_up_value and ai_steep_slope_across_value)

90

Draw flight navigation within 200-m range of the player

179

Same as 79 but also showing triangulation edges' centers

279

Same as 179 but also showing water depth information

1017

Visualize navigation links of node which encloses entity "test"

Setting ai_DebugDraw to one will enable the visualization of following variables:

ai_DrawStats

Include Page
CRYAUTOGEN:AIDRAWSTATS
CRYAUTOGEN:AIDRAWSTATS

ai_StatsTarget

Include Page
CRYAUTOGEN:AISTATSTARGET
CRYAUTOGEN:AISTATSTARGET

ai_DebugTacticalPoints

Logs tactical point activity from the statsTarget and displays associated debug drawing.

Include Page
CRYAUTOGEN:AIDEBUGTACTICALPOINTS
CRYAUTOGEN:AIDEBUGTACTICALPOINTS

ai_AllTime

Include Page
CRYAUTOGEN:AIALLTIME
CRYAUTOGEN:AIALLTIME

ai_DrawBadAnchors

Include Page
CRYAUTOGEN:AIDRAWBADANCHORS
CRYAUTOGEN:AIDRAWBADANCHORS

ai_DrawFormations

Include Page
CRYAUTOGEN:AIDRAWFORMATIONS
CRYAUTOGEN:AIDRAWFORMATIONS

ai_DrawModifiers

Include Page
CRYAUTOGEN:AIDRAWMODIFIERS
CRYAUTOGEN:AIDRAWMODIFIERS

ai_DrawNode

Include Page
CRYAUTOGEN:AIDRAWNODE
CRYAUTOGEN:AIDRAWNODE

ai_DrawNodeLinkType

Include Page
CRYAUTOGEN:AIDRAWNODELINKTYPE
CRYAUTOGEN:AIDRAWNODELINKTYPE

ai_DrawNodeLinkCutoff

Include Page
CRYAUTOGEN:AIDRAWNODELINKCUTOFF
CRYAUTOGEN:AIDRAWNODELINKCUTOFF

ai_DrawOffset

Include Page
CRYAUTOGEN:AIDRAWOFFSET
CRYAUTOGEN:AIDRAWOFFSET

ai_DrawPath

Include Page
CRYAUTOGEN:AIDRAWPATH
CRYAUTOGEN:AIDRAWPATH

ai_DrawRefPoints

Include Page
CRYAUTOGEN:AIDRAWREFPOINTS
CRYAUTOGEN:AIDRAWREFPOINTS

ai_DrawTargets

Include Page
CRYAUTOGEN:AIDRAWTARGETS
CRYAUTOGEN:AIDRAWTARGETS

ai_DrawType

Include Page
CRYAUTOGEN:AIDRAWTYPE
CRYAUTOGEN:AIDRAWTYPE

ai_Locate

Include Page
CRYAUTOGEN:AILOCATE
CRYAUTOGEN:AILOCATE

ai_ProfileGoals

Include Page
CRYAUTOGEN:AIPROFILEGOALS
CRYAUTOGEN:AIPROFILEGOALS

ai_SteepSlopeAcrossValue

Include Page
CRYAUTOGEN:AISTEEPSLOPEACROSSVALUE
CRYAUTOGEN:AISTEEPSLOPEACROSSVALUE

ai_SteepSlopeUpValue

Include Page
CRYAUTOGEN:AISTEEPSLOPEUPVALUE
CRYAUTOGEN:AISTEEPSLOPEUPVALUE

ai_DrawRadar

Draws a radar overlay at the center of the view. 'ai_DrawRadar 0' disabled the radar and any other number is interpreted as the size of the radar in pixels. That is 'ai_drawradar 500' draws 500px high radar in the middle of the screen. The circles in the radar are drawn in 5m intervals.

Distance of the radar can be set using ai_DrawRadarDist console variable. The distance is specified in meters. A good combination to start with is 500px high radar with view distance of 50m. The radar displays each unit, including the name of the unit, the alertness state and the current path and readability.

Include Page
CRYAUTOGEN:AIDRAWRADAR
CRYAUTOGEN:AIDRAWRADAR

ai_DrawRadarDist

Include Page
CRYAUTOGEN:AIDRAWRADARDIST
CRYAUTOGEN:AIDRAWRADARDIST

ai_DrawTrajectory

Include Page
CRYAUTOGEN:AIDRAWTRAJECTORY
CRYAUTOGEN:AIDRAWTRAJECTORY

ai_StatsDisplayMode

Gives information on the number of active AIs, full updates and TPS queries that happen every frame.

Include Page
CRYAUTOGEN:AISTATSDISPLAYMODE
CRYAUTOGEN:AISTATSDISPLAYMODE

Entity System

es_ProfileEntities

Include Page
CRYAUTOGEN:ESPROFILEENTITIES
CRYAUTOGEN:ESPROFILEENTITIES

es_DebugTimers

Include Page
CRYAUTOGEN:ESDEBUGTIMERS
CRYAUTOGEN:ESDEBUGTIMERS



Excerpt
hiddentrue
A longer list of important console variables and profiles.


On This Page

Table of Contents
maxLevel3
minLevel2
excludeOverview