Diagnostics Toolbar
Last updated
Last updated
The diagnostics toolbar is a utility for displaying information about the performance of Sansar. It is useful for measuring graphical performance, which can help you make informed decisions about how to improve performance in your scenes.
To enable the diagnostics toolbar while editing or visiting a scene, select More Options > Diagnostics from the App Launcher on the left side of the screen. While editing a scene, you may also choose Tools > Diagnostics from the toolbar at the top of the screen
A world owner can disable to ability for visitors to use their diagnostics toolbar in their scene for various reasons.
To disable the use of diagnostics in your scene, during edit mode go to the top left menu and select Tools > Scene Settings.
Then in the Scene Settings panel Scroll Down to Visitor Settings > Toggle Diagnostics to off
The diagnostics toolbar displays the following statistics at all times:
Rate - The current frame rate, measured in frames per second. Higher values are better, it is possible to set a cap for this in the settings panel.
Time - The amount of time elapsed in milliseconds for the last sampled frame. Lower values are better.
Draws - The number of draws required to render the current view. Larger numbers of draws have a larger negative impact on performance. This number changes as the number of visible objects enter and exit the viewable area. Number of objects, Overdraw, lighting, materials, objects shader and avatars are some of the things that are counted towards this.
Prims - The number of triangles (also known as primitives) currently being drawn. When visiting a scene, occlusion culling reduces the number of triangles, but occlusion culling is not performed while editing a scene so this number remains fixed. The larger the number of triangles, the bigger the negative impact on performance.
Geom - Your scenes total geometry size in MB, lower amounts help with performance and loading times.
Tex - The total texture size of your scene, this heavily impacts loading times and VRAM usage, using smaller textures can help keep this down.
NOTES:
Some optimizations only occur fully during runtime and requires you to visit for a true performance overview.
As a rough guide for a performant world try keeping your Draws below 6k while in runtime, your Prims below 8 million and your Tex below 8GB these numbers fluctuate when optimizations occur during runtime so try to visit your scene how you intend your guests to see it.
You can temporarily adjust the lighting in your scene to provide additional contrast and visibility while using the metadata modes by clicking these two icons and adjusting the sliders.
This setting adjusts how much of the normal scene lighting is visible. You can turn this down to help the glowing metadata highlights stand out, making it easier to identify "hot spots" of triangle density or overdraw. Turn it back up again to help navigate the scene and identify the underlying models.
Adjusts the brightness of the glow from the rendering metadata modes. At low sensitivity, only the most dense or complex areas are highlighted. At high sensitivity, dense and complex areas glow very brightly, but even lower complexity
Some Metadata modes have some extra settings, if they do a cog symbol will appear and can be clicked for other options.
The diagnostics toolbar can toggle several viewing modes to help you identify performance issues in your scene. You can use these while editing and during runtime. Select from the following modes in both VR and Desktop.
To use Diagnostics view in VR you can cycle through modes by selecting the 'Diagnostics' button located on your main wrist menu.
No rendering metadata is displayed. This is the default view.
Overlapping lights especially when casting shadows, is possibly the biggest hit to the performance of a scene.
This mode provides information regarding the number of lights illuminating the same area in the scene (in other words, "overlapping lights"). This information is only displayed for point lights and spot lights. Areas with a low lighting complexity appear as dark purple. Objects with a high lighting complexity appear a bright yellow/orange. Areas of high lighting complexity have a negative impact on performance since processing time is required to calculate the effect of each light illuminating the area.
Here you can see 3 point lights that look like they are not touching.
But in diagnostics we can see they are actually overlapping.
Additionally when a light hits a object it is being rendered twice, making your pc need to render it again, every light that touches a object makes your pc render it another time, so in this image, cube 1 is being rendered twice, cube 2 three times and cube 3 four times! this can soon add up especially wih complex objects. reducing the overlap and the amount of lights hitting a object can drastically improve performance.
You can use the Lighting complexity modes to filter which lights are displayed by the Lighting complexity metadata mode. Lighting complexity mode can filter the following kinds of lights:
All lights - Includes all spot lights and point lights.
Shadow casters only - Only includes lights that can cast shadows.
Active shadow casters only - Includes only lights that cast shadows that are currently being updated, or "active". Shadow casters are active when an object in the light’s region of influence moves.
Excessive overdraws is one of the main culprits to bad performance
This mode provides information regarding the number of objects in the scene that are being drawn in the same space on the screen, or "drawn on top of each other". Overdraw occurs when objects are drawn in the same line of sight, but are separated by space. Objects with low overdraw complexity glow dark purple, and objects with high overdraw complexity glow bright yellow-orange. Areas of high overdraw complexity have a large negative impact on performance as processing time is required to render objects that are ultimately hidden by objects closer to the camera and would be culled normally during runtime. If a single part of mesh is visible to the camera the entire object is being rendered. It is important to note that items with alpha shaders will not cull items behind them.
Triangle Density provides information regarding the number of triangles on screen. Objects with a low triangle density glow dark purple. Objects with high triangle density glow bright yellow-orange. The higher an object's triangle density, the larger its negative impact on performance. use this mode to try and find areas and objects that have a lot of density and try reducing it with less items or more performant objects.
There are two modes, which are accessible through the gear icon on the Diagnostics toolbar:
Screen space - Calculates triangle density per pixel. Objects that are further away from the camera (and therefore smaller on the screen) have the appearance of higher triangle density, since there are more triangles within a smaller rendered area.
World space - Calculates triangle density relative to the size of the world. This mode is not dependent on the camera, which allows for easier identification of higher density objects in the scene.
Viewing triangle density of an object in a scene, with Lighting set low and Sensitivity set to default. Areas of low triangle density appear purple, and areas of higher triangle density are highlighted more brightly.
Visible backfaces shows when a mesh is showing a flipped normal or the backface of a piece of mesh, you can use this to determine if a object has flipped face normals.
This rendering metadata mode outlines all visible triangles in the scene. This directly correlates with the scene's Prims statistic. You can use this mode to identify objects with geometry that may be considered heavy for the size of the item, using this try to find objects and layouts that can be simplified or changed in order to reduce primitive count and triangle density in the scene.
Unlit shows the base colors of the worlds objects without any lighting or shadow effects, this can be useful to see the true colors of items in darker areas or to build without needing to change lighting in dark scenes.
Normals shows the normal maps of all objects and is useful to determine if a normal map is being used on low poly objects instead of a high poly object being used where it is not needed.
Scale shows a grid across the scene that takes into account if a item has been scaled up compared to the others around it, there is some use for this in figuring out if a object has been scaled beyond its original intended size.
Radiance shows the Global Illumination and Bounced lighting color effects within the scene without other sources of color or lighting this mode can help you identify if the GI is achieving desired results and where certain lighting effects may be coming from.