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.
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.
Stats for your level are saved within the level folder, with further information saved in the
Displays current memory info. Useful for finding memory leaks.
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.
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.
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.
Total Value - Displays the total duration/allocations from start to finish.
Counts - The number of executions per frame.
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.
Subsystem Info - Shows the sum of self times and the corresponding percentage of the frame time per system.
Thread Info - Shows the time each thread spends in active (working) and waiting sections and the corresponding percentages of the frame time.
Minimal View - This only shows the header.
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.
This sets the lower limit for values shown in the latest peaks column. The lower the value is, the more the peaks are shown.
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.
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.
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:
Displays various important information for debugging, such as camera position and angle, build number and name of level loaded.
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.
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.
This option displays the profiling information for the currently rendered shaders.
This option dumps texture information to a text file in the root of the game folder.
P_draw_helpers is a command which allows access to various view mode for the physics of the objects in your level.
When p_draw_helpers is enabled, this CVar will show any tension on physicalized joints within a breakable object.
When set, shows any AI debugging information currently active in your level.
Only warnings/errors and Interest System debug draw
No AI debug draw
Basic AI debug draw
Draw all forbidden areas (including auto-generated ones)
Draw graph errors (problematic areas are highlighted with circles)
Draw the whole navigation graph (can be very slow)
Draw the navigation graph close to the player (within 15 m from the camera; quicker than 74)
Draw tagged nodes (during A*)
Calculate (if necessary) then draw 3D (volume) hidespots
Draw 3D (volume) hidespots
Draw steep slopes (determined by ai_steep_slope_up_value and ai_steep_slope_across_value)
Draw flight navigation within 200-m range of the player
Same as 79 but also showing triangulation edges' centers
Same as 179 but also showing water depth information
Visualize navigation links of node which encloses entity "test"
Setting ai_DebugDraw to one will enable the visualization of following variables:
Logs tactical point activity from the statsTarget and displays associated debug drawing.
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.
Gives information on the number of active AIs, full updates and TPS queries that happen every frame.
A longer list of important console variables and profiles.