©BBB3viz

Table of Contents

This page provides information about the V-Ray Profiler tool.


Overview


V-Ray Profiler is currently not supported on V-Ray GPU.

The V-Ray Profiler tool helps determine what parts of the scene are taking the longest time to render, compare the performance of different material settings and figure out the best settings for your scene. It does that by tracking the time spent in sampling shaders (materials and textures) and volumes during rendering and breaking down the different types of calculations done for each shader, such as GI, Reflections, Refractions, etc. It writes a JSON formatted report and an HTML report. Both can be read by a browser tracking software, the .json file can also be opened in a text editor offline.

The V-Ray Profiler report breaks down the tracked time into a few categories: Initialization, GI, Reflection, Refraction, and Others. These categories are only tracked if they were used by the shader. For example, a VRayMtl with no refraction enabled does not report anything for Refraction. The same happens if a shader with no Reflection layer is used.

For volumes, the V-Ray Profiler reports the time spent calculating each volume in your scene.

See the introductory article in Chaos' blog for more information.




UI Path


||Rendering|| > Render Setup > Settings System (advanced) > V-Ray Profiler



Settings


Profiler – Enables the V-Ray Profiler. It generates profile reports on processes duration. This report can be used for diagnosing and optimizing performance.

Mode – Determines the mode in which the V-Ray Profiler works.

All - Provides an in-depth report that includes both the system and rendering processes. For example, it shows detailed information per shader, like time spent calculating a shader's reflection, what shaders are reflected in it, and how long it took to sample them. This mode is suitable for scenes that include views through glass windows or in a mirror reflection. It can slow down the render by up to 30%.
System - Reports the time spent on system processes such as compiling geometries, building the Light Cache, etc.

Max depthDetermines the amount of bounces the rays make after coming into contact with an object. Keep in mind that this option depends on the materials' Reflection and Refraction Max depth parameters. If the GI is set to Brute Force, its Depth parameter influences the value of the V-Ray V-Ray Profiler's Max depth. This is reflected in the resulting profile. The Max depth value can go up to 8, however this is not recommended as it significantly slows down the render.

Output directory – Specifies the location of the V-Ray Profiler report files.

Open profile folder – Opens the specified directory.


Max2024_VRay7Beta_System_Advanced_Profiler



Workflow


  1. Turn on the V-Ray V-Ray Profiler by the checkbox
  2. Change settings according to preference - Mode, Max depth and Path.
  3. Render your scene3. Once you finish the render, you are able to find the .html and .json files in your designated directory. Rendering a second or third time generates more reports. Up to 3 reports can be generated in the same folder. Generating more, without changing the Output directory, causes the oldest report to be replaced by the new one. Tip: if you forget where you set the output files to be, the location is recorded in the log file.

  4. Open the generated report2 :
  • If you want to open the .json file:

Go to a third-party tracking software. We recommend using Google Chrome's tracer. Open Google Chrome and enter chrome://tracing/ in the URL field. Drag and drop your .json report onto Google Chrome and explore. The report shows the duration it took to render each element in nanoseconds. Alternatively, you can open the .json file in any text editing software on your machine.

  • If you want to open the .html file:

Double-click on the file and it opens the report in the default browser. Most browsers are suitable for this. Explore the report. The report shows the duration it took to render each element in nanoseconds.

5. You can view the report's metadata either through the button in the browser report, or at the top of the .json file, when read through a text editor, under "product".



If, at any point during the render, the CPU performance drops, a High bundle size wait section appears in the V-Ray Profiler.




Example of a result in All mode opened in a browser



Example of a result in System mode opened in a browser



Notes



  1. If there is only layered materials in the scene (e.g. VRayBlendMtl) and the Max depth parameter of the V-Ray Profiler is set to 8, no more than 5 ray bounces are displayed in the profile. Make sure to lower the Max depth for an accurate reading of such a scene.
  2. When reading a V-Ray Profiler report in a browser, keep in mind that only up to 16 simultaneous events can be displayed. Simultaneous events are stacked down on each other when displayed this way and only up to 16 can fit at the same time, even though V-Ray can render more.
  3. If you render a scene with Bitmaps multiple times, the V-Ray Profiler does not read them after the first render. To profile the Bitmaps after the initial render, you need to go to Render Setup Settings Tiled textures options and enable Clear cache on the render end.



Was this helpful?